Vaikora › Blog › Product Updates
MCP tool calls that bypass authorization: the specific gap between permission grant and execution enforcement
Granting a tool permission inside an MCP configuration does not enforce that grant at the moment a call executes. The two things are distinct, and the gap between them is where most MCP authorization problems actually live.
What "authorized" means in a typical MCP setup
When you configure an MCP server, you define which tools the connected agent can call. That list is a declaration, not a gate. At call time, the MCP server routes the request to the tool handler. Whether the specific action inside that call, the actual file path, the exact database table, the precise API endpoint, matches what you intended to allow is a question the configuration layer usually never asks.
A concrete example: you authorize a tool named `read_file`. An agent calls `read_file` with the argument `/etc/shadow`. The authorization check passes because the tool is on the allowed list. The argument is not checked. The call executes.
This is not a hypothetical edge case. It is the default behavior of most MCP implementations, because MCP itself does not mandate argument-level policy enforcement.
Where the enforcement gap opens
Three things contribute to the gap:
- Tool-level grants without argument inspection. Permission attaches to the tool name, not to what the tool does with its inputs. Any valid call to that tool, regardless of argument content, passes the check.
- Context blindness. A tool call authorized in a test environment looks identical to the same call in production. Without a policy engine that reads session context, the distinction is invisible.
- No require-approval path. Most MCP configurations offer binary access: the tool is callable or it is not. There is no native mechanism to require human approval for high-risk arguments while allowing routine calls to proceed automatically.
The result is that your authorization model governs tool access but not tool behavior. Those are different risk surfaces.
What argument-level enforcement actually requires
Fixing this requires an enforcement point that sits inline between the agent and the tool invocation, reads the full call including all arguments and session context, evaluates it against a deterministic policy, and returns allow, block, modify, or require-approval before execution happens.
Deterministic is the operative word. Given the same input, the policy engine produces the same decision every time. That property matters both for security (you can predict and test behavior) and for audit (every decision is reproducible from the log record).
Vaikora works as an MCP-compatible proxy. The agent sends a tool call to the Vaikora gateway. The gateway inspects the call, runs it through the policy engine, and either passes it to the upstream MCP server or blocks and returns a structured error. Enforcement latency runs at P50 8ms, P99 45ms, so the agent loop does not stall waiting for a policy decision.
The `read_file` example above becomes: the agent calls `read_file` with `/etc/shadow`, the policy engine matches that path against a deny pattern, the call is blocked before it reaches the tool handler, and the decision is written to the audit chain. The agent sees an error. The file is never read.
Structuring policy for MCP tools
A few practical points when designing argument-level policy:
- Write deny rules against argument patterns, not just tool names. Use regex or glob patterns against the argument fields most likely to carry risk: file paths, table names, API endpoints, SQL fragments.
- Use require-approval for ambiguous cases. Not every high-risk argument is unambiguously wrong. A policy that routes certain calls to a human approval queue preserves agent productivity without granting unreviewed access.
- Scope policy to session context. The same tool call can be low-risk from an internal developer session and high-risk from an externally triggered agent. Policy that ignores context is too coarse to be accurate.
- Log the argument content, not just the tool name. An audit record that shows `read_file: allowed` tells you nothing useful during an investigation. The record needs the full argument set and the matched policy rule.
What to verify before you assume authorization is working
Pull a sample of recent MCP tool call logs and ask these questions:
- Does the log contain the actual arguments passed, or just the tool name and outcome?
- Is there a policy decision recorded for each call, or only an access grant at session start?
- Can you reconstruct which policy rule matched, and against which argument field?
- Is there any mechanism that would have caught `read_file /etc/shadow` as distinct from `read_file /tmp/report.csv`?
If the answer to any of those is no, your authorization model covers access, not enforcement. That is the gap to close first.
See Vaikora enforce policy on your AI
Open-core AI runtime control. Self-host the MIT gateway free, or run the hosted Control Plane.
Get a demo Self-host the gateway
Vaikora