You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Make direct MCP servers also available in codemode #54826
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Sometimes I want an MCP server available directly in context to increase its probability of being used by the model, but making it available in codemode is still beneficial as that makes sequential tool calls and result processing/passthrough easier.
I think there's literally zero downside in making all direct MCP servers also available in codemode. In case there is any, gating it behind a config flag would be great.
IIRC Pi already does this.
Thanks for the suggestion! To restate it: MCP servers set to codemode: false (tools directly in context) would also have their tools available inside Code Mode's execute. The model would see them directly but could still chain calls and process results in code, possibly behind a config option.
Right now each MCP tool is exposed in exactly one place, either directly or in Code Mode, depending on the server's codemode setting. So this would need a change in OpenCode itself; a plugin can't do it with the current plugin API. Maintainers will consider it.
Activity
opencode-agent commentedon Oct 12, 2026
Thanks for the suggestion! To restate it: MCP servers set to
codemode: false(tools directly in context) would also have their tools available inside Code Mode'sexecute. The model would see them directly but could still chain calls and process results in code, possibly behind a config option.Right now each MCP tool is exposed in exactly one place, either directly or in Code Mode, depending on the server's
codemodesetting. So this would need a change in OpenCode itself; a plugin can't do it with the current plugin API. Maintainers will consider it.Related issues:
codemode#49576: a global default for the MCPcodemodesettingcodemode: falsedoesn't fully keep a tool out of Code Mode, in the same part of the code