How to enable mcp tool approval dialog? #3175

Closed
opened 2026-02-16 17:38:59 -05:00 by yindo · 8 comments
Owner

Originally created by @nitg16 on GitHub (Nov 28, 2025).

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?

Originally created by @nitg16 on GitHub (Nov 28, 2025). ### 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?
yindo closed this issue 2026-02-16 17:38:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 28, 2025):

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

  • #2748: Add Permission Control for MCP Tools - Addresses the exact same concern about MCP tools bypassing the permission system
  • #2899: How to specify permissions for mcp servers - Related question about MCP server permissions
  • #239: Implement permissions in TUI - General permission system request
  • #935: Feature Request: Add "ask before editing files" mode - Proposes an "ask" mode for tool execution (similar to what you're requesting)
  • #3205: Agent should request permission before reading or editing files - Related permission request for file operations

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

@github-actions[bot] commented on GitHub (Nov 28, 2025): This issue might be a duplicate of existing issues. Please check: - #2748: Add Permission Control for MCP Tools - Addresses the exact same concern about MCP tools bypassing the permission system - #2899: How to specify permissions for mcp servers - Related question about MCP server permissions - #239: Implement permissions in TUI - General permission system request - #935: Feature Request: Add "ask before editing files" mode - Proposes an "ask" mode for tool execution (similar to what you're requesting) - #3205: Agent should request permission before reading or editing files - Related permission request for file operations Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Dec 2, 2025):

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

@rekram1-node commented on GitHub (Dec 2, 2025): we need to expand permissions to work for all tools, currently not possible (unless you do this via plugin)
Author
Owner

@nitg16 commented on GitHub (Dec 5, 2025):

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?
      }
    },
  }
}
@nitg16 commented on GitHub (Dec 5, 2025): How to do this via plugin? I arrived at this code after reading docs, but how to proceed further? ```typescript 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? } }, } } ```
Author
Owner

@JeminiRiver commented on GitHub (Dec 7, 2025):

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.

@JeminiRiver commented on GitHub (Dec 7, 2025): 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.
Author
Owner

@nitg16 commented on GitHub (Jan 6, 2026):

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

@nitg16 commented on GitHub (Jan 6, 2026): Any update on this? I see a new permission system. But it is not clear from docs if it covers mcp.
Author
Owner

@0byte-coding commented on GitHub (Jan 9, 2026):

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

@0byte-coding commented on GitHub (Jan 9, 2026): > 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
Author
Owner

@nitg16 commented on GitHub (Jan 9, 2026):

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.

@nitg16 commented on GitHub (Jan 9, 2026): > > 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.
Author
Owner

@rekram1-node commented on GitHub (Jan 9, 2026):

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

Image
@rekram1-node commented on GitHub (Jan 9, 2026): This is possible in new permission system, here is an example: <img width="1010" height="1124" alt="Image" src="https://github.com/user-attachments/assets/4434745e-85cc-452c-a49e-d0d4a79649d5" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3175