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
mcp: "enabled": false is dropped at parse, so the server still starts #61589
The docs list enabled as the way to turn a server off without deleting it ("You can also disable a server by setting enabled to false"), and both option tables carry enabled | Boolean | "Enable or disable the MCP server on startup". The key is dropped during config parsing, while startup gates on disabled, which the docs never mention. So "enabled": false is inert and the server connects.
opencode --standalone debug config prints a-enabled-only with no enabled key at all, and keeps disabled: true on the other two.
Plugins
none
OpenCode version
2.2.5
Steps to reproduce
Write the config above into opencode.json in an empty directory.
opencode --standalone debug config — enabled is gone from a-enabled-only.
opencode serve --hostname 127.0.0.1 --port 49399 with OPENCODE_PASSWORD set, then curl -u "opencode:$OPENCODE_PASSWORD" http://127.0.0.1:49399/api/mcp.
entry in config
status from /api/mcp
"enabled": false
failed — it tried to connect
"disabled": true
disabled
both keys
disabled
neither key
failed — it tried to connect
Expected: enabled: false behaves like disabled: true.
The published config schema carries enabled with the description "Enable or disable the MCP server on startup", while the MCP layer's config classes declare disabled and its startup loop tests config.disabled. Nothing maps one to the other, so the documented key does nothing and the undocumented one is the only lever. Not a duplicate of #55419, which covers invalid entries being dropped.
Thanks for the detailed report and the comparison table, @phs!
This is how v2 is meant to work. Under the v2 mcp.servers layout, the key that turns a server off is disabled, and enabled isn't part of that layout. The v2 MCP docs say: "Use disabled, not an enabled field, to keep one configured without connecting it". The v1 migration guide also says v2 "replaces enabled with the inverse disabled". The page and table you quoted describe the v1 layout, where servers sit directly under mcp. That older layout is still converted, and there "enabled": false does become disabled: true, e.g.:
What goes wrong in your case is that an enabled key inside mcp.servers is dropped without any warning, so the server connects anyway. I'm treating that as an improvement request: v2 should either accept enabled there or warn when it ignores it. The maintainers will consider it.
You're right, I quoted the v1 page. opencode.ai/docs/mcp-servers/ is still live, still indexed, carries no v1 banner, and its prose says "You can also disable a server by setting enabled to false". The v2 pages and the migration guide are unambiguous, so this is documentation drift rather than a parser bug.
Narrowed ask, then:
Warn when a key inside mcp.servers is not part of the v2 layout. An enabled sitting there is ignored with no trace today, and mcp: invalid server entries are silently dropped from config #55419 shows a rejected entry can disappear entirely. A closed object plus silent ignore is the failure mode.
Banner that page as v1, or move its prose into the v2 docs, so the page people land on matches the version they run.
The runtime difference I measured does hold: "enabled": false under flat mcp converts to disabled: true, and the same key under mcp.servers connects.
Happy to close this if #55419 and #50852 already cover what's left.
Closing as a duplicate of #55419: V2 uses disabled; silently dropped invalid MCP entries are tracked there. Please follow that issue for updates and add any extra details there.
Activity
opencodejr commentedon Nov 4, 2026
Thanks for the detailed report and the comparison table, @phs!
This is how v2 is meant to work. Under the v2
mcp.serverslayout, the key that turns a server off isdisabled, andenabledisn't part of that layout. The v2 MCP docs say: "Usedisabled, not anenabledfield, to keep one configured without connecting it". The v1 migration guide also says v2 "replacesenabledwith the inversedisabled". The page and table you quoted describe the v1 layout, where servers sit directly undermcp. That older layout is still converted, and there"enabled": falsedoes becomedisabled: true, e.g.:{ "mcp": { "a": { "type": "remote", "url": "http://127.0.0.1:1/mcp", "enabled": false } } }What goes wrong in your case is that an
enabledkey insidemcp.serversis dropped without any warning, so the server connects anyway. I'm treating that as an improvement request: v2 should either acceptenabledthere or warn when it ignores it. The maintainers will consider it.Related issues:
config.jsonschema still describes v1, which is where theenableddescription comes frommcpinstead ofmcp.servers#56602: servers placed directly undermcpinstead ofmcp.serversin v2phs commentedon Nov 4, 2026
You're right, I quoted the v1 page.
opencode.ai/docs/mcp-servers/is still live, still indexed, carries no v1 banner, and its prose says "You can also disable a server by settingenabledtofalse". The v2 pages and the migration guide are unambiguous, so this is documentation drift rather than a parser bug.Narrowed ask, then:
mcp.serversis not part of the v2 layout. Anenabledsitting there is ignored with no trace today, and mcp: invalid server entries are silently dropped from config #55419 shows a rejected entry can disappear entirely. A closed object plus silent ignore is the failure mode.The runtime difference I measured does hold:
"enabled": falseunder flatmcpconverts todisabled: true, and the same key undermcp.serversconnects.Happy to close this if #55419 and #50852 already cover what's left.
neriousy commentedon Nov 23, 2026
Closing as a duplicate of #55419: V2 uses
disabled; silently dropped invalid MCP entries are tracked there. Please follow that issue for updates and add any extra details there.