Lesson 2 of 4 Agent Boundaries, Communication and Memory Design

Choosing Communication Protocols: MCP, A2A and Messaging

This lesson compares the Model Context Protocol (MCP), the Agent2Agent (A2A) protocol, in-process framework messaging and Azure messaging services, each suited to a different kind of link in a multi-agent system.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how MCP connects hosts to servers that provide tools, resources and prompts.
  • Describe how A2A agents publish agent cards and exchange tasks.
  • Choose between framework messaging and Azure messaging services.
  • Choose the protocol for each link in a scenario.

Model Context Protocol (MCP)

MCP is an open protocol that standardizes how an AI application (the host, with its MCP client) connects to MCP servers that provide tools, resources and prompt templates. A server describes its tools with names, descriptions and JSON Schemas; the client lists them and calls them. Remote servers use the Streamable HTTP transport with OAuth 2.0 or Microsoft Entra ID authentication, and local servers can use standard input and output. Because the interface is standard, one MCP server can serve Foundry agents, Agent Framework agents, LangGraph agents and coding assistants alike.

True or false

MCP basics

Exam skills 1.1.5

Check how MCP connects agents to tools.

Log in to try this activity Interactive activities are free with an account.

Agent2Agent (A2A)

A2A is an open protocol for communication between independent agents. An agent publishes an agent card (a JSON document at a well-known URL) describing its skills, endpoint, supported input and output types and authentication requirements. A client agent sends messages and creates tasks that can run for a long time, stream updates and return artefacts. A2A treats the remote agent as an opaque peer: the caller does not see its tools or internal state.

In Foundry Agent Service, the A2A tool (preview) lets an agent call a remote A2A endpoint while keeping control of the user conversation, and Foundry agents can also be exposed as A2A endpoints (preview), with A2A protocol version 1.0 recommended for new integrations.

The following diagram contrasts what each protocol connects and what the caller sees.

MCP compared with A2A. With the Model Context Protocol, a host's MCP client connects to MCP servers that expose tools, resources and prompt templates described with JSON Schemas, so the agent sees and calls each tool. With Agent2Agent, an agent publishes an agent card describing its skills, endpoint and authentication; a client agent sends messages and creates long-running tasks that stream updates and return artefacts, and treats the remote agent as an opaque peer whose tools and state it does not see.
MCP connects agents to tools; A2A connects agents to agents.
True or false

A2A basics

Exam skills 1.1.5

Check how A2A connects independent agents.

Log in to try this activity Interactive activities are free with an account.

Framework messaging and Azure messaging

Agents in the same codebase communicate through the orchestration framework: Agent Framework workflow edges carry typed messages between executors, and LangGraph nodes share a typed state. This is fast and type-safe but couples the agents' deployment. Between services, HTTP APIs suit synchronous requests, Azure Service Bus queues and topics suit reliable, ordered, asynchronous work with retries and dead-lettering, and Azure Event Grid suits fan-out of event notifications.

The following table summarizes when to use each option.

LinkProtocolTypical reason
Agent to tool or data sourceMCPReusable tools across agents and frameworks
Agent to independent agentA2ADifferent owners, platforms or release cycles
Agents in one codebaseFramework messagesType safety, no network hop
Durable asynchronous workAzure Service BusRetries, ordering, dead-lettering
Event notificationsAzure Event GridFan-out to many subscribers
Match the pairs

Which link uses which protocol?

Exam skills 1.1.5

Match each kind of link with the protocol or service that suits it.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing protocols

A logistics company has a route-planning agent owned by the operations team, a customs agent built by a partner on another platform, and a shipment-tracking database. Planning must query tracking data and ask the customs agent for clearance estimates, which can take several minutes.

Tracking data is a tool or data source, so it is exposed through an MCP server. The customs agent is an independent peer on another platform with long-running tasks, which fits A2A with its task model and streaming updates. Wrapping the customs agent as an MCP tool would hide the long-running task status, and a direct database connection from the partner would break the partner's encapsulation.

Check yourself

What is the difference between MCP and A2A?

Show answer

MCP connects an agent to tools, resources and prompts. A2A connects agents to other agents as opaque peers, including long-running tasks with streaming updates.

Exam Tips

Remember for the exam

  • MCP: agent to tools, resources and prompts. A2A: agent to agent as opaque peers.
  • A2A tasks support long-running work with streaming updates.
  • Service Bus for durable asynchronous hand-offs; Event Grid for notifications.