As AI agents become more widely adopted, the Agent2Agent (A2A) and Model Context Protocol (MCP) specifications continue to evolve, alongside a growing ecosystem of services that implement them. As agents take on more business processes and access more data, establishing secure communication becomes increasingly important.
AI agents do not always complete their work in isolation. Within a single task, an agent may delegate work to a specialized agent through A2A or access tools and data through an MCP server. The official A2A documentation describes A2A as complementary to MCP: the two protocols address distinct but related aspects of agent interactions. The A2A and MCP documentation explains this relationship in A2A ❤️ MCP: Complementary Protocols for Agentic Systems and illustrates their combined use in Example Scenario: The Auto Repair Shop. In systems that combine A2A and MCP communication, differences in the protocols’ security requirements can introduce vulnerabilities.
When authorization is implemented for a remote MCP server using an HTTP-based transport, MCP recommends following its OAuth 2.1-based authorization specification. By contrast, when OAuth is used to protect A2A, PKCE is recommended but not mandatory (A2A §4.5.8), and does not mandate compliance with OAuth 2.1. If the A2A implementation permits less secure authorization flows, access tokens may be stolen and used by third parties. Inadequate token audience validation or downstream delegation can further allow unauthorized access to other MCP servers or API servers. OAuth is only one example: A2A also permits API keys, which can make these security concerns even more pronounced.
This article draws on MCP’s authorization security considerations to examine vulnerabilities and mitigations in systems that combine A2A and MCP. It then proposes an OAuth security baseline for A2A implementations.

A2A and MCP
Source: A2A and MCP.
Protocol versions
This article uses the following versions as the baseline for its analysis. OAuth 2.1 references and section numbers follow draft-13, which is referenced by the MCP 2026-07-28 authorization specification. The article’s core recommendations remain unchanged under OAuth 2.1 draft-17, the latest revision as of November 2026.
| Protocol | Referenced version or document |
|---|---|
A2A | v1.0.1 |
MCP | 2026-07-28 |
OAuth 2.1 | draft-ietf-oauth-v2-1-13 |
Security risks and mitigations
MCP’s security baseline
The MCP authorization specification recommends implementing OAuth 2.1 to authorize access to protected resources over HTTP. Its security baseline draws on the following standards and specifications:
- OAuth 2.1 IETF Draft (draft-ietf-oauth-v2-1-13)
- OAuth 2.0 Bearer Token Usage (RFC 6750)
- OAuth 2.0 Authorization Server Metadata (RFC 8414)
- OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591)*
- Resource Indicators for OAuth 2.0 (RFC 8707)
- OAuth 2.0 Protected Resource Metadata (RFC 9728)
- OAuth 2.0 Authorization Server Issuer Identification (RFC 9207)
- OAuth Client ID Metadata Documents (draft-ietf-oauth-client-id-metadata-document-00)
- OpenID Connect Discovery 1.0
- OpenID Connect Dynamic Client Registration 1.0 (OpenID Connect Registration)
MCP requires MCP clients to specify resource in authorization and token requests and requires MCP servers to validate that tokens are intended for them. It also addresses authorization code protection, secure token storage, encrypted communication, and defenses against attacks during metadata retrieval.
*OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591) is deprecated in MCP and retained for backward compatibility with authorization servers that do not support Client ID Metadata Documents.
Risks in systems that combine A2A and MCP, and mitigations for A2A
The following assessment uses MCP’s security considerations to identify risks in systems that combine A2A and MCP, along with additional protections to implement on the A2A side. A2A implementations should apply protections similar to those used in MCP.
The table evaluates the OAuth security requirements in the A2A specification against those considerations. These assessments describe requirements explicitly defined in the A2A specification, rather than the security of individual implementations.
Assessment legend
- ○: The A2A specification includes the core requirements for this mitigation.
- △: The A2A specification makes the protection optional or discourages the insecure option without prohibiting it, or states the protection without specifying concrete targets or mechanisms.
- ×: The A2A specification does not explicitly define the requirements; protection depends on the implementation.
- -: Not applicable because the consideration does not directly relate to A2A.
| # | MCP security consideration | Related RFCs and specifications | A2A assessment | Risk when combining A2A and MCP | Additional mitigations for A2A |
|---|---|---|---|---|---|
1 | Token Audience Binding and Validation | × | If services accept tokens without distinguishing between those intended for an agent and those intended for an MCP server, a malicious agent can reuse a token it receives against another service. | Agent (A2A/MCP client): Verify that the resource in PRM matches the expected target, and specify A2A server: Because the Agent Card has no standard field that explicitly specifies an OAuth resource identifier, publish PRM with a unique resource identifier and make its URL discoverable to A2A clients through a well-known URL, an A2A extension, a registry/catalog, or a similar mechanism. Authorization server: Validate the requested resource and issue tokens with audiences restricted to authorized targets. | |
2 | Token Theft | △(A2A §7.6.3) | Tokens included in messages, task histories, artifacts, LLM context, logs, or similar locations may be stolen by third parties who can view them. A shared cache can also cause credentials belonging to another user to be selected. The A2A specification recommends secure handling of credentials during transfer; this article describes concrete measures for implementing that protection. | Agent (A2A/MCP client): Store tokens in an encrypted credential store with access controls, and associate them with the user, tenant, issuer, client_id, resource, and granted scopes. Do not include them in Messages or LLM context, and redact them from logs. A2A server: Prevent incoming tokens from leaking into Task histories, Artifacts, LLM context, logs, or similar locations. Store and manage downstream tokens with the same protections. Authorization server: Issue short-lived access tokens. Manage refresh tokens securely and apply refresh token rotation for public clients. | |
3 | Communication Security | ○ (A2A §7.1) | The A2A specification requires encrypted communication in production. If this requirement is not implemented, communication contents and credentials may be exposed. | Agent (A2A/MCP client): Use HTTPS/TLS and validate the destination server certificate. A2A server: Use HTTPS/TLS in production. Authorization server: Provide authorization, token, and other endpoints over HTTPS. | |
4 | Authorization Code Protection | △ | The A2A specification recommends PKCE but does not mandate it. Without PKCE in the Authorization Code flow, an attacker may exchange an intercepted code for an access token. | Agent (A2A/MCP client): Use PKCE (S256) in the Authorization Code flow regardless of the value of `pkceRequired` or whether it is omitted. Verify S256 support through metadata before initiating authorization, and abort if support cannot be confirmed. A2A server: Set Authorization server: Publish S256 support in metadata and enforce PKCE. Validate | |
5 | Mix-Up Attacks | × | An agent using multiple authorization servers may send an authorization code issued by a legitimate server to an attacker’s token endpoint. | Agent (A2A/MCP client): Store the verified issuer and token endpoint together with A2A server: No specific additional mitigation. Authorization server: Include | |
6 | Open Redirection | × | Inadequate redirect URI validation can send authorization codes or other sensitive information to an attacker. Fraudulent authorization URLs within a Task also create a phishing risk. | Agent (A2A/MCP client): Use a registered redirect URI and validate A2A server: When notifying clients of authorization URLs, generate them from verified authorization flows. Do not present externally supplied URLs without validation. Authorization server: Enforce exact matching against registered redirect URIs, while handling the specified port exception for native applications using loopback IP redirects. Do not redirect to an invalid redirect URI. | |
7.1 | Authorization Server Abuse Protection / Metadata SSRF | △ | Malicious metadata or URLs can cause an agent or authorization server to access loopback addresses, cloud metadata services, or internal administrative APIs. Oversized responses can also cause denial of service. | Common protections: Apply protections to every component that accesses URLs derived from external input. Restrict destinations and URI schemes, and validate the IP address resolved at connection time and each redirect target. Limit response sizes, timeouts, and redirect counts. Agent (A2A/MCP client): Apply these protections when retrieving Agent Cards, PRM, authorization server metadata, files, and similar resources. A2A server: Apply these protections to client-specified push notification destinations, downstream destinations and metadata, and similar resources. Authorization server: Apply these protections to OAuth Client ID Metadata Documents (CIMD) themselves and any referenced resources, such as `jwks_uri` and `logo_uri`. | |
7.2 | Localhost Redirect URI Risks | - | × | CIMD alone cannot prevent client impersonation using localhost URLs, so users may mistake the identity of the application they are authorizing. | Agent (A2A/MCP client): No specific additional mitigation. Support attestation if the authorization server requires it. A2A server: No specific additional mitigation. Authorization server: Clearly display the redirect URI hostname on the authorization screen. Additional warnings are recommended for clients whose redirect URIs are limited to localhost; require additional attestation as needed. |
7.3 | Client ID Metadata Trust Policies | - | An attacker-controlled CIMD may contain a name or logo resembling that of a legitimate application, causing users to mistake the identity of the client they are authorizing. Successfully retrieving the metadata does not establish that the client is trustworthy. | Agent (A2A/MCP client) and A2A server: No specific additional mitigation. Authorization server: Establish trust policies for accepting CIMD and registering clients. Do not rely solely on application names or logos; display information such as the client_id hostname on the consent screen. | |
8 | Confused Deputy Problem | × | A malicious A2A client may cause an intermediary agent to misuse a user’s permissions to access downstream services or perform operations that the user did not intend. | Agent (A2A/MCP client): Associate credentials with the user, tenant, and conversation, and check these associations when making requests. Do not select credentials belonging to another user. A2A/MCP server (intermediary agent): Bind Tasks and downstream credentials to attributes such as the authenticated A2A client, user, tenant, issuer, client_id, resource, and scope, and verify these associations when they are used. Do not authorize delegated operations based solely on a Task ID or unverified claims; check permissions for the operation and any required consent. Authorization server: When issuing or exchanging tokens, verify authorization for the target client, resource, and scope, along with any required user consent. | |
9 | Access Token Privilege Restriction / Prohibition of Token Passthrough | × | If an agent forwards a token intended for itself to an MCP server and that server accepts it, the token’s intended usage boundary is lost. A leaked token may also be misused to access the original agent. | Agent (A2A/MCP client): Obtain and use tokens intended for the A2A server being called, with the minimum required scopes. A2A server: Accept only tokens intended for this server. Do not use incoming tokens unchanged for downstream API calls; obtain separate tokens for downstream services. Authorization server: Restrict the audiences and privileges of issued or exchanged tokens to the authorized scope necessary for the operation. |
An example of secure communication across A2A and MCP
As we have shown in the previous table, we recommend applying a security baseline equivalent to MCP authorization to A2A as well. The risks and mitigations above inform the token design and communication flows in the following example.
Secure communication flows
Consider a system that combines A2A and MCP communication as follows.
Scenario
A Planner Agent creates a travel plan and asks a Flight Agent to search for flights matching the user’s preferred dates. The Flight Agent accesses an MCP server operated by a fictional airline, Jet Flight, to retrieve flight information and seat availability.
System architecture
| Component | Domain or environment | Role |
|---|---|---|
User/Browser | User environment | Requests a travel plan and completes any required authentication and consent steps. |
Planner Agent | Domain A | Sends requests to the Flight Agent as an A2A client. |
Flight Agent | Domain A | Receives requests as an A2A server and performs searches as an MCP client. |
Authorization Server A | Domain A | Issues tokens for the Flight Agent. |
Jet Flight MCP Server | Jet Flight Domain | Provides flight information and seat availability. |
Jet Flight Authorization Server | Jet Flight Domain | Issues tokens for the Jet Flight MCP server. |
Access token design
| Access token | Issuer | Audience | Example scope | Purpose |
|---|---|---|---|---|
Token F | Authorization Server A | Flight Agent |
| A2A communication from Planner to Flight |
Token J | Jet Flight Authorization Server | Jet Flight MCP |
| MCP communication from Flight to the external Jet Flight MCP server |
System architecture
An OAuth 2.1-compliant authorization flow for A2A
The Planner Agent submits an A2A task to the Flight Agent within the same domain.
The Planner Agent obtains Token F for the Flight Agent through the Authorization Code flow. In this example, the Planner Agent is a server-side OAuth client that has already been registered. It checks the authorization server metadata for S256 support and validates iss in the authorization response.
The following sequence illustrates an OAuth 2.1-compliant Authorization Code flow with PKCE for A2A.
OAuth 2.1 authorization flow for A2A (part1)
OAuth 2.1 authorization flow for A2A (part2)
- The User/Browser receives responses from the Planner Agent through Server-Sent Events (SSE).
- The Planner Agent receives responses from the Flight Agent through SSE.
A2A and MCP communication across domains
Next, consider a case in which authorization to access Jet Flight MCP becomes necessary while the flight task is running.
When the Flight Agent accesses the Jet Flight MCP Server without Token J, the MCP server typically returns HTTP 401 to indicate that authorization is required. If the token is valid but lacks the required scopes, HTTP 403 with insufficient_scope applies. After receiving a 401 or 403 response, the Flight Agent sets the Task state to TASK_STATE_AUTH_REQUIRED when it cannot resolve the authorization requirement itself and needs the client to take action.
OAuth 2.0 Token Exchange (Token Exchange), OAuth Identity and Authorization Chaining Across Domains (Identity Chaining), and URL Elicitation are approaches relevant to obtaining authorization for services in another domain. Their purposes and prerequisites differ as follows.
| Approach | Primary use | Prerequisites | User interaction |
|---|---|---|---|
Token Exchange | Present an existing token to obtain a token usable at the target service. | The authorization server supports Token Exchange, with trust relationships and policies that allow it to validate and accept the presented token. | Not required |
Identity Chaining | Combine Token Exchange and the JWT Authorization Grant to obtain tokens across domains with an established trust relationship. | Authorization servers in the different domains support this approach and have an established trust relationship. | Not required |
URL Elicitation | Direct the user to an external URL when an action such as additional authentication or consent is required, and use that interaction to obtain authorization for the target service. | A mechanism presents the action URL to the user and connects the outcome of that interaction to the continuation of processing. | Required |
For access from an A2A server to an MCP server in an external domain, Token Exchange and Identity Chaining can be used when the authorization servers have the necessary trust relationship. These approaches cannot be used without that trust relationship.
When that trust relationship has not been established, an Authorization Code flow initiated through a URL Elicitation-style interaction is an option, with the necessary behavior implemented through an A2A Extension or a similar mechanism. A2A provides a framework for notifying clients that authorization is required through the In-Task Authorization state TASK_STATE_AUTH_REQUIRED. However, it does not standardize the URL notification format or the steps for guiding users through URL Elicitation. An implementation therefore needs to define behavior equivalent to MCP URL Elicitation (for example, through an A2A Extension) so that the Flight Agent can obtain an access token through the Authorization Code flow.
Without appropriate safeguards, URL Elicitation can introduce additional security risks, including user substitution.
For example, the users involved in the following three steps are not necessarily the same person:
- The user who authorized access to MCP.
- The user who opened the elicitation URL.
- The user who authorized access to the external service.
An additional check is therefore needed to verify that the user who authorized access to the external service is correctly associated with the user who initiated the original operation. Takashi Norimatsu of Hitachi, Ltd. has proposed using a random session identifier, `sid`, to correlate the original access with the browser interaction as a way to address this issue.
Token Exchange also warrants caution: it may allow Token F to be presented to the Jet Flight Authorization Server as the `subject_token`. This would disclose Token F unchanged to an entity in another domain, which could misuse it to gain unauthorized access. This may conflict with the protection described in Access Token Privilege Restriction (Item 9). Identity Chaining addresses this issue by presenting Token F to the authorization server in the agent's own domain to obtain a JWT assertion intended for the authorization server in the other domain. Only that JWT assertion is then presented to the Jet Flight Authorization Server.
The following sequence illustrates A2A and MCP communication across domains.
Cross-domain A2A and MCP authorization flow
References
- RFC 8693
- Identity and Authorization Chaining, draft-17
- RFC 7523
- MCP URL Mode Elicitation for OAuth Flows
- Potential Issues for Cross-domain Multi-hop API Calls and Their Solution Proposal - Takashi Norimatsu, Hitachi, Ltd.
Conclusion
This article examined security risks in systems that combine A2A and MCP, identified mitigations for the A2A side, and presented examples of secure communication across the two protocols.
In these systems, authorization needs to be designed consistently across the entire communication path, including A2A as well as MCP. To achieve this, we recommend applying a security profile equivalent to MCP authorization, including OAuth 2.1, to A2A implementations.
Appendix: agent cards and OAuth 2.0 security schemes
OAuth configuration is expressed through the Agent Card’s securitySchemes and securityRequirements fields. The following example requires the Authorization Code flow with PKCE for the Flight Agent.
In this example, flight.search represents permission to search for flights.
{
"name": "Flight Agent",
"description": "Searches available flights for a travel plan.",
"version": "1.0.0",
"supportedInterfaces": [
{
"url": "https://flight.example.com/a2a",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"capabilities": {
"streaming": true
},
"defaultInputModes": ["text/plain"],
"defaultOutputModes": ["application/json"],
"securitySchemes": {
"domainAOAuth": {
"oauth2SecurityScheme": {
"oauth2MetadataUrl": "https://auth.example.com/.well-known/oauth-authorization-server",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://auth.example.com/authorize",
"tokenUrl": "https://auth.example.com/token",
"scopes": {
"flight.search": "Search available flights"
},
"pkceRequired": true
}
}
}
}
},
"securityRequirements": [
{
"schemes": {
"domainAOAuth": {
"list": ["flight.search"]
}
}
}
],
"skills": [
{
"id": "flight-search",
"name": "Flight search",
"description": "Searches flights matching the requested itinerary.",
"tags": ["travel", "flight"]
}
]
}References
How agent cards differ from Protected Resource Metadata
Agent Cards and OAuth 2.0 Protected Resource Metadata (PRM), defined in RFC 9728, contain similar information, but serve different purposes. PRM can be used for OAuth-protected resources in general. It publishes information such as the protected resource’s identifier and the authorization servers that protect it.
The following is an example of Protected Resource Metadata.
{
"resource": "https://flight.example.com/a2a",
"resource_name": "Flight Agent",
"authorization_servers": [
"https://auth.example.com"
],
"scopes_supported": [
"flight.search"
],
"bearer_methods_supported": [
"header"
]
}Although Agent Cards and PRM contain similar fields for authorization servers and scopes, the fields have different meanings and representations. The following table summarizes their relationships.
| Comparison | Agent Card field | PRM field | Difference or relationship |
|---|---|---|---|
Endpoint URL / resource identifier |
|
| PRM’s |
Authorization server metadata URL / authorization server identity |
|
| PRM lists the authorization servers’ issuer identifiers. |
Available scopes |
|
| An Agent Card uses a map of scope names to descriptions; PRM uses an array of scope strings. |
Reference
Share
Authors

Yasutaka Mitsumoto
Software engineer at Hitachi, Ltd. and Keycloak contributor, specializing in secure AI agent authorization using MCP, A2A, and OAuth.
View All Posts
Yoshiyuki Tabata
Chief OSS Consultant at Hitachi, Ltd. / CNCF TAG Security and Compliance Tech Lead / CNCF Ambassador / AAIF Ambassador
View All Posts




