Repository navigation
Conversation
- Save enabled state when connecting/disconnecting MCP servers - Fixes issue where /mcp toggle doesn't persist after restart - Config.update() called in both connect() and disconnect() Fixes anomalyco#17799
- Fix TypeScript error TS2304 - Use Config.Mcp type consistently with rest of file Fixes anomalyco#17799
|
|
|
Fully agree. This would completely break my workflow. I keep all MCP servers disabled until needed because Opencode doesn't support tool search, so it bloats my context window a lot. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #17799
Type of change
What does this PR do?
Problem: Using
/mcpcommand to enable/disable MCP servers doesn't persist changes toopencode.json. The toggle works in UI but changes are lost after restart.Root Cause: The
connect()anddisconnect()functions inpackages/opencode/src/mcp/index.tsonly update runtime state but don't save to config file.Solution:
Config.update()in bothconnect()anddisconnect()to persist theenabledstateopencode.jsonand survive restartsHow did you verify your code works?
Checklist