How to Set Up MCP Servers in Jcode (Step-by-Step)
Connect Jcode to external tools with MCP servers. Complete Jcode MCP setup guide with ~/.jcode/mcp.json and .jcode/mcp.json configuration, importing Claude Code servers, and troubleshooting.
Prerequisites
- Jcode installed (see Jcode Getting Started)
- Node.js 18+ or Docker for npx- and Docker-based servers
What is MCP?
MCP (Model Context Protocol) lets Jcode's agent use external tools — filesystem, GitHub, databases — through a standard interface. Jcode reads your MCP config at startup and advertises each server's tools to the agent.
Enabling MCP in Jcode
MCP configuration lives in two files:
~/.jcode/mcp.json— global, applied to every session.jcode/mcp.json— project-local, applied to that repo
Jcode also reads Claude Code's configs (~/.claude.json and .mcp.json at the repo root) and imports servers from Claude Code and Codex configs on first run — so existing MCP setups often just work.
Configuring MCP Servers
Add an mcpServers block to either file:
{
"mcpServers": {
"filesystem": {
"command": "/path/to/mcp-server",
"args": ["--root", "/workspace"],
"env": {}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Supported Transports
| Transport | Supported |
|---|---|
| stdio (command-based) | ✅ Yes |
| HTTP / SSE | ❌ Recognized and skipped |
Only stdio (command-based) servers are supported today. HTTP and SSE entries are detected and skipped, so they won't break your config.
What Jcode Does Differently
- On-disk schema cache — configured MCP tools are advertised the moment a session starts from a schema cache, so a slow server handshake never blocks startup or invalidates the prompt cache.
- Connect-on-first-call — connections happen in the background; a call that needs a not-yet-connected server transparently waits for the handshake.
- Auto-import — Claude Code and Codex MCP configs are read automatically on first run, so you don't have to duplicate config.
Verifying Your Servers
- Start Jcode in your project:
jcode - Ask the agent to use a tool from the server, e.g. "search the filesystem for README files"
- If a server failed to connect, check the session log — the on-disk cache means failures surface on first tool call, not startup
Using MCP Tools in Jcode
Once connected, the agent calls the server's tools like any built-in tool:
You: "Use the github server to list my open PRs."
Agent: [calls the github tool, returns the PR list]
Because connections are lazy, a call that needs a not-yet-connected server simply waits for the handshake rather than erroring out.
Security Considerations
- Least privilege — give servers only the credentials they need
- Keep secrets out of git — use
${VAR_NAME}interpolation inenvso API keys resolve from your shell at launch; keep private servers in the global~/.jcode/mcp.json - Review server tools — an MCP server executes arbitrary commands on your machine
- Project vs global — use
.jcode/mcp.json(project-local) for workspace-specific servers
Troubleshooting
Further Resources
- MCP Servers directory — pick servers that match your tools
- Jcode Configuration Reference — config.toml, MCP, memory, swarms
- MCP Setup in Cursor — the same concepts in Cursor
- MCP Setup in Claude Code — CLI-based MCP configuration
Related Articles & Guides
How to Set Up MCP Servers in GitHub Copilot (Step-by-Step)
Connect GitHub Copilot to external tools with MCP servers. Complete Copilot MCP setup guide covering VS Code mcp.json, Copilot CLI, configuration examples, and troubleshooting.
How to Set Up MCP Servers in Cursor (Step-by-Step)
Connect Cursor to external tools with MCP servers. Complete Cursor MCP setup guide with .cursor/mcp.json configuration, the MCP UI, troubleshooting, and security best practices.
How to Set Up MCP Servers in Antigravity CLI (Step-by-Step)
Connect Antigravity CLI to external tools with MCP servers. Complete setup guide covering agy mcp add/list/remove commands, settings.json configuration, verification, and troubleshooting.