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.

August 10, 2026
implementationguidesetupJcodeMCPmcp.json

Prerequisites

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.jsonglobal, applied to every session
  • .jcode/mcp.jsonproject-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

TransportSupported
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

  1. Start Jcode in your project: jcode
  2. Ask the agent to use a tool from the server, e.g. "search the filesystem for README files"
  3. 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 in env so 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