← Blog

MCP Tool Call Authorization and the LLM Request Boundary

Parminder Singh
Parminder Singh··5 min read
Summarize with AI

An agent can pass through an HTTP LLM request and then invoke an MCP tool, but those are separate security decisions. The application and LLM gateway can control the routed model request; the MCP tool server must authorize the selected tool and arguments before execution. This guide maps the two boundaries and the evidence each owner can retain.

Problem-Awareagentic-aiai-securityidentity-and-authorizationllm-securityzero-trustpolicy-enforcement
Authorizing Individual MCP Tool Calls at Invocation Time

MCP tool call authorization and HTTP LLM request policy answer different questions. The MCP tools specification defines tools/call with a tool name and arguments. The tool server must decide whether the caller may execute that action. Earlier in the agent flow, an HTTP request to an LLM may carry a prompt, application-supplied identity context, and a model route. A gateway in that request path can evaluate those fields, but it does not thereby authorize the later tool call.

Confusing these checkpoints makes an audit record look more complete than it is. A permitted model request does not prove that send_email was permitted, and a permitted MCP connection does not establish that every set of tool arguments was safe. The useful design is a clear owner and a separate decision record for each boundary.

TL;DR

An MCP access token may authorize a client to reach a tool server. That server remains responsible for the selected tool and arguments before execution. DeepInspect evaluates only HTTP AI traffic intentionally routed between an authenticated user or agent and an LLM. Its model-request decision can support an investigation, but it is not the tool server's authorization decision.

One agent flow, two policy boundaries

An agent can first submit a model request over HTTP. The application supplies the caller context and sends the prompt to a selected LLM route. If that request traverses DeepInspect, policy can evaluate the routed request before the model responds. The decision concerns that HTTP exchange. It does not inspect a future local process or guarantee that a subsequent MCP request is allowed.

The agent may then use tools/list to discover an MCP server's named tools and their inputSchema. If it chooses one, the client sends tools/call with a name and arguments. The server evaluates that request and may execute the action. The tools specification assigns input validation and access controls to the server and recommends a human confirmation path for sensitive operations. A model gateway's earlier allow decision cannot replace either measure.

MCP connection authorization is a separate check

For HTTP-based MCP transport, the MCP authorization specification describes a protected server as an OAuth resource server. It validates the access token and its intended audience before accepting a protected request. The same specification says STDIO deployments should obtain credentials from the environment rather than use that HTTP authorization flow. Neither transport rule means an LLM gateway has gained control of the MCP server.

The MCP Python SDK OAuth account-takeover incident showed a malicious HTTP MCP server could force a fallback OAuth discovery path, then receive a client's authorization code, client secret, and PKCE verifier after the user signed in at the legitimate provider.

The server still needs a decision for the particular invocation. A token with broad scope may permit a client to reach both get_weather and send_email, while the second tool has a different effect. An application can restrict scopes and request confirmation; the tool server must validate the selected operation and inputs before it acts. This is a tool-server control, even when the MCP transport itself uses HTTP.

What the tool server must decide

The server should check the caller, tool name, and argument values together. A read_file invocation with a path to a protected record is different from one aimed at an approved public file, even though both use the same tool name. The server owns those filesystem permissions and any downstream action. The LLM's choice of tool or an earlier approved prompt does not grant the caller a new entitlement.

An application should also retain enough identity context to explain the request later. If several users share one service account and the tool server sees only that account, a later audit cannot identify the initiating user from the token alone. The application must authenticate its own caller and pass trustworthy context to each relevant control. AI agent identity management covers that upstream responsibility.

What the HTTP LLM request can establish

The HTTP LLM request is an earlier and narrower enforcement point. When the application intentionally routes an authenticated user or agent's model request through DeepInspect, the decision record can identify the application-supplied caller context, policy version, model route, and allow or deny outcome. Those fields answer whether that model request met policy. They do not describe a tool server's argument check unless the server separately records it.

Consider an agent whose model prompt contains a customer record and whose next step is send_email. The model request can be reviewed for that record's classification and destination at the LLM boundary. The email operation still requires the tool server to verify the recipient and caller entitlement. If that HTTP exchange is denied, the tool should never be reached through that workflow. If it is allowed, the server may still need to deny the email. Both decisions matter, but neither is evidence for the other.

For a useful incident trail, join the application request ID to the model-request decision and the tool server's separate invocation record. The join should preserve timestamps, caller context, tool name, relevant argument classifications, and each policy outcome. Do not copy sensitive argument values into a log solely to simplify correlation. Without a shared request ID, an analyst can see two logs and still struggle to prove which model response preceded which action.

DeepInspect

DeepInspect evaluates HTTP AI traffic intentionally routed between authenticated users or agents and LLM endpoints. The application supplies identity context; DeepInspect evaluates the context and content presented at that boundary. It can record a decision for the model request that led an agent to consider a tool. That is useful evidence for the model step, subject to the accuracy of the application's caller context.

DeepInspect does not inspect tools/call merely because an MCP server uses HTTP. It does not authorize local STDIO servers, validate tool arguments, or prevent execution after a tool server approves an action. Teams need server-side controls for those steps. The boundary lets an engineering team assign each decision to the component that can actually enforce it. MCP security best practices covers complementary controls. Book a demo today.

Frequently asked questions

Does MCP's OAuth authorization cover individual tool calls?

The MCP authorization specification describes token-based access to an HTTP MCP server and requires token audience validation when that flow is used. A valid token does not by itself establish that a caller may run every named tool with every argument. The server must validate its own operation and inputs before execution.

What is the difference between authorizing an MCP connection and authorizing a tool call?

Connection authorization determines whether the client may reach the protected MCP server. Tool-call authorization determines whether the server may execute the selected tool with the submitted arguments for that caller. A valid connection token may coexist with a denied send_email request. Both checks belong to the MCP server or its application authorization layer, separate from an HTTP LLM gateway's model-request policy.

How does per-argument authorization work for a tool call?

The tools/call request carries an arguments object described by the tool's inputSchema. The server validates the input and checks values against the caller's permissions before running the tool. Two read_file calls can differ in risk because their paths differ. That file check cannot be inferred from whether an earlier model request was allowed.

Can DeepInspect authorize an MCP tool call when its transport is HTTP?

No. HTTP transport alone does not make an MCP tools/call request part of DeepInspect's LLM request boundary. DeepInspect evaluates intentionally routed HTTP traffic between authenticated users or agents and LLM endpoints. The MCP server must authorize its own tool calls, whether its transport is HTTP or a local STDIO process. The application must supply identity context for the model request, and the tool server needs its own trustworthy caller context for its decision.

How should an audit connect a model request to a tool call?

Have the application assign a request ID and carry it into the routed model request and the later MCP invocation where possible. Keep each component's timestamp, policy version, caller context, and outcome. The model-request log shows what passed the LLM boundary; the server's log shows whether it allowed the selected tool and arguments. A shared ID supports investigation, but it does not turn one component's decision into the other's authorization.