Skip to content
BENIBIX Learn

--permission-prompt-tool Flag

Also known as claude --permission-prompt-tool

It names an MCP tool that says yes or no for you.

Think of it like

It is like you pick a grown-up to say yes or no. They do it when you are not there.

Example

Jack's team has an MCP server that checks each command against their rules. Their CI runs claude -p with --permission-prompt-tool pointing at it.

Why it matters

Your own code can judge each action, which is more exact than a fixed allow list.

Definition

--permission-prompt-tool names an MCP tool that answers permission questions when claude -p runs. Give its full name, such as mcp__approver__check. Claude Code waits for that tool's server to connect before the first turn, up to 30 seconds by default. Then the tool says yes or no to each action that would ask.

Example code

bash
claude -p "Deploy the docs" --permission-prompt-tool mcp__approver__check
Let an MCP tool decide each permission.

Common mistake

Naming a tool on a server the run does not load. The server must be in the session's MCP config, or nothing answers.

Key takeaways

  1. 1
    An MCP tool. Full name.
  2. 2
    Waits to connect. 30 seconds by default.
  3. 3
    Yes or no. For each action.

Learn it properly