Authentication vs Authorization for AI Agents and MCP Servers

Knowing who an agent is never settles what it may do.

Authentication and authorization solve different problems for AI agents and MCP servers. Authentication establishes who is making a request. Authorization decides whether that identity may do what the request asks. The dangerous mistake is treating either control as a substitute for the other. Both must work at every tool call.

Why authentication and authorization are distinct problems in MCP deployments

MCP separates the AI application, its connections, and the tools it can use. The host works through a client to reach an MCP server, which exposes tools and resources. That creates more than one boundary of trust. Knowing which client connected does not establish what its agent should be allowed to do, and accepting a server into the pipeline does not make everything it supplies safe.

Authentication asks whether the requester is who it claims to be. Authorization asks whether that verified identity has permission for this action. A valid token can answer the first question without answering the second, especially when every authenticated agent receives the same broad access.

Early MCP versions were prone to impersonation and spoofing before token-based authentication was added. Tokens addressed that identity gap, but they did not establish which actions an authenticated agent could perform. An authenticated agent with unrestricted tool access can still escalate privileges, extract data, or invoke tools without permission. The system recognizes the caller but fails to constrain it.

What the absence of both controls looked like in practice — the CVE record

Envoy AI Gateway’s MCP proxy illustrates an authentication failure. It embedded the caller’s JWT subject in each session ID to prevent hijacking, then discarded that identity on resume without comparing it with the current caller. The official Helm chart also shipped a default seed that was publicly known, so session IDs could be forged.

FastMCP’s OAuth client wrappers exposed a different boundary failure. They sent a client secret to whatever authorization server an untrusted MCP server advertised because neither ClientCredentialsOAuthProvider nor PrivateKeyJWTOAuthProvider accepted or forwarded an issuer. A malicious server could direct credentials to its own authorization server. The client acted for a party it should not have trusted. Version 4.1.2 fixed the wrappers, but remediation also requires setting issuer= on those providers and rotating reusable credentials that may have reached an untrusted endpoint.

Other cases combined failures of identity and access control. CVE-2026-33032, known as “MCPwn,” affected nginx-ui MCP, received a CVSS 9.8 rating for authentication bypass, was actively exploited, and was patched March 15, 2026. The MCP TypeScript server SDK exposed a separate cross-client failure in versions 2.0.0 through 2.2.0. Shared transports matched messages to connections by JSON-RPC id alone, while SDK clients numbered requests from 0. Ordinary requests could therefore collide and send one HTTP client’s responses and notifications to another. Version 2.3.0 refuses to share transports.

These were not isolated to one implementation language. Researchers disclosed over 40 CVEs against MCP implementations between January and April 2026 across Python, TypeScript, Java, and Rust SDKs, affecting reference servers and third-party tools. UltraViolet Cyber estimated that hundreds of thousands of vulnerable servers were exposed around the world.

How authentication works in MCP and where it breaks down

The June 2025 MCP specification revision required a separation between the authorization server and the MCP server. The authorization server authenticates users, gathers consent, and issues tokens. The MCP server validates the token on every request.

Correct authentication also depends on who issued a token and where it belongs. The July 2026 revision added mandatory issuer validation under RFC 9207 and required clients to implement PKCE under OAuth 2.1 Section 7.5.2, checking for PKCE support before authorization proceeds. Resource Indicators under RFC 8707 had been required since June 2025 so clients would name the MCP server they meant to reach. A token’s presence alone proves too little.

The FastMCP and Envoy failures show why those distinctions count. FastMCP trusted the wrong party for authorization, while Envoy failed to link a resumed session to the caller using it. By contrast, the reference server @modelcontextprotocol/server-everything required no authentication and was reachable cross-origin. Nothing needed to be bypassed because the identity check was absent.

The specification also leaves some choices to implementers. Passwords, passkeys, and enterprise SSO at the authorization server sit outside MCP’s scope. That deliberate boundary leaves implementers responsible for the adequacy of the chosen login method. The July 2026 revision also deprecated Dynamic Client Registration, or DCR, in favor of Client ID Metadata Documents, or CIMD. DCR still works for backward compatibility, but automatic client registration widens the authentication attack surface until it is removed.

How authorization works in MCP and the specific ways it fails agents

MCP lacks granular access-control enforcement at the field, endpoint, or task level by default. Permission to reach a server can therefore become permission to use far more of it than a task requires. Server access is too coarse a boundary. It can leave an authenticated agent able to reach tools or data outside its intended role.

Two decisions need to remain separate within that boundary. Capability admission controls which tools an agent can see, while execution authorization permits or denies invocation of a particular tool for a particular purpose. Seeing a tool is not permission to use it. Collapsing those decisions makes discovery function as an access grant, without a further check against the action the agent is about to take.

Singapore’s IMDA Model AI Governance Framework for Agentic AI, first published January 2026 and updated May 2026, sets a plain limit. As a rule of thumb, a human user should not be able to give an agent permissions greater than the user has. Enterprise-Managed Authorization, or EMA, addresses another layer of this problem. Promoted to a stable official extension on June 18, 2026, it lets an enterprise identity provider govern which clients can reach which servers on behalf of which users. That governs access relationships, rather than replacing decisions about individual tool invocations.

The rug-pull attack exposes why approval cannot be permanent. A server changes a tool description after user approval, turning a previously scoped permission into an effectively different grant without a new authorization flow. MCP lacks cryptographic content-addressing or version pinning for tool descriptions. Approval can outlive the thing that was approved. A server that was audited once may behave differently later, so a check when it connects cannot cover every future action.

Why closing one gap while leaving the other open produces the most dangerous vulnerabilities

Partial protection creates a false sense of security. A deployment can display OAuth, permission scopes, and approved servers while leaving the link between identity and action unenforced. That is what makes this state particularly dangerous.

The GitHub MCP vulnerability demonstrated authentication without adequate authorization. Crafted repository content enabled indirect prompt injection that led to private data being exfiltrated from other users’ sessions despite OAuth being present. In the reverse case, permission scopes offer no dependable protection when a requester’s identity is never established, as the unauthenticated reference server illustrates.

Confused-deputy attacks bring the two defects together. An MCP proxy connects to third-party APIs using a static client ID with a third-party authorization server, while accepting dynamically registered MCP clients without obtaining per-client consent before forwarding. Authentication passes, but the grant is not correctly scoped to the requesting client. NUS researchers studying MCP servers as active threat actors also found that adversarial developers can implant malicious intent at the component level because acceptance into an agent pipeline does not adequately constrain subsequent server behavior.

Narajala and Habler frame the response as defense-in-depth and Zero Trust, with continuous verification at each tool call. That also makes accountability possible. When agents share an account, a log may identify the account without showing which agent acted or which user delegated the task. Those links must be kept so teams can respond to incidents, review permissions, and report on compliance. Identity and permission must therefore be both enforced and recorded for each action.

What a correct implementation requires — specification mandates and enterprise governance obligations

The protocol requirements translate that principle into checks on tokens, clients, and access relationships. Under the July 2026 specification, MCP servers must reject tokens whose audience claim does not include them. Clients must implement Resource Indicators to name the intended server, and PKCE with a check for support before authorization proceeds. These requirements bind acceptance of a credential to its intended server.

The same revision establishes a transition in client registration and enterprise access. CIMD replaces the deprecated DCR approach, although backward compatibility keeps DCR functioning until a future version removes it. EMA provides an official extension for enterprise identity providers to govern client-to-server access on behalf of users. These protocol controls leave open how the authorization server handles login and what permissions to give for each task.

NIST’s October 2026 principles for AI agent identity and authorization add explicit scope for delegated access, revocable permissions, short-lived credentials, and records of every delegation and policy decision. Session-scoped authorization is an emerging way to put those goals into practice. Access lasts for a specific task rather than persisting through long-lived OAuth tokens. That limits the opportunity for privileges to accumulate. NIST’s Center for AI Standards and Innovation also launched its AI Agent Standards Initiative in February 2026, treating agentic AI as a separate category that needs its own controls.

For enterprises, even the most basic architecture must do more than meet the protocol’s rules. It includes a unique identity for each agent, accountable ownership, task-scoped access, runtime checks before sensitive actions, short-lived credentials, and approval gates for high-impact operations. Tamper-proof audit trails must record delegations, policy decisions, and tool results. A compliant connection does not supply all of that. The unresolved gap is an end-to-end record that ties the delegating user, acting agent, permission decision, and resulting action together.

How a unified platform enforces both controls at the tool-call level rather than at the perimeter

A unified implementation places the identity and permission decision at each tool invocation. SSO, SCIM, and just-in-time credential issuance support that connection to the specific user in the session. The decision is not made against a shared account or a persistent token that accumulated privileges from prior users. Identity follows the action through the system.

The controls apply at the MCP server connection as well as at the network boundary. Disabling automatic approval of tool invocations and enforcing OAuth 2.1 with per-tool scope constraints makes each invocation a permission decision.

Tool poisoning, prompt injection, intent drift, and exfiltration require attention to what the agent is doing. OTEL tracing and tamper-proof audit logs show what happened so teams can spot and investigate threats. Permission alone cannot explain the resulting behavior. The record must connect the action to its identity, scope, and outcome.

The goal is AI adoption across the company within limits that can be enforced. Security teams can support that adoption when the safe path is built into the foundation rather than imposed through friction after deployment. Authentication establishes the actor, authorization limits the action, and the audit trail makes both accountable. None can stand in for the others.