HTTP MCP servers don't load in -p (print) mode
Resolved 💬 3 comments Opened Mar 13, 2026 by dpep Closed Mar 17, 2026
Description
HTTP-based MCP servers configured in user config (~/.claude.json) do not load when running Claude Code in -p (print/pipe) mode, even though they work correctly in interactive mode.
Steps to Reproduce
- Configure an HTTP MCP server in user config:
``bash``
claude mcp add --transport http --scope user myserver "https://example.com/mcp"
- Verify it connects in interactive mode:
``bash``
claude mcp list
# Shows: myserver: https://example.com/mcp (HTTP) - ✓ Connected
- Try to use it in
-pmode:
``bash``
claude -p "list all mcp__myserver tools"
# Returns: No mcp__myserver tools available
Expected Behavior
HTTP MCP servers should load and connect in -p mode the same way they do in interactive mode.
Actual Behavior
- stdio-based MCP servers (npx, docker, uvx commands) load correctly in
-pmode - HTTP-based MCP servers from user/local config do not load in
-pmode - The same HTTP servers work fine in interactive sessions
Environment
- Claude Code version: 2.1.x
- macOS
- Servers tested: Gusto internal HTTP MCP servers (Slack, Gmail, etc.)
Workaround Attempted
- Adding server at different scopes (user, local, project) - none work in
-pmode - Using
--allowedToolsflag - doesn't help since server isn't connected
Impact
This blocks using skills that depend on HTTP MCP servers in automated/cron contexts.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗