jcode-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jcode-mcp spawn two agents to fix the login bug and add tests, then wait for them"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jcode-mcp
An MCP server that lets Claude (Desktop or Code) orchestrate jcode agent sessions. Claude plans and verifies. jcode agents do the work in parallel, one git worktree each.
Connected to your own jcode, the sessions it creates are normal jcode sessions: they appear in the jcode TUI and in jcode Desktop, where you can watch or steer them.
Claude Desktop / Claude Code
| MCP (stdio)
v
jcode-mcp --- @1jehuang/jcode-sdk ---> jcode harness API bridge ---> jcode daemon
| | |
agent sessions (worktrees)
^
jcode TUI / jcode DesktopInstall
Requires Node 20 or newer. The jcode runtime ships inside the SDK package, so no separate jcode install is needed (installing jcode yourself works too).
git clone https://github.com/ymatrix1/jcode-mcp
cd jcode-mcp
npm ci && npm run buildClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"jcode": {
"command": "node",
"args": ["/absolute/path/to/jcode-mcp/dist/src/cli.js"],
"env": { "JCODE_MCP_AUTOSTART_BRIDGE": "1" }
}
}
}Claude Code
claude mcp add jcode -e JCODE_MCP_AUTOSTART_BRIDGE=1 -- node /absolute/path/to/jcode-mcp/dist/src/cli.jsOptionally copy skills/orchestrate-jcode into your skills directory so Claude follows a consistent delegate, wait, verify workflow.
Related MCP server: z-code-mcp
Tools
Tool | Purpose |
| Start a jcode session on a task, optionally in a fresh git worktree and branch. Returns at once. |
| Block up to 50 s until any or all agents finish or ask for a permission. |
| State, tool counts, token usage, pending permissions, warnings. |
| Last final message, optionally the last N transcript messages. |
| Soft-interrupt a running agent, or start a new turn on an idle one. |
| Allow or deny a pending tool permission request. |
| Interrupt the current turn. |
| Stop tracking; optionally archive the session and remove the worktree. |
| Sessions the jcode daemon knows, including ones not spawned here. |
States: starting, running, idle, failed, cancelled, disconnected, closed. After a daemon reload, running agents show disconnected; message_agent re-attaches and starts a new turn.
Configuration
Variable | Default | Meaning |
|
|
|
| off | Set |
|
|
|
| SDK default | Harness API socket path. |
| bundled | Path to a jcode binary. |
|
| Where worktrees are created. |
| unrestricted | Colon-separated directories agents may work in. Strongly recommended. |
Seeing sessions in jcode Desktop
In connect mode this server talks to the same harness API socket that jcode Desktop uses, and Desktop lists sessions from the daemon. Two things to know:
Desktop refreshes its session list every
workspace.session_refresh_seconds(default 60, minimum 5). A new session can take that long to appear.Desktop's nested swarm tree is built from jcode's own swarm ownership. Sessions spawned here are ordinary top-level sessions, named
label: title.
Safety
jcode agents run as your OS user with your provider logins. Per-session tool limits are not a sandbox. Use
JCODE_MCP_ALLOWED_ROOTS, keepauto_approveoff by default, and review diffs before merging.jcode picks up provider credentials it finds on the machine. If an agent turn ends with a
warningabout no output, check which provider jcode is using.Using a Claude subscription login through third-party harnesses may be restricted by Anthropic's terms. Prefer an API key.
Development
npm test # unit tests with a fake jcode client and real git
JCODE_MCP_E2E=1 npm test # also runs the real jcode binary in throwaway stateTests cover the worktree helpers, agent state machine (including reconnect, cancel, permissions, wait), config, and the MCP tool layer through an in-memory MCP client. The e2e test needs no model credentials, so it proves session creation, naming and listing, not model output.
License
MIT
Available Tools
10 toolsagent_outputB
The agent's last final message, plus optionally the last N transcript messages. Do not treat a worker's claim of success as proof: check its diff and run the tests yourself.
Inputs: id (required), tail.
agent_statusA
State of one agent: running, idle, failed, cancelled, disconnected.
Inputs: id (required).
cancel_agentA
Interrupt the agent's current turn. The session stays open and can be messaged again.
Inputs: id (required).
close_agentA
Stop tracking an agent. Optionally archive the jcode session (hides it in Desktop) and remove its git worktree. Removing a worktree with uncommitted changes needs force=true.
Inputs: id (required), force, archive, remove_worktree.
list_agentsB
List agents spawned through this server, with state, tool counts and pending permission requests.
Inputs: include_closed.
list_jcode_sessionsB
List sessions known to the connected jcode daemon, including ones this server did not spawn.
Inputs: limit.
message_agentA
Send text to an agent. A running agent gets it as a soft interrupt (urgent=true skips pending tool calls); an idle agent starts a new turn with it.
Inputs: id (required), text (required), urgent.
respond_permissionC
Answer a pending tool permission request shown in agent_status.pending_permissions.
Inputs: id (required), decision (required), request_id (required).
spawn_agentA
Start a jcode agent session on a task and return immediately. The session is a normal jcode session (visible in jcode Desktop and the TUI when connected to the user's jcode). Give it a git worktree so parallel agents do not edit the same files. Poll with agent_status, or block briefly with wait_agents.
Inputs: label (required), prompt (required), model, title, +3 more.
wait_agentsA
Block up to timeout_seconds (max 50) until any or all agents stop running or ask for a permission. Prefer this over repeated polling.
Inputs: ids (required), mode, timeout_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a distinct role in the agent lifecycle (spawn, observe, interact, terminate), and descriptions clearly differentiate them. The only mild overlap is between list_agents, agent_status, and list_jcode_sessions, though the descriptions distinguish server-spawned agents from daemon-wide sessions.
Eight of ten tools follow a verb_noun pattern (spawn_agent, list_agents, wait_agents, message_agent, cancel_agent, close_agent, respond_permission, list_jcode_sessions). agent_status and agent_output break the pattern with noun-first naming, a minor but noticeable deviation.
Ten tools is well-scoped for an agent orchestration server, covering exactly the lifecycle phases a caller needs. No tool appears redundant or vestigial.
The surface covers spawn, monitor, message, wait, cancel, close, and permission handling — a full lifecycle. Minor gaps include no tool to fetch an agent's diff or worktree state (descriptions tell you to inspect manually) and no resume/restart operation for a closed agent.
Maintenance
Related MCP Connectors
Command center for developers coordinating AI coding agents across projects.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Sync coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to orchestrate a team of independent Claude Code sessions within iTerm2 for parallel task execution and isolated git worktree management. It provides tools to spawn, monitor, and message worker sessions while maintaining full visibility and control over their terminal windows.48MIT
- AlicenseAqualityDmaintenanceEnables orchestration of multiple Claude Code sessions for complex multi-task coding projects with HEAD/SUB coordination and dependency-based task execution.16 npmMIT
- AlicenseNot gradedqualityBmaintenanceCoordinates parallel Claude Code agents on shared repositories and orchestrates multiple Claude subscriptions, enabling live session handoff, conflict detection, and remote terminal control.8 npmMIT
- AlicenseAqualityAmaintenanceEnables Claude Code to launch and supervise multiple concurrent Claude Code sessions in tmux, sending them briefs, reading their progress, answering their prompts, and managing isolated git worktrees.202MIT