You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: mcp list / mcp auth ignore the global config — servers added with --global are invisible #55811
opencode mcp add <name> --global --url ... writes the server to ~/.config/opencode/opencode.json, but opencode mcp list and opencode mcp auth <name> never see it — they only read project-level config.
Adding the exact same server to a project's opencode.json makes both commands
work immediately (after a service restart). opencode service restart does not
fix the global case.
opencode mcp list (run from $HOME or any project) → No MCP servers configured
opencode service restart && opencode mcp list → still No MCP servers configured
Rewrite the global entry in the documented shape
("mcp": { "myserver": { ... } }, server name directly under mcp) → opencode service restart && opencode mcp list → still No MCP servers configured
Create a project opencode.json with the same server entry (either shape) → opencode service restart && opencode mcp list → ⚠ myserver needs authentication
and opencode mcp auth myserver resolves it correctly.
Expected Behavior
Per the docs, --global makes the server "available in every project"; mcp list and mcp auth <name> should resolve servers from the global config.
Actual Behavior
mcp list → No MCP servers configured
mcp auth <name> → MCP server not found: <name>
consistently reproducible across multiple service restarts, with both config shapes.
Thanks for the detailed report and the workaround. I think this is a duplicate of #50710: servers in the global config never reach the running service, so opencode mcp list shows No MCP servers configured every time. It keeps happening after service restarts, whichever config shape you use. That issue's title mentions Windows, but comments there reproduce it on macOS with both the flat mcp.<name> and nested mcp.servers.<name> shapes, so your Linux/WSL2 report on 2.0.24 looks like the same bug.
Possible duplicates and related issues, most likely first:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you post there, it would help to say whether opencode debug config lists the server while mcp list doesn't, and that a project-level config works for you.
I re-checked this after the earlier automatic close was reverted. Global-config MCP servers never showing up in opencode mcp list, across restarts and with either config shape, is the same problem as #50710, which has also been reproduced outside Windows, so I'm closing this in favor of that issue. Please add there that a project-level config works for you on Linux/WSL2 2.0.24, since that helps narrow it down.
Activity
opencode-agent commentedon Oct 15, 2026
Thanks for the detailed report and the workaround. I think this is a duplicate of #50710: servers in the global config never reach the running service, so
opencode mcp listshowsNo MCP servers configuredevery time. It keeps happening after service restarts, whichever config shape you use. That issue's title mentions Windows, but comments there reproduce it on macOS with both the flatmcp.<name>and nestedmcp.servers.<name>shapes, so your Linux/WSL2 report on 2.0.24 looks like the same bug.Possible duplicates and related issues, most likely first:
mcp listprintsNo MCP servers configured, and it persists across restarts with both config shapes.mcp add --globalwritesmcp.servers.<name>while the docs show the name directly undermcp. This is the mismatch you noticed; a fix is proposed in fix(cli): preserve legacy MCP config shape #52667.The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. If you post there, it would help to say whether
opencode debug configlists the server whilemcp listdoesn't, and that a project-level config works for you.neriousy commentedon Nov 19, 2026
I re-checked this after the earlier automatic close was reverted. Global-config MCP servers never showing up in
opencode mcp list, across restarts and with either config shape, is the same problem as #50710, which has also been reproduced outside Windows, so I'm closing this in favor of that issue. Please add there that a project-level config works for you on Linux/WSL2 2.0.24, since that helps narrow it down.