anomalyco / anomalyco/opencode
Desktop App: MCP enable/disable toggle does not persist to opencode.json
@Brendonovich is already working on this.
Since Aug 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Bug Description
The Desktop App's MCP settings toggle (enable/disable) only affects runtime state. It does not write the change back to opencode.json. After restarting the app, the sidecar re-reads opencode.json (which still has enabled: true) and re-starts the MCP servers that the user had disabled via the UI.
This makes the UI toggle misleading: the displayed state does not survive a restart, and users cannot trust whether an MCP is actually enabled or disabled.
Steps to Reproduce
- Open the Desktop App
- Go to MCP settings
- Toggle an MCP off (e.g.,
context7orfigma) - Confirm the MCP process stops (the toggle is effective at runtime)
- Restart the Desktop App
- Result: The MCP is running again —
opencode.jsonstill contains"enabled": true
Expected Behavior
Toggling an MCP off in the Desktop App UI should write "enabled": false to opencode.json (or an equivalent persistent store), so the disabled state survives restarts.
Actual Behavior
- The toggle only stops/starts the MCP process at runtime
opencode.jsonis never updated by the UI toggle- On restart, the sidecar reads the unchanged config and re-enables the MCP
- The UI shows the MCP as enabled again, with no indication that the user's previous toggle was lost
Environment
- opencode Desktop App: v1.18.11
- OS: macOS (darwin arm64)
- Config file:
~/.config/opencode/opencode.json
Additional Context
Verified that:
- The Desktop App does not modify
opencode.jsonon startup or on toggle (file mtime unchanged) - The MCP processes do stop when toggled off (runtime control works)
- The Desktop App's internal data (
default.dat,opencode.global.dat, workspace.datfiles, Local Storage) do not appear to store MCP enabled/disabled state - Manually editing
opencode.jsonto set"enabled": falseis currently the only way to persistently disable an MCP
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.