openwork icon indicating copy to clipboard operation
openwork copied to clipboard

[Feature]: Be able to enable or disable MCP servers and tools

Open juan-abia opened this issue 7 months ago • 3 comments

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

juan-abia avatar Apr 09 '26 16:04 juan-abia

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

src-opn avatar Apr 09 '26 22:04 src-opn

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.

juan-abia avatar Apr 10 '26 21:04 juan-abia

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

Image

elrender avatar Apr 11 '26 09:04 elrender