Vaikora › Blog › Product Updates
MCP tool calls and authorization: what identity checks miss and where the enforcement gap opens
Authorization for MCP tool calls is harder than it looks at first. Standard identity controls tell you who is calling. They do not tell you whether that call, with that payload, against that tool, at that moment, should actually execute.
That gap is where incidents happen.
What identity-layer controls actually check
When an AI agent invokes an MCP tool, the typical authorization stack checks an API key, an OAuth token, or an IAM role binding. The tool server confirms the caller has permission to invoke the endpoint. If the token is valid and the role is bound, the call proceeds.
That check answers one question: is this principal allowed to reach this tool? It does not answer:
- Does the payload contain data the agent should not be sending to this tool?
- Is this call within the scope of the task the agent was assigned?
- Has the agent already called this tool a suspicious number of times in this session?
- Does the action it would take (a database write, a file deletion, an outbound API call) match the agent's declared intent?
RBAC and IAM enforce access at the resource level. They were built for humans and services with bounded, predictable behavior. An AI agent can be fully authorized at the IAM layer and still take an action that violates your policy, because the policy was never expressed at the action level.
The specific moment authorization should run
Consider a concrete scenario. An AI agent is processing a user request to summarize a document. During that task, the agent decides to call a tool that has write access to your CRM. The OAuth token is valid. The tool binding is correct. IAM says proceed.
Nothing in the identity stack flags this. The agent is authorized to call the tool. But the action is out of scope for the declared task, and the payload may include fields the agent was never supposed to touch.
Authorization at the identity layer already passed. Authorization at the action layer never ran.
This is the structural gap. The call that matters is not "can this principal reach this endpoint." It is "should this specific action execute, given this payload, this context, and this policy."
Where inline enforcement fits
An inline policy gate sits between the agent and the tool call. It receives the full action request before execution, runs it against a deterministic policy, and returns allow, block, modify, or require-approval. The action does not proceed until the gate resolves.
Vaikora operates at this layer. It checks every MCP tool call against configured policy before the tool executes. The enforcement point is not the identity provider and not the tool server. It is the wire between the agent and the destination.
At P50, the enforcement decision adds 8ms. At P99, 45ms. At 10,000+ actions per second, that throughput covers high-volume agent pipelines without queuing.
Because the policy is deterministic, identical input always produces identical output. There is no probabilistic element. If a tool call contains a field pattern that matches a block rule, it blocks, every time, before any data moves.
What the policy actually checks
A well-constructed MCP authorization policy operates on several dimensions that identity alone cannot cover:
- Payload inspection. Does the request body contain a secret, a PII field, or a data class the agent should not be transmitting to this tool?
- Scope binding. Is this tool call consistent with the task context the agent declared at session start?
- Call rate and sequencing. Has the agent called this tool repeatedly in a pattern that looks like enumeration or exfiltration?
- Action type against role. Even if the principal has write permission, does the agent's current policy allow write operations, or only reads?
These checks require the full request context. An identity token does not carry payload content. A role binding does not encode task scope. The enforcement point has to sit inline, with access to the complete action request, to check any of these dimensions.
The audit chain
Every enforcement decision should produce a signed record. If a tool call is blocked, you need to prove what the payload contained, which rule matched, and that the record was not modified after the fact.
Vaikora writes each decision into a SHA-256 hash-chained audit log. Each entry is linked to the previous one, so a gap or modification in the chain is detectable. This matters for incident investigation: when you are tracing why an agent took a specific action, or proving it did not, the record needs to be ordered and tamper-evident.
What to check in your current setup
If your MCP tool authorization relies entirely on token validation and role bindings, run through these questions:
- Can your current controls inspect tool call payloads before execution?
- Do you have per-task scope policies, or does authorization operate purely on principal identity?
- If an agent calls a write tool unexpectedly, does anything block it before the write, or only log it after?
- Is your audit record for tool calls tamper-evident, or just an append-only log?
If the answer to the first three is no, the enforcement gap is open. The place to close it is inline, before execution, not in post-hoc log review.
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