Skip to content

How to enable mcp tool approval dialog? #4854

Closed

Description

@nitg16

Question

Currently mcp tools can be enabled or disabled. Is there a way to show approval dialog for mcp tools (similar to built-in tools)?

MCP tools are enabled by default, which is extremely risky. How to enable 'ask' mode globally for all mcp tools?

Activity

  1. github-actions commented on Nov 28, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Dec 2, 2025

    @rekram1-node
    Contributor

    we need to expand permissions to work for all tools, currently not possible (unless you do this via plugin)

  3. nitg16 commented on Dec 5, 2025

    @nitg16
    Author

    How to do this via plugin? I arrived at this code after reading docs, but how to proceed further?

    export const McpApproval = async ({ project, client, $, directory, worktree }) => {
      return {
        "tool.execute.before": async (input, output) => {
          if (input.tool.startsWith("mcp_")) {
            // What to do here? How to show approval dialog in TUI?
          }
        },
      }
    }
  4. JeminiRiver commented on Dec 7, 2025

    @JeminiRiver

    I keep circling back to this need. I've been compensating with hyper specific agent access but it's imperfect and leave's me disabling some mcp tools permanently. I've got a local build running with a real slim quick permissions add for mcp that sits beside and works identically to bash permissions. I'll see how it tests out tomorrow. I'll be happy for a permanent fix though because this has defiantly been a pain point.

  5. nitg16 commented on Jan 7, 2026

    @nitg16
    Author

    Any update on this? I see a new permission system. But it is not clear from docs if it covers mcp.

  6. 0byte-coding commented on Jan 9, 2026

    @0byte-coding

    Any update on this? I see a new permission system. But it is not clear from docs if it covers mcp.

    it does, check https://opencode.ai/docs/tools/#configure

  7. nitg16 commented on Jan 9, 2026

    @nitg16
    Author

    Any update on this? I see a new permission system. But it is not clear from docs if it covers mcp.

    it does, check https://opencode.ai/docs/tools/#configure

    Thanks, will check it out.

  8. rekram1-node commented on Jan 9, 2026

    @rekram1-node
    Contributor

    This is possible in new permission system, here is an example:

    Image
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