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

  1. Configure an HTTP MCP server in user config:

``bash
claude mcp add --transport http --scope user myserver "https://example.com/mcp"
``

  1. Verify it connects in interactive mode:

``bash
claude mcp list
# Shows: myserver: https://example.com/mcp (HTTP) - ✓ Connected
``

  1. Try to use it in -p mode:

``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 -p mode
  • HTTP-based MCP servers from user/local config do not load in -p mode
  • 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 -p mode
  • Using --allowedTools flag - doesn't help since server isn't connected

Impact

This blocks using skills that depend on HTTP MCP servers in automated/cron contexts.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗