You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP: http entry in ~/.claude.json silently displaces a working stdio server from ~/.jcode/mcp.json #653
~/.jcode/mcp.json defines github as a stdio server (via mcp-remote, which works). ~/.claude.json defines the same name as type: http. The http entry wins the merge, then gets dropped for being non-stdio — so a working server silently disappears.
MCP: Skipping non-stdio server 'github' (http); HTTP/SSE transports are not yet supported
MCP: Found 2 server(s) in config
The server is gone, with no indication that a usable definition was overwritten.
Cause
In crates/jcode-base/src/mcp/protocol.rs, load_for_dir() loads ~/.jcode/mcp.json, then .extend()s ~/.claude.json over it. extend replaces on key collision, so the http entry displaces the stdio one. The non-stdio filter afterwards then removes it.
Suggestion
When an incoming entry would replace an existing one and the incoming entry is a transport jcode can't run, keep the existing one. Something like: skip the replacement if !incoming.is_stdio() && existing.is_stdio().
Logging the displacement would also help — the current message reads as "you configured http" rather than "your working stdio config was overwritten".
An opt-out for external-config import would solve it too, for users who want jcode's own MCP config to be authoritative.
Confirmed, and the failure mode is as bad as you describe: the http entry wins the merge, the non-stdio filter then drops it, and the log message blames a config the user did not write.
Fixed in #656, taking your suggestion directly: a collision no longer replaces an existing entry when the incoming one is a transport jcode cannot run and the existing one is stdio. It also logs the displacement it skipped, so the situation is visible rather than silent.
The guard is deliberately one-directional, and both directions are tested: a runnable stdio entry still overrides a non-runnable http one, and same-transport collisions keep the existing last-writer-wins precedence. Applied to the ~/.claude.json merge and to the project-local chain, which had the same hazard. cargo test -p jcode-base --lib mcp:: passes with 3 new tests.
Your third suggestion, an opt-out for external-config import so jcode's own MCP config is authoritative, is a genuine config-surface decision rather than a bug fix, so I have left it for the maintainer instead of inventing a flag.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Follow-up: my first fix was incomplete, and I want to correct the record.
It guarded load_for_dir and the project-local chain, but missed three other merge points with the identical hazard: import_from_external's Claude-legacy and Codex merges, and load_claude_json's per-project override of the same file's global mcpServers. An http entry could still displace a working stdio server in those paths and then be dropped by the non-stdio filter. All merge sites now share the guard (2970d5479).
More importantly, I have now added a test for your exact configuration rather than only the project-local equivalent I tested first, and mutation-verified it: with the guard reverted, github disappears from the merged config entirely, exactly as you reported. It survives with the guard.
Worth recording for anyone testing this area: under JCODE_HOME, user_home_path() resolves external configs to $JCODE_HOME/external/, so a test that writes .claude.json at the JCODE_HOME root never loads it and passes vacuously. My first attempt did exactly that and looked green while proving nothing.
Your third suggestion, an opt-out so jcode's own MCP config is authoritative, remains open for the maintainer as a config-surface decision.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Final verification: confirmed in the built binary, not just unit tests.
I ran a real jcode build against your exact configuration (stdio github in ~/.jcode/mcp.json, http github in ~/.claude.json) in an isolated JCODE_HOME, and read jcode's own log output.
With the fix:
[INFO] MCP: Found 1 server(s) in config
[INFO] MCP: Keeping existing stdio server 'github'; ignoring http definition from a lower-precedence config
With the guard reverted and rebuilt, i.e. the version you reported:
[INFO] MCP: Skipping non-stdio server 'github' (http); HTTP/SSE transports are not yet supported
That is your symptom reproduced exactly, including the misleading log line you flagged, then resolved. Note the difference in what the log now tells you: previously it implied you had configured http, and now it names the displacement it prevented.
Worth mentioning, since it affects how this can be tested: there is no CLI subcommand that prints the merged MCP config (no jcode mcp list), so this had to be verified through the log path. If you have a use for inspecting the effective merged config, that might be worth its own feature request.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Activity
1jehuang commentedon Jul 29, 2026
Confirmed, and the failure mode is as bad as you describe: the http entry wins the merge, the non-stdio filter then drops it, and the log message blames a config the user did not write.
Fixed in #656, taking your suggestion directly: a collision no longer replaces an existing entry when the incoming one is a transport jcode cannot run and the existing one is stdio. It also logs the displacement it skipped, so the situation is visible rather than silent.
The guard is deliberately one-directional, and both directions are tested: a runnable stdio entry still overrides a non-runnable http one, and same-transport collisions keep the existing last-writer-wins precedence. Applied to the
~/.claude.jsonmerge and to the project-local chain, which had the same hazard.cargo test -p jcode-base --lib mcp::passes with 3 new tests.Your third suggestion, an opt-out for external-config import so jcode's own MCP config is authoritative, is a genuine config-surface decision rather than a bug fix, so I have left it for the maintainer instead of inventing a flag.
--- — Jcode agent (automated triage), on behalf of @1jehuang
fix(mcp): guard every cross-source merge, and gate the stdin detector…
1jehuang commentedon Jul 29, 2026
Follow-up: my first fix was incomplete, and I want to correct the record.
It guarded
load_for_dirand the project-local chain, but missed three other merge points with the identical hazard:import_from_external's Claude-legacy and Codex merges, andload_claude_json's per-project override of the same file's globalmcpServers. An http entry could still displace a working stdio server in those paths and then be dropped by the non-stdio filter. All merge sites now share the guard (2970d5479).More importantly, I have now added a test for your exact configuration rather than only the project-local equivalent I tested first, and mutation-verified it: with the guard reverted,
githubdisappears from the merged config entirely, exactly as you reported. It survives with the guard.Worth recording for anyone testing this area: under
JCODE_HOME,user_home_path()resolves external configs to$JCODE_HOME/external/, so a test that writes.claude.jsonat theJCODE_HOMEroot never loads it and passes vacuously. My first attempt did exactly that and looked green while proving nothing.Your third suggestion, an opt-out so jcode's own MCP config is authoritative, remains open for the maintainer as a config-surface decision.
--- — Jcode agent (automated triage), on behalf of @1jehuang
1jehuang commentedon Jul 29, 2026
Final verification: confirmed in the built binary, not just unit tests.
I ran a real
jcodebuild against your exact configuration (stdiogithubin~/.jcode/mcp.json, httpgithubin~/.claude.json) in an isolatedJCODE_HOME, and read jcode's own log output.With the fix:
With the guard reverted and rebuilt, i.e. the version you reported:
That is your symptom reproduced exactly, including the misleading log line you flagged, then resolved. Note the difference in what the log now tells you: previously it implied you had configured http, and now it names the displacement it prevented.
Worth mentioning, since it affects how this can be tested: there is no CLI subcommand that prints the merged MCP config (no
jcode mcp list), so this had to be verified through the log path. If you have a use for inspecting the effective merged config, that might be worth its own feature request.--- — Jcode agent (automated triage), on behalf of @1jehuang
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…
fix: five triage fixes for Gemini schemas, macOS stdin, reload, MCP m…
fix(mcp): guard every cross-source merge, and gate the stdin detector…