Agent Builder is available now as a tech preview. Get started with an Elastic Cloud Trial, and check out the documentation for Agent Builder here.
A2A and MCP: the code in action
This is the companion piece to the article “Creating an LLM Agent newsroom with A2A protocol and MCP in Elasticsearch!”, which explained the benefits of implementing both A2A and MCP architectures within the same agent to truly reap the unique benefits of both frameworks. A repository is available should you wish to run the demo on your own.

Let's walk through how our newsroom agents collaborate using both A2A and MCP to produce a news article. The accompanying repository to see the agents in action may be found here.
Step 1: Story assignment
The News Chief (acting as the client) assigns a story:
Step 2: Reporter requests research
The Reporter Agent recognizes it needs background information and delegates to the Researcher Agent via A2A:
Step 3: Reporter requests historical context from Archive Agent
The Reporter Agent recognizes that historical context would strengthen the story. It delegates to the Archive Agent (powered by Elastic's A2A Agent) via A2A to search the newsroom's Elasticsearch-powered article archive:
Step 4: Archive Agent uses Elastic A2A Agent with MCP
The Archive Agent uses Elastic's A2A Agent, which in turn uses MCP to access Elasticsearch tools. This demonstrates the hybrid architecture where A2A enables agent collaboration while MCP provides tool access:
The Archive Agent receives comprehensive historical data from Elastic's A2A Agent and returns it to the Reporter:
This step demonstrates how Elastic's A2A Agent integrates into the newsroom workflow. The Archive Agent (a newsroom-specific agent) coordinates with Elastic's A2A Agent (a third-party specialist) to leverage Elasticsearch's powerful search and analytics capabilities. Elastic's agent uses MCP internally to access Elasticsearch tools, showing the clean separation between agent coordination (A2A) and tool access (MCP).
Step 5: Researcher uses MCP servers
The Researcher Agent accesses multiple MCP servers to gather information:
Step 6: Researcher returns data to Reporter
The Researcher Agent sends comprehensive research back via A2A:
Step 7: Reporter writes article
The Reporter Agent uses the research data and its own LLM capabilities to write the article. During writing, the Reporter uses the MCP servers for style and templates:
Step 8: low confidence triggers Re-Research
The Reporter Agent evaluates its draft and finds that one claim has low confidence. It sends another request to the Researcher Agent:
The Researcher verifies the claim using fact-checking MCP servers and returns updated information:
Step 9: Reporter revises and submits to Editor
The Reporter incorporates the verified facts and sends the completed draft to the Editor Agent via A2A:
Step 10: Editor reviews using MCP tools
The Editor Agent uses multiple MCP servers to review the article:
The Editor approves the article and sends it forward:
Step 11: Publisher publishes via CI/CD
Finally, the Printer Agent publishes the approved article using the MCP servers for the CMS and CI/CD pipeline:
The Publisher confirms publication via A2A:
Here is the complete sequence of the A2A workflow in the accompanying repository using the same Agents described above.
| # | From | To | Action | Protocol | Description |
|---|---|---|---|---|---|
| 1 | User | News Chief | Assign Story | HTTP POST | User submits story topic and angle |
| 2 | News Chief | Internal | Create Story | - | Creates story record with unique ID |
| 3 | News Chief | Reporter | Delegate Assignment | A2A | Sends story assignment via A2A protocol |
| 4 | Reporter | Internal | Accept Assignment | - | Stores assignment internally |
| 5 | Reporter | MCP Server | Generate Outline | MCP/HTTP | Creates article outline and research questions |
| 6a | Reporter | Researcher | Request Research | A2A | Sends questions (parallel with 6b) |
| 6b | Reporter | Archivist | Search Archive | A2A JSONRPC | Searches historical articles (parallel with 6a) |
| 7 | Researcher | MCP Server | Research Questions | MCP/HTTP | Uses Anthropic via MCP to answer questions |
| 8 | Researcher | Reporter | Return Research | A2A | Returns research answers |
| 9 | Archivist | Elasticsearch | Search Index | ES REST API | Queries news_archive index |
| 10 | Archivist | Reporter | Return Archive | A2A JSONRPC | Returns historical search results |
| 11 | Reporter | MCP Server | Generate Article | MCP/HTTP | Creates article with research/archive context |
| 12 | Reporter | Internal | Store Draft | - | Saves draft internally |
| 13 | Reporter | News Chief | Submit Draft | A2A | Submits completed draft |
| 14 | News Chief | Internal | Update Story | - | Stores draft, updates status to "draft_submitted" |
| 15 | News Chief | Editor | Review Draft | A2A | Auto-routes to Editor for review |
| 16 | Editor | MCP Server | Review Article | MCP/HTTP | Analyzes content using Anthropic via MCP |
| 17 | Editor | News Chief | Return Review | A2A | Sends editorial feedback and suggestions |
| 18 | News Chief | Internal | Store Review | - | Stores editor feedback |
| 19 | News Chief | Reporter | Apply Edits | A2A | Routes review feedback to Reporter |
| 20 | Reporter | MCP Server | Apply Edits | MCP/HTTP | Revises article based on feedback |
| 21 | Reporter | Internal | Update Draft | - | Updates draft with revisions |
| 22 | Reporter | News Chief | Return Revised | A2A | Returns revised article |
| 23 | News Chief | Internal | Update Story | - | Stores revised draft, status to "revised" |
| 24 | News Chief | Publisher | Publish Article | A2A | Auto-routes to Publisher |
| 25 | Publisher | MCP Server | Generate Tags | MCP/HTTP | Creates tags and categories |
| 26 | Publisher | Elasticsearch | Index Article | ES REST API | Indexes article to news_archive index |
| 27 | Publisher | Filesystem | Save Markdown | File I/O | Saves article as .md file in /articles |
| 28 | Publisher | News Chief | Confirm Publication | A2A | Returns success status |
| 29 | News Chief | Internal | Update Story | - | Updates story status to "published" |
Conclusion
Both A2A and MCP have important roles to play in the modern augmented-LLM infrastructure paradigm. A2A offers flexibility for complex multi-agent systems but potentially less portability and higher operational complexity. MCP offers a standardized approach for tool integration that's simpler to implement and maintain, though it's not designed to handle multi-agent orchestration.
The choice isn't binary. As demonstrated through our newsroom example, the most sophisticated and effective LLM-backed systems often combine both approaches: agents coordinate and specialize through A2A protocols while accessing their tools and resources through MCP servers. This hybrid architecture provides the organizational benefits of multi-agent systems alongside the standardization and ecosystem advantages of MCP. This suggests that there may not need to be a choice at all: simply use both as a standard approach
It's up to you as a developer or architect to test and determine the best mixture of both solutions to create the right outcome for your specific use case. Understanding the strengths, limitations, and appropriate applications of each approach will enable you to build more effective, maintainable, and scalable AI systems.
Whether you're building a digital newsroom, a customer service platform, a research assistant, or any other LLM-powered application, carefully considering your coordination needs (A2A) and tool access requirements (MCP) will set you on the path to success.
Additional resources
- Elasticsearch Agent Builder: https://www.elastic.co/docs/solutions/search/elastic-agent-builder
- A2A Specification: https://a2a-protocol.org/latest/specification/
- A2A and MCP Integration: https://a2a-protocol.org/latest/topics/a2a-and-mcp/
- Model Context Protocol: https://modelcontextprotocol.io




