Learn · MCP
MCP security and authorization for AI agents
The Model Context Protocol (MCP) lets AI agents call tools on a server. Securing MCP means knowing which agent is calling, whether a named person answers for it, and whether this exact call is allowed, on every request, in front of the tool.
Where MCP deployments go wrong
- Tools open to any caller, or behind one shared key.
- A token that works from any machine once it leaks.
- No record of which agent called which tool, or on whose behalf.
- Tool arguments the server accepts without limits.
Authorization at the MCP layer
Put the check in front of the tools. Each call carries an identity token and a single-use operation proof. The MCP layer verifies both, refuses unknown tools and arguments outside a tool's allow-list, then asks for a signed, single-use decision before the call goes through. That is the enforcement point, and it sits outside the model.
Gateway and Identity MCP
Two customer-run capabilities do the work. Oathera Agent Enrollment (the Identity MCP in the code) sits beside the agent: it enrolls the agent, holds its keys on the host and signs each operation. Oathera Agent Enforcement (the Gateway MCP in the code) sits in front of the tools and verifies each call. A gateway proxy can front MCP servers written in any language, and enforcement can be attached in-process to a Node MCP SDK server.
OAuth 2.1 and MCP
OAuth 2.1 is a common way to authorize MCP clients, and it works alongside this. OAuth answers whether an application may access a resource for a user. It does not by itself prove which agent instance is calling, bind the call to a host, or sign each operation. Oathera adds those layers and federates with Microsoft Entra.
How Oathera helps
Oathera Agent Enforcement runs in your MCP server. A call with no identity token is refused locally, logged and shown in the console so an administrator can enroll or reject the agent. Every decision is recorded, one audit event per call.
Oathera does not verify people, judge model output, inspect or rewrite prompts, or replace your identity provider. Your identity provider and proofing sources do the first; Oathera is the layer under them for agents.
FAQ
How do you secure an MCP server?
Authenticate each agent with its own identity, verify a single-use proof on every call, restrict tools and arguments, and require a signed decision before an enforced call goes through.
What is an MCP gateway?
A component in front of MCP tools that verifies each call before forwarding it.
Is OAuth enough for MCP?
OAuth authorizes an application for a user. It does not prove the calling agent or sign each operation, so teams add per-agent identity and per-call proof.
Does Oathera scan MCP traffic for prompt injection?
No. Content is not scanned. Model-supplied arguments are labelled as agent content and cannot set protected security fields.
Related: Enforce least privilege for an AI agent · Operational boundaries, enforced at runtime · Proof of possession for AI agents
Become a design partner Watch the simulator More guides
← Back to Learn