[Feature]: Be able to enable or disable MCP servers and tools
Summary
Sometimes we might want to work with only a subset of tools. Right now the only way to do this is to completely remove the MCP server. I might want just to disable them. This is quite basic feature. Ideally this information would be stored in the config jsonc.
On top of that, some servers have a lot of tools. The default browser one has 34 tools. If we are not able to disable some of them, we are consuming a lot of tokens and reaching the context window very soon.
Problem / goal
I can't disable individual tools or whole mcp servers
Primary user(s)
- [x] Bob (IT / power user)
- [x] Susan (non-technical)
- [x] Other team roles
OpenCode primitive alignment
Yes! this can be done in opencode
Alignment with VISION/PRINCIPLES/PRODUCT
Is a basic feature aligned with the project vision and goals.
Testability
screenshots + integration tests with the config
Ready to build it yourself?
No
Additional context
No response
Opencode can disable/enable MCPs, we'll add a way to do that
but I dont think you can disable individual tools within an MCP
Makes sense! Feel free to link the PR once it's open and we can close this issue. Disabling individual tools could come in the future if opencode adds this.
Opencode can disable/enable MCPs, we'll add a way to do that
but I dont think you can disable individual tools within an MCP
I think you do it via permissions as every MCP tool name can be access via prefix in permission configuration: https://opencode.ai/docs/tools/#configure