How to enable mcp tool approval dialog?
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?
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.
we need to expand permissions to work for all tools, currently not possible (unless you do this via plugin)
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?
}
},
}
}
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.