`--resume` silently drops local stdio and local-HTTP MCP servers; only external HTTPS survives
Summary
When resuming a Claude Code session with claude --resume '<session-name>', MCP servers defined in project-scoped .mcp.json that use stdio or local-HTTP transports are dropped — they don't appear in /mcp at all (not "disconnected" — UNKNOWN to Claude Code). Only external HTTPS MCP servers survive the resume. A fresh (non-resumed) session re-registers everything correctly.
Environment
- Claude Code version: 2.1.113 (Claude Code)
- Platform: macOS 26.4.1
- Shell: zsh
Reproduction
- Create a
.mcp.jsonwith mixed server types (e.g., one HTTP external, two stdio local, one HTTP local). - Start Claude Code with your normal flags (e.g.,
claude ...), named via-n '<name>'. - Exit the session (
/exit) and resume:claude --resume '<name>' .... - Run
/mcp. Observe that only the external HTTPS server is listed. - Start a fresh (non-resumed) session with the same flags. Observe all servers listed correctly.
Expected behavior
All MCP servers declared in .mcp.json should be re-registered on --resume, identical to a fresh session.
Actual behavior
Only external HTTPS servers re-register. Stdio and local-HTTP MCP servers are silently missing from /mcp (not shown as disconnected — simply absent, as if they were never declared).
Verified today that the .mcp.json is syntactically valid (parses with both python -m json.tool and jq), all keys are structurally correct, and a fresh (non-resumed) session loads every server. Only the --resume path drops local servers. Reproduced multiple times.
Example .mcp.json (minimal, redacted)
{
"mcpServers": {
"external-http": {
"type": "http",
"url": "https://api.example.com/mcp/",
"headers": {
"Authorization": "Bearer <REDACTED>"
}
},
"local-stdio-uvx": {
"type": "stdio",
"command": "uvx",
"args": ["some-mcp-package"],
"env": {
"SERVICE_URL": "http://192.168.1.7:8080",
"SERVICE_TOKEN": "<REDACTED>"
}
},
"local-stdio-bun": {
"command": "bun",
"args": ["run", "/path/to/mcp-bridge.ts"]
},
"local-http": {
"type": "http",
"url": "http://127.0.0.1:8790/mcp",
"headers": { "X-Custom-Header": "session-name" }
}
}
}
After --resume, /mcp shows only external-http. The three local entries (local-stdio-uvx, local-stdio-bun, local-http) are missing from the dialog entirely.
Possibly related (not duplicates)
- #33758 —
--chromeflag ignored on resume. Similar symptom class (resume doesn't re-spawn local MCP), but scoped to the--chromeCLI flag rather than.mcp.jsonproject-scoped servers. - #48260 — MCP connection cache race condition on resume causing "Already connected to a transport" crash. Different failure mode (crash vs. silent drop).
Workaround
Start a fresh session (not --resume). This reconnects everything but loses conversation context.
Impact
Users who rely on --resume to preserve long-running conversation context lose their MCP tool surface silently after a resume. Debugging required comparing the /mcp list against .mcp.json line-by-line and confirming the JSON was valid. There is no log line, warning, or error that indicates the servers were dropped — they just aren't there.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗