Skip to content

[FEATURE]: Make direct MCP servers also available in codemode #54826

Open

Description

@mxalbert1996

Feature hasn't been suggested before.

  • 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.

Activity

  1. opencode-agent commented on Oct 12, 2026

    @opencode-agent
    Contributor

    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.

    Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions