Repository navigation
Closed
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: mediumP2 - normal prioritytriage: reproducibleClear repro + clear fix path
Description
Summary
jcode's MCP "Claude Code compatibility" loading does not match Claude Code's actual conventions. Both the file paths and the JSON schema key are wrong, so jcode silently fails to pick up Claude Code MCP servers.
What jcode currently does
crates/jcode-base/src/mcp/protocol.rs:
McpConfigstruct deserializes a top-levelserverskey.load()reads:- Global:
~/.jcode/mcp.json - Project:
./.jcode/mcp.json - Compat fallback:
./.claude/mcp.json
- Global:
import_from_external()(first-run only) reads~/.claude/mcp.jsonand Codex~/.codex/config.toml.
What Claude Code actually uses
- Project scope:
.mcp.jsonat the repo root (NOT.claude/mcp.json). - User / local scope:
~/.claude.json(NOT~/.claude/mcp.json). Per-project entries live underprojects.<abs_path>.mcpServers; a global set can live under top-levelmcpServers. - JSON key:
mcpServers(NOTservers), and each server may be stdio (command/args/env) or HTTP/SSE (type/url/headers).
Impact
- jcode reads
~/.claude/mcp.jsonand./.claude/mcp.json, which are not real Claude Code paths. A user with standard Claude Code MCP config gets nothing imported/loaded. - Even if a file is found, the
serversvsmcpServerskey mismatch means it deserializes to an empty server map.
Proposed change
- Accept
mcpServersas the canonical key (keepserversas an alias via serde for backward compat). - Add real Claude Code paths:
- Project:
./.mcp.json(repo root). - User:
~/.claude.json(read top-levelmcpServersandprojects.<cwd>.mcpServers).
- Project:
- Keep existing
~/.jcode/mcp.json/./.jcode/mcp.jsonas the primary jcode paths. - Update
import_from_external()sources to match (read~/.claude.jsoninstead of~/.claude/mcp.json). - Support HTTP/SSE server entries (
type/url) if not already, since Claude Code configs commonly use them.
Pointers
crates/jcode-base/src/mcp/protocol.rsstruct McpConfig(serverskey)McpConfig::load(paths)McpConfig::import_from_external(first-run import sources)
- Docs to update:
README.md("MCP config files" section)
Notes
Related to skill loading paths discussed in #413; both could grow .agents/ support too, but this issue is specifically about correctness of the Claude Code compatibility paths/schema.
Metadata
Metadata
Assignees
Labels
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.bugSomething isn't workingpriority: mediumP2 - normal prioritytriage: reproducibleClear repro + clear fix path
Activity
1jehuang commentedon Jun 29, 2026
Triage: reproducible, autonomous: likely. Fixed the Claude Code compat paths/schema: accept the canonical
mcpServerskey (alias ofservers), load./.mcp.jsonand~/.claude.json(top-level +projects.<cwd>.mcpServers), recognize and skip HTTP/SSE (type/url) entries with a log line, and update first-run import + README. Fix in #417.style: rustfmt triage fix changes
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
fix(mcp): match Claude Code compatibility paths and schema (#414)
fix(mcp): match Claude Code compatibility paths and schema (1jehuang#414
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
fix(mcp): match Claude Code compatibility paths and schema (1jehuang#414
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …