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 prints "No MCP servers configured" when a location's MCP catalog is not ready #55074
opencode mcp list prints No MCP servers configured even though MCP servers are
configured and connected. At the same moment, GET /api/mcp on the same running
service returns those servers as connected, so the message is wrong, not the
configuration:
It looks like the catalog is resolved per location (the directory the command is run
from) and per service instance, and the CLI gives up before the catalog is ready: the
first mcp list for a directory that has never been used as a location prints the
empty message, and the call right after prints the full list. The same happens right
after opencode service restart (first call empty, second call complete), and a second opencode serve instance that has not served a session yet answers /api/mcp with an
empty list while using the same global configuration.
Expected: list the configured servers with their current state (connected, pending, failed), or say the catalog is still loading. Reporting that no servers are configured
when several are is misleading and leads to a wrong diagnosis.
Plugins
None configured (~/.config/opencode/plugins/ is empty; no plugin entry in the config).
OpenCode version
2.0.28 (install channel: latest). The same behaviour was observed on 2.0.27.
Steps to reproduce
Configure MCP servers in the global ~/.config/opencode/opencode.jsonc (six here:
remote HTTP and local stdio, one of them a local server started with npx -y).
In a directory already used as a location, opencode mcp list returns all of them
with their state (all connected) — this is the normal, working case.
Run opencode mcp list from a directory that has never been used as a location, or
right after opencode service restart.
Observe No MCP servers configured.
Run the same command again (roughly a minute later, once the catalog is built): the
full list appears.
With a local server that has to index the project on its first connection, the first
call shows it as pending and a later call as connected, so the state is available:
it is only reported late as "no servers configured".
Screenshot and/or share link
Not applicable — the CLI output is included in the description above.
Operating System
Linux 7.2.6+deb13-amd64 (Debian 13 / trixie base), x86_64; shell /bin/bash.
Terminal
GNOME Terminal on X11, TERM=xterm-256color, COLORTERM=truecolor.
Thanks for the detailed report! I think this is a duplicate of #54192. It describes the same problem: the MCP HTTP handlers read the registry before the config plugins have registered the servers for a location that hasn't been used yet. The first opencode mcp list (and GET /api/mcp) then comes back empty, and a later call lists the servers. Your cases (a new directory, right after opencode service restart, a fresh opencode serve instance) all start from that same cold state.
Possible duplicates and related issues, ordered from most to least likely:
Additional data point: in our setup the empty output is not transient and does not recover on a second call.
Environment: 2.0.28, Linux. The background/shared service is disabled systemwide (opencode service set disabled true); one private server per invocation (no opencode pair). Version observed on 2.0.28 only.
Clean-room repro (no existing config, no location history, single local stdio server):
Repeating the command from the same directory keeps returning the empty message. Three
independent sessions spread over roughly two hours all saw the empty output, so the
"first call empty, second call complete" behaviour described above does not apply here.
A sub-directory CWD behaves the same as the repo root.
Overriding XDG_CONFIG_HOME to an isolated directory does not change the output.
Impact is diagnostic only: MCP tools are available in-session (e.g. graphify, scrapling tool calls succeed) and opencode debug config resolves the servers. mcp list
is simply unusable as a verification path in this configuration - any MCP filter check has
to fall back to debug config plus a real tool call.
We haven't heard back, so I'm closing this as a duplicate of #54192. Both report the same thing: on a location that hasn't been used yet, the first opencode mcp list / GET /api/mcp returns an empty list because it runs before the servers are registered. Please follow #54192 for updates. PR #54191 proposes a fix and is still under review.
Thanks again for the detailed report. If you find that your problem is different from #54192, reply here with the details and we can reopen this.
Activity
opencode-agent commentedon Oct 13, 2026
Thanks for the detailed report! I think this is a duplicate of #54192. It describes the same problem: the MCP HTTP handlers read the registry before the config plugins have registered the servers for a location that hasn't been used yet. The first
opencode mcp list(andGET /api/mcp) then comes back empty, and a later call lists the servers. Your cases (a new directory, right afteropencode service restart, a freshopencode serveinstance) all start from that same cold state.Possible duplicates and related issues, ordered from most to least likely:
mcp liston a cold location saysNo MCP servers configured, then works). Already reproduced on 2.0.21 and 2.0.26.opencode plugin listprints "No plugins found" on the first call per cold location #54654: the same cold-location pattern foropencode plugin list("No plugins found" on the first call).The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
Genic-ai commentedon Oct 14, 2026
Additional data point: in our setup the empty output is not transient and does not recover on a second call.
Environment: 2.0.28, Linux. The background/shared service is disabled systemwide (
opencode service set disabled true); one private server per invocation (noopencode pair). Version observed on 2.0.28 only.Clean-room repro (no existing config, no location history, single local stdio server):
Notes from our runs:
independent sessions spread over roughly two hours all saw the empty output, so the
"first call empty, second call complete" behaviour described above does not apply here.
XDG_CONFIG_HOMEto an isolated directory does not change the output.opencode mcp list --helpoffers no--standalone/--server, which matches cli: mcp/plugin/debug subcommands reject --standalone and spawn a detached service #53878(
mcp/plugin/debughandlers resolve the server connection without args and spawn adetached service). Combined with a disabled shared service, the per-location MCP catalog
appears to never become ready, so this may be the same root cause as cli: mcp/plugin/debug subcommands reject --standalone and spawn a detached service #53878 rather than a
separate defect.
Impact is diagnostic only: MCP tools are available in-session (e.g.
graphify,scraplingtool calls succeed) andopencode debug configresolves the servers.mcp listis simply unusable as a verification path in this configuration - any MCP filter check has
to fall back to
debug configplus a real tool call.opencode-agent commentedon Oct 14, 2026
We haven't heard back, so I'm closing this as a duplicate of #54192. Both report the same thing: on a location that hasn't been used yet, the first
opencode mcp list/GET /api/mcpreturns an empty list because it runs before the servers are registered. Please follow #54192 for updates. PR #54191 proposes a fix and is still under review.Thanks again for the detailed report. If you find that your problem is different from #54192, reply here with the details and we can reopen this.