Summary
When Jcode runs as an ACP agent server (e.g. via Zed's agent_servers), the host editor passes mcpServers in the ACP agent/session.new request. Jcode treats this as a fatal error and refuses to start the session, making Jcode unusable as an external agent in any host that has MCP/context servers configured.
Environment
- Jcode v0.75.0 (5ae2385), Windows x86_64
- Host: Zed (latest stable) via ACP (
jcode acp)
- Zed has
context_servers configured (svelte-docs, astro-docs, linear, figma, anytype, github, bun-docs)
Steps to reproduce
- Configure
context_servers in Zed's settings.json (any enabled MCP server will trigger it).
- Add Jcode as a custom agent server:
"agent_servers": {
"jcode": {
"type": "custom",
"command": "jcode",
"args": ["acp"]
}
}
- Open Zed's Agent Panel and select the Jcode agent.
- Attempt to start a session.
Expected behavior
Jcode should ignore the mcpServers field in the ACP session.new request (or use it to connect to those servers). MCP servers should be loaded in addition to ~/.jcode/mcp.json or .jcode/mcp.json as documented. The session should start normally.
Actual behavior
Jcode emits a fatal error and the session fails to start:
ACP mcpServers are not supported yet; configure MCP servers in ~/.jcode/mcp.json or a project-local .jcode/mcp.json/.mcp.json
The error is non-recoverable. Jcode cannot be used as an ACP agent in any host that forwards context servers.
Suggested fix
- Short term: If
mcpServers is present in the request, log a debug-level warning and continue session creation normally, loading MCP servers from the config files as usual.
- Long term: Accept
mcpServers from the ACP request and merge them with the file-based config, so host-provided servers work alongside locally configured ones.
Workaround
Disable all context_servers in Zed's settings.json (set each to "enabled": false). This prevents Zed from forwarding them in the ACP request, but also removes them from Zed's own agent panel.
Related
Summary
When Jcode runs as an ACP agent server (e.g. via Zed's
agent_servers), the host editor passesmcpServersin the ACPagent/session.newrequest. Jcode treats this as a fatal error and refuses to start the session, making Jcode unusable as an external agent in any host that has MCP/context servers configured.Environment
jcode acp)context_serversconfigured (svelte-docs, astro-docs, linear, figma, anytype, github, bun-docs)Steps to reproduce
context_serversin Zed'ssettings.json(any enabled MCP server will trigger it).Expected behavior
Jcode should ignore the
mcpServersfield in the ACPsession.newrequest (or use it to connect to those servers). MCP servers should be loaded in addition to~/.jcode/mcp.jsonor.jcode/mcp.jsonas documented. The session should start normally.Actual behavior
Jcode emits a fatal error and the session fails to start:
The error is non-recoverable. Jcode cannot be used as an ACP agent in any host that forwards context servers.
Suggested fix
mcpServersis present in the request, log a debug-level warning and continue session creation normally, loading MCP servers from the config files as usual.mcpServersfrom the ACP request and merge them with the file-based config, so host-provided servers work alongside locally configured ones.Workaround
Disable all
context_serversin Zed'ssettings.json(set each to"enabled": false). This prevents Zed from forwarding them in the ACP request, but also removes them from Zed's own agent panel.Related
/-prefixed input with "Available commands for jcode: none" #851