Jump to slow-startup troubleshooting · Set up Jcode in Zed
I use MCP to give Jcode tools supplied by a separate server. I check three things independently: which configuration was loaded, whether the server completed initialization, and whether an actual tool call succeeded. Seeing a server name in a list answers only the first question.
Where I put and check MCP configuration
| File or source | How I use it |
|---|---|
~/.jcode/mcp.json | My global Jcode MCP configuration. If I set JCODE_HOME, I check mcp.json inside that directory. |
.jcode/mcp.json | Project-local configuration, resolved against the project directory. |
.mcp.json and .claude/mcp.json | Additional project compatibility sources. I check duplicate server names across these files. |
~/.claude.json and legacy ~/.claude/mcp.json | Live Claude compatibility sources; I do not assume they were copied only once. |
~/.codex/config.toml | One-time import when Jcode’s own global MCP file does not exist. Later Codex edits are not automatically synced into that imported file. |
I confirm the effective names with jcode mcp list. The release’s configuration loader defines source merging and environment expansion. If two files define the same name, I inspect both rather than assume the file I just edited won.
A minimal stdio entry has this shape. I replace the example path and arguments with the real server’s instructions; this placeholder command is not an installed server.
{
"mcpServers": {
"my-server": {
"command": "/absolute/path/to/server-executable",
"args": [],
"env": {},
"timeout_secs": 30
}
}
}
The examples below walk through local stdio configuration, connection checks and a successful tool call.
My practical MCP diagnostic sequence
1. I update and record the exact version
jcode --version
jcode update
# Restart the client, then verify the version:
jcode --version2. I list configuration, then test one server
jcode mcp list
jcode mcp test my-server
I replace my-server with a name from the list. Listing does not connect; mcp test connects once, reports server information and tool names, then disconnects. It does not invoke a tool. In my working fixture, this connection check took 0.148 seconds. I separately called its harmless echo tool and received MCP_RECOVERY_OK.
3. I read the failure cause before changing authentication
My deliberately broken fixture wrote a diagnostic to stderr and exited before answering initialize. Even with timeout_secs: 86400, current Jcode detected the closed connection in 0.035 seconds and exited with code 1. It did not wait a day.
MCP server 'dead' failed to initialize
MCP server 'dead' exited (connection closed)
channel closed
The error wrapper also mentions remote OAuth. I follow the actual cause: this server uses stdio and has exited, so a remote login is not its repair. I check its executable, arguments, runtime dependencies and stderr. For stdio, I keep diagnostics off stdout because stdout carries protocol messages.
My verified repair: I changed that fixture’s command arguments to start its working mode, then ran jcode mcp test dead again. It connected, listed the echo tool and disconnected cleanly in 0.154 seconds.
4. I distinguish silence from an exited process
Another fixture stayed alive but never answered initialization. With its timeout set to two seconds, mcp test slow failed in 2.012 seconds. I check whether the process is waiting for input or blocked on a dependency before increasing its budget.
5. I raise only a genuinely slow server’s timeout
I used a fixture that initialized normally, then took three seconds to answer a tool call. With timeout_secs: 1, the call failed in 1.014 seconds and named the server and setting in the error. I changed that server’s value to 5, reloaded MCP, and repeated the same call. It returned MCP_RECOVERY_OK in 3.613 seconds.
"timeout_secs": 5
I change this field inside the existing server object, preserving its command, arguments and environment. In my test I used the debug mcp:reload operation; in a normal session I ask Jcode’s MCP management tool to reload, or start a fresh session. I then repeat the actual small tool call. A successful configuration reload alone is not the final check.
6. Fix a slow first request: MCP startup checks
Start by checking the installed version, then test the named MCP server separately from the first model request.
Step 1 — Update and confirm the executable
jcode --version
jcode update
jcode --version
Compare the version with the official stable release; this guide uses v0.99.1. Restart the Jcode client after updating.
Step 2 — Find the server that is taking time
jcode mcp list --json
jcode mcp test headroom
Use headroom when that is the server named in your log; otherwise substitute your configured server’s name. Run these diagnostics with the current version. A successful test shows the server and its tools. Our healthy v0.99.1 fixture connected and listed echo_proof in 0.275 seconds.
Step 3 — Repair the named server’s startup
Check its configured executable, arguments, environment variables and working-directory assumptions. Run the server’s documented startup command directly to see its own error output, then repeat jcode mcp test. For a remote server that requests OAuth, use jcode mcp login YOUR_SERVER and test again.
Step 4 — Set a deliberate timeout
Inside the existing server object, timeout_secs sets the request budget. Keep the server’s other fields intact. A short value helps expose a server that stays alive but never answers; give a legitimately slow tool enough time to finish.
"timeout_secs": 2
In our v0.99.1 check, a silent initialization with this setting returned a timeout in 2.335 seconds. The three-second tool example above shows how to increase a slow tool’s budget and verify the recovery. Start a fresh session after editing the configuration.
Step 5 — Compare startup and first-request timestamps
Record launch time, the first provider-request timestamp and the MCP timeout timestamp separately. In headless jcode run, a cold tool cache can add a bounded startup wait.
We checked official v0.89.0 and v0.99.1 with one healthy MCP server, one silent MCP server configured for 30 seconds, and a local HTTP response fixture. The first provider request arrived after 6.650 seconds on v0.89.0 and 6.428 seconds on v0.99.1. Both runs completed with STARTUP_CHECK_OK.

For a persistent delay, record the selected provider, the named MCP server, and the time between launch and the first provider request. This helps distinguish server initialization from model response time.
Using Zed? Follow the Jcode ACP setup guide for editor session creation and native MCP configuration.
I return to the errors hub for other MCP symptoms and the current provider troubleshooting guide when the failure occurs at the model endpoint instead of an MCP server.




