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
Desktop v2.1.3: MCP toggle in Settings does nothing — server stays connected, config not updated #58392
In the Desktop app, switching an MCP server off in Settings → Extensions → MCP only flips the switch in the UI. Nothing else happens:
the MCP server keeps running and is still reported as connected
its tools remain callable in the current session
the global config is not modified (no disabled: true, file mtime unchanged)
the service log shows no config.updated event
A toggle-off is effectively a no-op, and because nothing is written to disk, restarting the app doesn't help either.
This looks like the same family as #25928 / #18664 / #13763, but reproducible on the v2 desktop build.
Plugins
None.
OpenCode version
v2.1.3 (Desktop; the bundled CLI reports opencode v2.1.3)
Steps to reproduce
Configure two stdio MCP servers in the global config (mcp.servers.*), both enabled.
Open Desktop → Settings → Extensions → MCP and switch both off.
The switches show as off.
Check opencode mcp list → both are still connected. opencode debug config → both servers still present without disabled. opencode.json mtime is unchanged.
In an active session the MCP tools still execute normally.
Restart the Desktop app → still connected, because the config was never changed.
Expected behavior
Toggling off should stop the server (at least for the session) and/or persist disabled: true to the config, and the switch should reflect the real state.
Additional context
Manually adding "disabled": true to the servers and running opencode reload works instantly: mcp list reports disabled and the tools disappear from the running session. So only the toggle path is broken.
The global config contains // comments (JSONC). If the toggle handler parses and rewrites the file with a plain JSON parser, the write could be failing silently — worth checking.
Thanks for the detailed report. I reproduced the part where the server keeps running, on v2.1.3 and on the latest dev (a5dddc507e4f). I tested the same server API calls the Settings page makes, not the Windows Desktop app itself.
What happens: the Settings → Extensions → MCP switch sends its disconnect request without a project location. That stops the servers only in the background server's default location, so the Settings list shows them as off. Sessions in your project directory, and opencode mcp list run there, use a separate MCP instance that stays connected, so the tools still work. The script below shows this with two stdio servers: after a disconnect with no location, the default location reports disabled, the project location still reports connected, and the server processes keep running.
On the config file: at v2.1.3 the toggle is runtime-only by design. It never writes disabled: true, so it isn't a failing JSONC write. Saving the toggle to config is being worked on separately in #56452.
Activity
opencode-agent commentedon Oct 23, 2026
Thanks for the detailed report. I reproduced the part where the server keeps running, on v2.1.3 and on the latest
dev(a5dddc507e4f). I tested the same server API calls the Settings page makes, not the Windows Desktop app itself.What happens: the Settings → Extensions → MCP switch sends its disconnect request without a project location. That stops the servers only in the background server's default location, so the Settings list shows them as off. Sessions in your project directory, and
opencode mcp listrun there, use a separate MCP instance that staysconnected, so the tools still work. The script below shows this with two stdio servers: after a disconnect with no location, the default location reportsdisabled, the project location still reportsconnected, and the server processes keep running.On the config file: at v2.1.3 the toggle is runtime-only by design. It never writes
disabled: true, so it isn't a failing JSONC write. Saving the toggle to config is being worked on separately in #56452.Related:
opencode.jsonUntil this is fixed, adding
"disabled": trueand runningopencode reload, as you found, is the reliable way to turn a server off.Reproduction script (repro.sh)
Run it:
bash repro.sh