anomalyco / anomalyco/opencode

Desktop App: MCP enable/disable toggle does not persist to opencode.json

Open
#40,079 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Open the Desktop App
  2. Go to MCP settings
  3. Toggle an MCP off (e.g., context7 or figma)
  4. Confirm the MCP process stops (the toggle is effective at runtime)
  5. Restart the Desktop App
  6. Result: The MCP is running again — opencode.json still 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.json is 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.json on 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 .dat files, Local Storage) do not appear to store MCP enabled/disabled state
  • Manually editing opencode.json to set "enabled": false is currently the only way to persistently disable an MCP

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.