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 reports no servers on first run in a fresh directory #63722
opencode mcp list prints No MCP servers configured the first time it runs in a directory the background service has not opened yet, even though the configured servers exist and are later reported as connected. The second invocation in the same directory lists them.
This makes mcp list look like it ignores the config. Reproduced with both the V1 flat mcp map and the native V2 mcp.servers shape, so the config shape is not the cause: MCP connections are per directory, and the CLI reads the directory's MCP state before that directory's servers are known.
Steps to reproduce
Add a local MCP server to the global config, e.g. ~/.config/opencode/opencode.json:
From a directory the running service has never opened: mkdir /tmp/fresh && cd /tmp/fresh && opencode mcp list
prints No MCP servers configured
Run the same command again in the same directory:
prints ○ everything pending
Run it a third time:
prints ✓ everything connected
Expected
Configured servers are listed on the first invocation, at least as pending/connecting.
Actual
No MCP servers configured on the first invocation, which is indistinguishable from a config that really has no servers.
Additional context
Also reproducible for a directory that is already a project, as long as the service has not booted that location yet.
Server log shows the location booting and the servers connecting right after the first invocation, e.g. message="mcp connected" server=... directory=<dir>.
Workaround: run the command twice, or run it from a directory already open in a session.
Plugins
-opencode.browser, -opencode.models.dev, plus local OpenChamber plugins (agent-tool, session-title, routed-model)
OpenCode version
2.2.6 (CLI) against a running service reporting 2.2.5
Thanks for the detailed report and the server log.
I think this is a duplicate of #54192. It describes the same thing: the first opencode mcp list in a directory the service hasn't opened yet prints No MCP servers configured, and a later call lists the servers. It's open, has been reproduced, and links a proposed fix in #54191.
Possible duplicates and related issues, ordered by likelihood:
I'm closing this issue now as a duplicate of #54192. Please add your details there: the version mismatch (2.2.6 CLI against a 2.2.5 service), the fact that both config shapes reproduce it, and that it also happens in existing projects. If you think this is a different problem, reply here and the issue will reopen.
Activity
opencodejr commentedon Nov 13, 2026
Thanks for the detailed report and the server log.
I think this is a duplicate of #54192. It describes the same thing: the first
opencode mcp listin a directory the service hasn't opened yet printsNo MCP servers configured, and a later call lists the servers. It's open, has been reproduced, and links a proposed fix in #54191.Possible duplicates and related issues, ordered by likelihood:
mcp list --standalonenever lists the servers. It's related but separate, so it stays open on its ownmcpinstead ofmcp.servers#56602: servers placed directly undermcpinstead ofmcp.serversare ignored, with the same message--globaldon't show up inmcp listI'm closing this issue now as a duplicate of #54192. Please add your details there: the version mismatch (2.2.6 CLI against a 2.2.5 service), the fact that both config shapes reproduce it, and that it also happens in existing projects. If you think this is a different problem, reply here and the issue will reopen.