English
What problem does this solve?
A2A is good at one thing: letting an agent hand a task to another agent. It has no answer for a different, equally common need — an agent that must read a file, hit a database, or run a local calculation itself, without another agent in the loop. Building a bespoke integration for every such tool does not scale. This walkthrough continues studying the open-source theailanguage/a2a_samples reference implementation.
How the mechanism works
MCP standardizes exactly that: how an agent process loads external tools. An MCP server runs as a subprocess and communicates over stdio — standard input and output — so no extra network port has to be opened or secured. The Host Agent connects to it, asks for its list of available tools, and wraps each one as an async function Gemini can call like any other tool.
The result is a Host Agent with two categories of tool side by side: A2A tools (list agents, delegate a task) for talking to other agents, and MCP tools (read a file, query data) for acting on the system directly. Asking "what time is it" triggers the A2A path to TellTimeAgent; asking to "list the files in this folder" triggers the MCP path instead — the model picks the right category on its own.
Trade-offs and alternatives
The benefit is a clean separation of concerns: agent-to-agent communication and agent-to-system tool access use two purpose-built protocols instead of one protocol stretched to cover both. The trade-off is more moving parts to run and monitor — the Host Agent now manages an MCP subprocess lifecycle in addition to its A2A HTTP calls.
The alternative some teams try is exposing system operations as fake "agents" over A2A just to reuse one protocol everywhere. That avoids learning a second protocol, but it's a misuse of A2A's task model for something that was never meant to be a multi-turn conversation.
Conclusion
Two protocols, two jobs: A2A for agent-to-agent conversation, MCP for agent-to-tool access. Combined, they give one agent both a social life and hands to act with — which is what most real automation actually needs.