VibeKoding / Ensiklopedia Β· Fondasi KuatEnsiklopedia Β· Fondasi Kuat / Principles of AI Agent Protocols: MCP and A2APrinciples of AI Agent Protocols: MCP and A2A
VK

Principles of AI Agent Protocols: MCP and A2APrinciples of AI Agent Protocols: MCP and A2A

πŸ“š Ensiklopedia Β· Fondasi KuatEnsiklopedia Β· Fondasi Kuat 🌏 Dual Bahasa (ID / EN) ⚑ VibeKoding Native

Ensiklopedia VibeKoding: Principles of AI Agent Protocols: MCP and A2A.Ensiklopedia VibeKoding: Principles of AI Agent Protocols: MCP and A2A.

πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

How do AI Agents "talk" to the external world? Just as the internet needs the HTTP protocol, AI Agents also need standardized communication protocols. This chapter introduces the two most mainstream Agent protocols: MCP and A2A, which respectively solve the problems of AI-to-tool and Agent-to-Agent communication.How do AI Agents "talk" to the external world? Just as the internet needs the HTTP protocol, AI Agents also need standardized communication protocols. This chapter introduces the two most mainstream Agent protocols: MCP and A2A, which respectively solve the problems of AI-to-tool and Agent-to-Agent communication.

------

0. Overview of a Protocol0. Overview of a Protocol

In computing, a protocol is a set of standardized rules and conventions that enable different systems and programs to "understand" and "communicate" with each other.In computing, a protocol is a set of standardized rules and conventions that enable different systems and programs to "understand" and "communicate" with each other.

0.1 Motivation for needing Protocols0.1 Motivation for needing Protocols

Imagine this scenario: you send a package to a friend and need to write the address. If everyone wrote addresses in a different format, the courier wouldn't be able to deliver anything. A protocol is the standard that defines "how to write an address" β€” province, city, district, street, house number. Write it this way, and anyone can understand it.Imagine this scenario: you send a package to a friend and need to write the address. If everyone wrote addresses in a different format, the courier wouldn't be able to deliver anything. A protocol is the standard that defines "how to write an address" β€” province, city, district, street, house number. Write it this way, and anyone can understand it.

The same goes for computers. For two programs to communicate, they must agree on:The same goes for computers. For two programs to communicate, they must agree on:

0.2 Common Protocols in Computing0.2 Common Protocols in Computing

ProtocolPurposeYou Use It Every Day
HTTPWeb page transfer protocolOpening web pages in a browser
HTTPSEncrypted HTTPOnline banking, payment pages
TCP/IPInternet foundation protocolAll network communication
DNSDomain name resolutionTranslating google.com into an IP address
SMTPEmail sending protocolSending emails
WebSocketBidirectional real-time communicationChat apps, online games
SSHSecure remote loginConnecting to servers
FTPFile transfer protocolUploading/downloading files

These protocols form the cornerstone of the internet. Without them, you couldn't browse the web, send emails, or watch videos.These protocols form the cornerstone of the internet. Without them, you couldn't browse the web, send emails, or watch videos.

0.3 The Value of Protocols0.3 The Value of Protocols

The core value of protocols lies in standardization and interoperability:The core value of protocols lies in standardization and interoperability:

For example, the HTTP protocol allows Chrome to access Nginx servers, and enables a Python crawler to fetch data from a Java website. Chrome and Nginx don't need to "know" each other β€” they just need to both follow the HTTP protocol.For example, the HTTP protocol allows Chrome to access Nginx servers, and enables a Python crawler to fetch data from a Java website. Chrome and Nginx don't need to "know" each other β€” they just need to both follow the HTTP protocol.

0.4 AI Agents Need Protocols Too0.4 AI Agents Need Protocols Too

For AI Agents to actually "get work done," they need to:For AI Agents to actually "get work done," they need to:

This requires standardized protocols that define "how AI invokes tools" and "how Agents communicate with each other." This is where MCP and A2A come from.This requires standardized protocols that define "how AI invokes tools" and "how Agents communicate with each other." This is where MCP and A2A come from.

------

1. The Layers of Agent Protocols1. The Layers of Agent Protocols

Before diving into specific protocols, let's look at the communication layers in the Agent ecosystem:Before diving into specific protocols, let's look at the communication layers in the Agent ecosystem:

LayerProtocolProblem SolvedAnalogy
1Function CallHow AI calls local functionsThe brain issuing commands
2MCPHow AI connects to external tools and data sourcesUSB-C connector
3A2AHow Agents collaborate and communicateWeChat Work
πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

Layer 1 (Function Call): This is the most fundamental capability of large models β€” triggering function execution by outputting structured data (JSON). It's the foundation of "protocols," but is more of a capability than a formal standard. Layer 2 (MCP): Model Context Protocol, released by Anthropic in November 2024. It standardizes how AI connects to external tools and data sources, just as USB-C unified charging ports across all kinds of devices. Layer 3 (A2A): Agent-to-Agent Protocol, released by Google in April 2025. It enables different Agents to discover, communicate with, and collaborate with each other, just as WeChat Work lets colleagues send tasks and chat.Layer 1 (Function Call): This is the most fundamental capability of large models β€” triggering function execution by outputting structured data (JSON). It's the foundation of "protocols," but is more of a capability than a formal standard. Layer 2 (MCP): Model Context Protocol, released by Anthropic in November 2024. It standardizes how AI connects to external tools and data sources, just as USB-C unified charging ports across all kinds of devices. Layer 3 (A2A): Agent-to-Agent Protocol, released by Google in April 2025. It enables different Agents to discover, communicate with, and collaborate with each other, just as WeChat Work lets colleagues send tasks and chat.

This chapter focuses on the two formal protocols at layers 2 and 3: MCP and A2A.This chapter focuses on the two formal protocols at layers 2 and 3: MCP and A2A.

------

2. MCP (Model Context Protocol)2. MCP (Model Context Protocol)

2.1 Basic Protocol Information2.1 Basic Protocol Information

ItemDetails
Full NameModel Context Protocol
Proposed ByAnthropic
Release DateNovember 25, 2024
Official Documentation[modelcontextprotocol.io](https://modelcontextprotocol.io)
LicenseMIT License
GitHub[github.com/modelcontextprotocol](https://github.com/modelcontextprotocol)
πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

Context is key to how large models understand tasks. The core idea behind MCP is: enabling AI to dynamically obtain the context information it needs, rather than stuffing everything into the Prompt. For example, when AI needs to read a file, you don't need to copy and paste the file content β€” it can access the file system directly through MCP.Context is key to how large models understand tasks. The core idea behind MCP is: enabling AI to dynamically obtain the context information it needs, rather than stuffing everything into the Prompt. For example, when AI needs to read a file, you don't need to copy and paste the file content β€” it can access the file system directly through MCP.

2.2 Background of Its Release2.2 Background of Its Release

In 2024, with the release of Claude 3.5 Sonnet, Anthropic identified a problem: every tool required separate integration.In 2024, with the release of Claude 3.5 Sonnet, Anthropic identified a problem: every tool required separate integration.

Imagine:Imagine:

Each integration requires writing similar code repeatedly: authentication, error handling, data transformation…Each integration requires writing similar code repeatedly: authentication, error handling, data transformation…

Anthropic wrote in their official blog:Anthropic wrote in their official blog:

> "We're introducing the Model Context Protocol (MCP), an open protocol that standardizes how applications provide context to LLMs."> "We're introducing the Model Context Protocol (MCP), an open protocol that standardizes how applications provide context to LLMs."

Core goal: Let tool developers write code once, and have it usable by all MCP-compatible AI applications.Core goal: Let tool developers write code once, and have it usable by all MCP-compatible AI applications.

2.3 Overview of MCP2.3 Overview of MCP

Three Core Capabilities:Three Core Capabilities:

CapabilityDescriptionExample
ToolsFunctions AI can invokeCheck weather, send email
ResourcesData AI can readFile contents, database records
PromptsPredefined prompt templatesCode review template, writing template

2.4 Internal Implementation of MCP2.4 Internal Implementation of MCP

2.5 An Analogy: The USB-C Connector2.5 An Analogy: The USB-C Connector

MCP is like the USB-C connector:MCP is like the USB-C connector:

Tool developers only need to implement an MCP Server once, and all MCP-compatible AI applications (Claude, Cursor, Windsurf, etc.) can use it directly.Tool developers only need to implement an MCP Server once, and all MCP-compatible AI applications (Claude, Cursor, Windsurf, etc.) can use it directly.

2.6 Typical MCP Use Cases2.6 Typical MCP Use Cases

ScenarioDescriptionExample
Local File OperationsLet AI read/modify local filesRead codebases, analyze log files
Database QueriesLet AI query databases directlySQL queries, data analysis
API CallsLet AI call third-party servicesGitHub API, Slack, email
Dev Tool IntegrationLet AI use development toolsGit operations, terminal commands

Real-World Examples:Real-World Examples:

------

3. A2A (Agent-to-Agent Protocol)3. A2A (Agent-to-Agent Protocol)

3.1 Basic Protocol Information3.1 Basic Protocol Information

ItemDetails
Full NameAgent-to-Agent Protocol
Proposed ByGoogle
Release DateApril 9, 2025
Official Documentation[google.github.io/A2A](https://google.github.io/A2A)
LicenseApache 2.0
GitHub[github.com/google/A2A](https://github.com/google/A2A)
πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

Google announced A2A at Cloud Next 2025, closely tied to its enterprise AI strategy. Google believes that the future of enterprise AI is not a single super Agent, but multiple specialized Agents collaborating β€” some responsible for data analysis, some for code generation, some for document processing. These Agents need a standardized way to communicate with each other, and A2A was born.Google announced A2A at Cloud Next 2025, closely tied to its enterprise AI strategy. Google believes that the future of enterprise AI is not a single super Agent, but multiple specialized Agents collaborating β€” some responsible for data analysis, some for code generation, some for document processing. These Agents need a standardized way to communicate with each other, and A2A was born.

3.2 Background of Its Release3.2 Background of Its Release

MCP solved the problem of "how AI connects to tools," but another question remained: how do multiple Agents collaborate?MCP solved the problem of "how AI connects to tools," but another question remained: how do multiple Agents collaborate?

Imagine this scenario:Imagine this scenario:

A user says: "Help me develop a login feature"A user says: "Help me develop a login feature"

Agent A analyzes the requirements and needs to delegate the task to Agent B; Agent B writes the code and needs Agent C to test it. How do they communicate with each other?Agent A analyzes the requirements and needs to delegate the task to Agent B; Agent B writes the code and needs Agent C to test it. How do they communicate with each other?

Google wrote in their official blog:Google wrote in their official blog:

> "A2A is an open protocol that enables AI agents to communicate with each other, facilitating collaboration across different frameworks and vendors."> "A2A is an open protocol that enables AI agents to communicate with each other, facilitating collaboration across different frameworks and vendors."

Core goal: Enable Agents built by different vendors and frameworks to collaborate seamlessly.Core goal: Enable Agents built by different vendors and frameworks to collaborate seamlessly.

3.3 Overview of A2A3.3 Overview of A2A

Three Core Concepts:Three Core Concepts:

ConceptDescriptionAnalogy
Agent CardDescribes an Agent's capabilitiesEmployee badge
TaskA unit of work to be executedWork ticket
MessageCommunication content between AgentsChat history

3.4 Internal Implementation of A2A3.4 Internal Implementation of A2A

3.5 An Analogy: WeChat Work3.5 An Analogy: WeChat Work

A2A is like WeChat Work:A2A is like WeChat Work:

Different Agents are like different colleagues β€” A2A enables them to collaborate on complex projects.Different Agents are like different colleagues β€” A2A enables them to collaborate on complex projects.

3.6 Typical A2A Use Cases3.6 Typical A2A Use Cases

ScenarioDescriptionExample
Software DevelopmentMulti-Agent collaboration on development tasksRequirements β†’ Code β†’ Testing β†’ Deployment
Enterprise WorkflowsAgents from different departments collaboratingHR Agent + Finance Agent + Legal Agent
Intelligent Customer ServiceMultiple specialized Agents dividing workReception β†’ Answers β†’ Transfer β†’ Records
Data AnalysisMultiple Agents collaborating on data analysisCollection β†’ Cleaning β†’ Analysis β†’ Visualization β†’ Reporting

Real-World Examples:Real-World Examples:

------

4. MCP vs A2A: Comparison and Relationship4. MCP vs A2A: Comparison and Relationship

4.1 Core Differences4.1 Core Differences

DimensionMCPA2A
Proposed ByAnthropic (2024.11)Google (2025.04)
PositioningAI-to-tool connectionAgent-to-Agent collaboration
Communication ScopeClient-ServerPeer-to-Peer
Data FormatJSON-RPC 2.0HTTP + JSON
AnalogyUSB-C connectorWeChat Work

4.2 Relationship Between the Two4.2 Relationship Between the Two

MCP and A2A are not competitors, but complements:MCP and A2A are not competitors, but complements:

4.3 Approach to choosing4.3 Approach to choosing

ScenarioChoice
Let AI call local functions or toolsFunction Call
Use third-party tools (databases, APIs, file systems)MCP
Build a multi-Agent collaboration systemA2A
Need both tool integration and multi-Agent collaborationMCP + A2A

------

5. Future Trends for Protocols5. Future Trends for Protocols

5.1 Ecosystem Development5.1 Ecosystem Development

MCP Ecosystem (as of early 2025):MCP Ecosystem (as of early 2025):

A2A Ecosystem (newly released):A2A Ecosystem (newly released):

5.2 The Standardization Process5.2 The Standardization Process

Agent protocols are currently in a "Warring States" period:Agent protocols are currently in a "Warring States" period:

An analogy to the development of the internet:An analogy to the development of the internet:

------

6. Summary6. Summary

πŸ’‘ Tips PraktisπŸ’‘ Pro Tip

| Protocol | One-Line Takeaway | Release Date | Proposed By | Use Case | |----------|-------------------|--------------|-------------|----------| | MCP | The "USB-C" for AI connecting to tools | 2024.11 | Anthropic | Tool integration, data source connection | | A2A | The "WeChat Work" for Agent collaboration | 2025.04 | Google | Multi-Agent collaboration, task delegation | Key Insights: 1. MCP solves the problem of "how AI acquires external capabilities" 2. A2A solves the problem of "how multiple AIs collaborate" 3. The two are complementary and may be used together in the future 4. Choose the protocol based on the specific scenario β€” there is no silver bullet| Protocol | One-Line Takeaway | Release Date | Proposed By | Use Case | |----------|-------------------|--------------|-------------|----------| | MCP | The "USB-C" for AI connecting to tools | 2024.11 | Anthropic | Tool integration, data source connection | | A2A | The "WeChat Work" for Agent collaboration | 2025.04 | Google | Multi-Agent collaboration, task delegation | Key Insights: 1. MCP solves the problem of "how AI acquires external capabilities" 2. A2A solves the problem of "how multiple AIs collaborate" 3. The two are complementary and may be used together in the future 4. Choose the protocol based on the specific scenario β€” there is no silver bullet

------

ReferencesReferences

  1. MCP Official Documentation: [modelcontextprotocol.io](https://modelcontextprotocol.io)MCP Official Documentation: [modelcontextprotocol.io](https://modelcontextprotocol.io)
  2. MCP GitHub: [github.com/modelcontextprotocol](https://github.com/modelcontextprotocol)MCP GitHub: [github.com/modelcontextprotocol](https://github.com/modelcontextprotocol)
  3. Anthropic Announcement Blog: "Introducing the Model Context Protocol" (2024-11-25)Anthropic Announcement Blog: "Introducing the Model Context Protocol" (2024-11-25)
  4. A2A Official Documentation: [google.github.io/A2A](https://google.github.io/A2A)A2A Official Documentation: [google.github.io/A2A](https://google.github.io/A2A)
  5. A2A GitHub: [github.com/google/A2A](https://github.com/google/A2A)A2A GitHub: [github.com/google/A2A](https://github.com/google/A2A)
  6. Google Cloud Blog: "Announcing the Agent-to-Agent Protocol" (2025-04-09)Google Cloud Blog: "Announcing the Agent-to-Agent Protocol" (2025-04-09)