What Are AI Agent Protocols (MCP & A2A)? How Multi-Agent Collaboration Works

What Are AI Agent Protocols (MCP & A2A)? How Multi-Agent Collaboration Works

Lead

MCP (Model Context Protocol) and A2A (Agent-to-Agent Protocol) are communication specifications that enable AI agents to interact with tools and other agents.

In multi-agent systems, multiple agents divide responsibilities to handle complex tasks. A "common language" between agents is essential for this purpose, yet resources that systematically explain the underlying mechanisms remain scarce, leaving many engineers uncertain during the design phase.

This article organizes the roles, architectures, and criteria for choosing between MCP and A2A. It is aimed at engineers considering the design of multi-agent systems and those looking to grasp the fundamentals of AI agent integration, with explanations accompanied by concrete structures.

The era of AI agents operating in isolation has given way to an era where they handle tool calls and task delegation to other agents. The "common conventions" that make these complex interactions possible are AI agent protocols, with MCP (Model Context Protocol) and A2A (Agent-to-Agent Protocol) being prime examples.

Background on the Need for the Protocol

The mainstream use of AI was once "question-and-answer with a single model." However, as business operations grew more complex, there emerged a need for end-to-end workflows combining file reading, external API calls, and search lookups.

Because each tool had its own unique interface, the following challenges arose:

  • Every time AI was connected to an external system, a custom adapter implementation was required
  • Connectors built by one team could not be reused by another
  • Similar implementations proliferated and duplicated across the organization

Furthermore, the dimension of the problem shifted when multi-agent systems—where AI agents autonomously call multiple tools or delegate tasks to other agents—became a practical reality. The issue was no longer simply "differences in how APIs are called"; it required a deeper level of agreement on how agents share intent and task state with one another. Against this backdrop, momentum has been building across the industry to establish common specifications.

Differences Between Inter-Agent Communication and Tool Calls

"Tool Calling (Function Calling)" and "agent-to-agent communication" are often confused, but their roles are entirely different. The distinction between how MCP and A2A are used is grounded in this difference.

Tool Calling is an operation in which an agent requests processing from an external function. Typical examples include web search, database lookup, and calendar registration. The tool itself makes no decisions — it simply returns a fixed result.

Agent-to-agent communication involves a counterpart that is also capable of reasoning, judgment, and planning. It entails bidirectional exchanges such as task delegation, progress reporting, and intermediate feedback.

The key differences between the two are as follows:

  • Autonomy: Tools operate passively, while agents act based on their own judgment
  • State retention: Tool calls are essentially stateless, whereas agent-to-agent communication can maintain sessions and context
  • Communication direction: Tool calls are unidirectional, while agent-to-agent communication can be asynchronous and bidirectional

This distinction directly ties into the division of roles between MCP and A2A, which will be explained in the following sections.

Why Is Protocol Standardization Important Now?

The more widely AI agents are adopted, the more the design cost of "connective tissue" between tools emerges as a challenge. Even if individual agents are high-performing, overall system productivity will stagnate if the mechanisms for coordination remain fragmented. This is precisely why standardization is attracting attention.

Problems Caused by Siloed AI Tools

When deploying multiple AI tools in parallel, dedicated glue code must be written for each integration. This is because each tool has its own API schema, authentication method, and data format — a phenomenon known as "AI tool siloization."

Siloization creates three main problems:

  • Increased integration costs: As the number of tools grows, the combinations of pairwise integrations multiply rapidly. The volume of connection code that must be managed tends to expand proportionally.
  • Context fragmentation: Passing information between agents without a common format makes conversion errors and information loss more likely. There is an increased risk of downstream agents operating on incorrect assumptions, causing errors to cascade.
  • Difficulty in maintenance and monitoring: Custom connection code requires modification every time a tool is updated. Without a standardized log format, identifying the root cause of failures becomes difficult.

The "handle each case individually" approach that was acceptable in the single-tool era accumulates as technical debt in multi-agent systems. The discussion around protocol standardization has emerged against the backdrop of this real-world pain.

Interoperability Benefits of Standard Protocols

When standard protocols are established, the benefit of "reusing integrations built once, anywhere" emerges. Just as the unification of the USB standard brought about a "plug and play" experience, a similar shift is underway in the world of AI agents.

The three main benefits are as follows:

  • Reduced development costs: Once an adapter conforming to a standard interface is prepared, new tools can be integrated using the same calling convention without writing additional glue code for each one.
  • Ecosystem expansion: When a specification is made public, tool vendors and OSS communities begin developing and releasing their own connectors. The rapid emergence of multiple third-party server implementations shortly after the MCP specification was published is a prime example.
  • Easier debugging and monitoring: When communication formats are unified, log structures become consistent, making it easier to trace which tool call caused an error.

However, realizing the benefits of interoperability comes with the prerequisite of "continuously maintaining protocol-compliant implementations." Keeping up with specification version upgrades and addressing security requirements are points to keep in mind as ongoing obligations even after standardization.

What Kind of Protocol is MCP?

MCP (Model Context Protocol) is a connectivity standard released as open source by Anthropic that connects AI models with external tools and data sources. This article walks through everything step by step, from the architectural structure to real-world integration examples.

MCP Architecture and the Host-Client-Server Relationship

MCP is composed of three layers — "Host," "Client," and "Server" — and is characterized by a design that clearly separates their respective roles.

  • Host: The application layer operated by the user. The environment itself in which the AI assistant runs, such as Claude Desktop or VS Code extensions.
  • Client: An intermediary embedded within the host that communicates with the server via JSON-RPC. It is responsible for retrieving the list of tools, invoking them, and receiving results.
  • Server: The layer that provides access to actual tools and data sources, such as file systems, external APIs, and databases.

The key point is that the server does not need to know anything about the internals of the calling host. By simply returning responses that conform to the MCP specification, it can handle calls from any host.

The communication flow proceeds in the following order: the host receives a task, the client requests a list of tools from the server, the LLM determines which tool to use, the client sends the invocation, and the server returns the result. Through a capability exchange at startup, the host can dynamically discover the tool configuration of the connected server.

What MCP Can and Cannot Do

Understanding the scope of what MCP can and cannot do helps prevent misalignment during design.

What MCP Can Do

  • Tool Calling (Function Calling): File read/write, DB queries, and external API calls can be defined as "Tools primitives," allowing the model to invoke them dynamically
  • Resource Provision: Static context such as files and documents can be passed to the model via "Resources primitives"
  • Prompt Template Management: Frequently used instructions can be centrally managed and reused on the server side through "Prompts primitives"

What MCP Cannot Do

MCP is a protocol specialized in "vertical communication" — connecting models with tools and resources. It does not support "horizontal communication," where multiple AI agents delegate tasks to one another.

Session management and state persistence for long-running tasks also fall outside MCP's responsibilities and must be designed separately at the application level. It is most appropriate to position MCP as an "interface standard for tool connectivity."

Examples of Claude Code / OpenClaw and MCP Integration

Claude Code is a coding-focused AI agent provided by Anthropic. By connecting to external tools via MCP, it can directly invoke operations such as reading and writing the filesystem, executing shell commands, and manipulating Git repositories from the agent.

Here is a concrete picture of how it works in practice:

  • In response to an instruction like "fix only the failing tests," it autonomously handles file lookup via the MCP server → test execution → result reception → code modification
  • Since each operation is structured according to tool definitions, "what to call and how" can be explicitly declared

OpenClaw is one open-source implementation of MCP, designed to simplify the construction and management of MCP servers. It can wrap existing API endpoints as MCP tools and convert them into a form callable from compatible clients, including Claude Code.

The key to both integrations is the precision of tool definitions. When tool names, parameters, and descriptions are ambiguous, there is a tendency for agents to make incorrect calls. Carefully writing out the schema is the most direct path to achieving the intended behavior.

What Kind of Protocol is A2A?

If MCP is a "vertical connection" linking AI to tools, then A2A (Agent-to-Agent Protocol) is a "horizontal connection" linking agents to one another. The following section explains the mechanism for task delegation, execution, and reporting across different frameworks.

A2A Design Philosophy and the Mechanism of Inter-Agent Task Delegation

A2A (Agent-to-Agent Protocol) is an open specification proposed by Google, built on the philosophy of "creating a common language that allows agents to communicate with each other as equals." While MCP connects AI with tools, A2A is distinguished by treating agents themselves as the primary subjects of communication.

The core of its design is JSON-formatted metadata called an Agent Card, which describes the following information:

  • Supported skill types
  • Accepted endpoints
  • Supported authentication methods

The calling party first retrieves the Agent Card, confirms the counterpart's capabilities, and then decides whether to delegate a task. This follows a flow that can be described as "exchanging business cards before making a request."

Task delegation is initiated by sending a task object over HTTP, and when processing takes time, streaming delivery is handled via Server-Sent Events or WebSocket. Multipart messages that mix text, files, and structured data are also supported.

As the specification is still new, it is recommended to check the official documentation for the latest updates before adoption.

The Role of A2A in Agent Orchestration

Agent orchestration is a mechanism that assigns subtasks to multiple AI agents and integrates their outputs to achieve an overall goal. A2A standardizes this flow of "delegation and response."

The main functions A2A fulfills in orchestration are as follows:

  • The orchestrator references Agent Cards to select the appropriate specialist agent
  • It sends requests specifying the task content and expected output format
  • It tracks the progress of long-running tasks through status management: submittedworkingcompleted

A major strength is that agents built on different frameworks or in different languages can work together, since neither side needs to know the other's internal implementation.

On the other hand, if task granularity is too fine, the overhead of delegation accumulates and processing tends to slow down. The boundary design—determining how much a single agent handles versus when to delegate—is what determines both performance and maintainability.

How Should MCP and A2A Be Used Differently?

MCP and A2A differ fundamentally in their "granularity of communication." The design decision of whether to call a tool or delegate a task to an agent is what determines which one to choose.

Criteria for Deciding Between Tool Calls (MCP) and Agent Delegation (A2A)

The starting point for decision-making is "whether the executing subject changes."

When to choose MCP:

  • Actions that complete in a single step, such as database searches, file operations, or external API calls
  • When the agent retains control and continues making decisions after receiving tool results

When to choose A2A:

  • When transferring ownership of a task to another agent entirely
  • When additional decision-making may arise during execution
  • When the callee needs to maintain state such as conversation history or intermediate artifacts

The two are not in conflict. A hierarchical structure naturally emerges where a sub-agent that has received a delegation via A2A calls tools via MCP to carry out its own tasks. Thinking of it as "divide roles with A2A, supplement capabilities with MCP" makes it easier to plan your system design.

Correspondence with Design Patterns in Multi-Agent Systems

Here, we organize representative design patterns for multi-agent systems and how they map to MCP and A2A.

Orchestrator/Worker Pattern A configuration in which a central agent distributes tasks to multiple workers. A two-layer structure fits naturally here: A2A for instructions from the orchestrator to workers, and MCP for when each worker accesses external tools. Separation of responsibilities is easy to define clearly, making this pattern a practical starting point for adoption.

Pipeline Pattern A2A handles handoffs between agents, while MCP supplements external data access at each step. When processing involves only straightforward data transformation, there are cases where MCP alone is sufficient.

Flat Collaboration Pattern This is the pattern most closely aligned with the design philosophy of A2A. Peer agents dynamically delegate tasks to one another while referencing Agent Cards, with MCP handling individual tool access. While this offers high flexibility, it is worth noting that tracking which agent made which decision can become difficult.

Security Considerations When Using Protocols

When bringing MCP and A2A into production, security design is just as essential as functional design. External tool calls and task delegation paths between agents can directly become attack surfaces, making appropriate countermeasures necessary.

Prompt Injection Risks and AI Guardrail Configuration

In external integrations via MCP and A2A, Prompt Injection is a realistic threat. It is an attack technique where malicious text is embedded within tool outputs to alter the behavior of an LLM. In multi-agent configurations, particular care is needed as contaminated outputs can easily propagate in a chain to subsequent agents.

The foundation of countermeasures is designing AI Guardrails in two layers: input and output.

  • Input side: Treat externally retrieved content as "untrusted data" and explicitly separate it from the system prompt
  • Output side: Cross-reference actions an agent attempts to execute against an allowlist, and automatically block any operations not on the list

In addition, the principle of least privilege is also important. By narrowing the granularity of permissions at the MCP server scope design and Agent Skills definition stages—such as not granting write permissions to read-only tasks—the effectiveness of guardrails is enhanced.

Authentication and Access Control with OIDC Token

In multi-agent environments, authentication and authorization design tends to be deferred. However, leaving ambiguous "who can access which resources with what permissions" creates the risk of unintended privilege escalation and tool invocations.

The A2A specification assumes the use of OIDC Tokens as the authentication mechanism between agents. When an orchestrator delegates tasks to sub-agents, attaching a JWT-based token to the request header allows the receiving side to verify the legitimacy of the caller. The same approach is effective for access control to MCP servers.

The following three points are often overlooked during implementation:

  • Token expiration management: In long-running workflows, tokens may expire mid-task
  • Automatic renewal flow: Incorporate refresh token renewal processing into the agent lifecycle
  • Principle of least privilege: Narrow the scope for each agent and avoid granting unnecessary permissions

Establishing role-based permission design in the early stages can significantly reduce rework later on.

What Are Common Misconceptions?

While interest in MCP and A2A continues to grow, there are also some misguided assumptions being observed in practice. Here, we will clarify two common misconceptions that are frequently heard.

MCP is not a replacement for APIs

MCP is not a "replacement" for REST APIs or GraphQL — it serves a fundamentally different purpose.

Existing APIs are general-purpose interfaces responsible for data exchange between applications. MCP specializes in describing and conveying, in a format that LLMs can interpret, which tools are available to AI agents and how to invoke them.

To clarify how they relate in practice:

  • Existing API endpoints remain as-is
  • The MCP server sits on top of the API as a thin wrapper
  • Only the interface with the agent is standardized

For example, when working with the GitHub API, the primary task is not rewriting the API itself, but rather redefining operations — such as "search repositories" or "create a PR" — as tool definitions that agents can more easily interpret.

Leaving this misconception unaddressed tends to create unnecessary overhead from managing MCP and APIs as two separate systems. The practical approach to adoption is to position MCP as an adapter layer that complements your existing APIs.

A2A is not dependent on a specific LLM

"A2A is a specification tied to a specific LLM or framework" — this is one of the most common misconceptions.

A2A adopts a design where communication is established via HTTP-based JSON messages, regardless of the type of LLM running internally. The key points are as follows:

  • Agents with different backends — such as GPT, Gemini, Claude, or open-weight models — can communicate with each other as long as they conform to the Agent Card specification
  • The orchestrator side can delegate tasks by looking only at the input/output interface, without being aware of the counterpart's model implementation
  • The design strongly accounts for multi-vendor environments where multiple models are used selectively based on cost, accuracy, and latency considerations

However, "model-agnostic" and "runs as-is in any environment" are two different things. Whether task delegation succeeds or fails depends on the accuracy of the Agent Card description and the implementation quality of each agent. The protocol provides a common language, but whether it is used correctly is the responsibility of the implementation.

Introduction Steps: How to Try the MCP Server for the First Time

Once you understand the concept of MCP, the quickest way to deepen your understanding is to get hands-on and experience it yourself. This section walks you through the steps to start a server in a local environment, followed by how to define and test Agent Skills.

Steps to Start the MCP Server in a Local Environment

If you want to try MCP locally, a minimal setup using the Python SDK is a good starting point.

Steps to Get Up and Running

  • Prepare a Python 3.10 or higher environment and install the SDK with pip install mcp
  • Define a function decorated with @mcp.tool() and it will be automatically registered as a tool
  • Start the server with python server.py. The default transport is stdio (standard input/output)

Tips for Verifying Behavior

Once the server is running, you can use the official CLI tool MCP Inspector to view the list of available tools and invoke them manually in your browser. It is particularly useful for diagnosing early issues such as "the configuration seems correct, but there is no response."

Connecting to a Host Application

To connect to a host application such as Claude Desktop, simply add the startup command and path to the configuration file and it will be recognized automatically. A practical approach — from the perspective of making issues easier to identify — is to first confirm communication over stdio, then migrate to HTTP+SSE as needed.

How to Define and Test Agent Skills

Once the MCP server is up and running, proceed to defining Agent Skills. A skill is a unit of functionality that can be invoked externally by an agent, and consists of the following three elements:

  • Name: An identifier used during routing
  • Description: The basis on which the LLM determines "when it should be used"
  • Input/Output Schema: Types explicitly defined using JSON Schema or Pydantic models

Writing descriptions that cover not only "what it can do" but also "in what situations it should be used" improves the orchestrator's selection accuracy. Leaving descriptions vague tends to lead to incorrect task delegation choices.

Testing is easier to manage when approached in two stages:

  1. Unit Testing: Send requests directly to the MCP endpoint using curl or Python's httpx to verify response types and error handling
  2. Integration Testing: Using test prompts, verify in an end-to-end flow that the LLM correctly selects the appropriate skill, fills in the parameters, and can interpret the results

As the number of skills grows, it is also important to periodically review whether descriptions have become too similar to one another. Overly similar descriptions are a breeding ground for incorrect selections.

Frequently Asked Questions (FAQ)

Frequently Asked Questions (FAQ)

As one learns about MCP and A2A, the question "What makes these different from existing mechanisms?" naturally arises. Here, we focus on two questions that tend to come up most often in practice.

How is Function Calling Different from MCP?

Tool calling (Function Calling) is a mechanism where an LLM outputs its intent to "execute this function" in JSON format, which the application then processes. Since each LLM provider implements this independently, the specifications for schema definitions and error handling differ from provider to provider.

The main differences from MCP can be summarized in the following three points.

  • Presence of an independent layer: MCP standardizes tool definitions, communication, and authentication by decoupling them from LLM providers. It can be called through a unified interface from compatible hosts such as Claude, GPT, and Gemini.
  • State management: Function Calling is stateless per request, whereas MCP maintains sessions and is designed with multi-turn state persistence in mind.
  • Schema reusability: Function Calling requires rewriting schemas for each provider, whereas MCP tends to significantly reduce that overhead.

The two are not in competition. In many cases, MCP hosts internally use Function Calling to generate calls to MCP servers, making the relationship complementary in practice. It is easier to understand if you think of it this way: Function Calling is "the means by which an LLM communicates what it wants to call," while MCP is "the common foundation for how tools are provided and managed."

Is A2A Necessary Even for Small Teams?

It is more appropriate to judge based on "what you want it to do" rather than team size. A2A truly shines only in scenarios where multiple specialized agents operate in parallel or in sequence.

Cases Where A2A Should Be Considered

  • You want to assign separate agents to each stage, such as "research → summarization → report generation"
  • An agent needs to issue instructions to another agent
  • You want tasks handed off without human approval

Cases Where MCP Is Sufficient

  • A single agent calling external tools is enough to complete the work
  • Design and operational resources are limited

Introducing A2A tends to increase operational complexity, including the definition of Agent Skills and task state management. There are reports of cases where smaller teams find the maintenance costs unjustifiable. If you answer "Yes" to any of the criteria above, it is worth considering the design; otherwise, the practical choice is to prioritize stability in your MCP environment and keep A2A on the back burner as a future expansion option.

Summary: 3 Key Points for Understanding AI Agent Protocols

Summary: 3 Key Points for Understanding AI Agent Protocols

Here are the three key points summarized from what we've covered so far.

Point 1: MCP is a "common language connecting agents and tools"

What MCP solves is the integration cost incurred when AI agents call external tools and data sources. Once an MCP server is implemented, its tools can be reused by any compatible agent.

Point 2: A2A is a "protocol for agents to collaborate with one another"

If MCP handles vertical integration for tool calls, A2A enables horizontal integration between agents. Its design philosophy—free from dependency on any specific LLM or runtime environment—supports the flexible scaling of multi-agent systems.

Point 3: Security and architecture cannot be deferred

The more protocols you introduce, the broader the attack surface of your system becomes. Access control via OIDC tokens and the configuration of AI guardrails are matters that should be addressed at the same priority as—or even before—performance tuning.

The specifications are still evolving. The quickest way to turn abstract concepts into tangible understanding is to start by running a single MCP server in your local environment.

Author & Supervisor

Yusuke Ishihara

Yusuke Ishihara

Started programming at age 13 with MSX. After graduating from Musashi University, worked on large-scale system development including airline core systems and Japan's first Windows server hosting/VPS infrastructure. Co-founded Site Engine Inc. in 2008. Founded Unimon Inc. in 2010 and Enison Inc. in 2025, leading development of business systems, NLP, and platform solutions. Currently focuses on product development and AI/DX initiatives leveraging generative AI and large language models (LLMs).