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.
Additional Context
mcp add --global writes the mcp.servers.<name> shape while https://opencode.ai/docs/mcp-servers/ documents <name> directly under mcp
— the writer and docs disagree; both shapes behave identically in mcp list
(i.e. ignored) when present in the global file.
Workaround: add the server to a project-level opencode.json instead of --global, then restart the background service.
Discovered while setting up an OAuth-protected remote MCP server (the CLI
stopped at "MCP server not found" until the project-level config was used).
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.
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.