Skip to main content
Glama

Multi-Agent Collaboration with MCP: How AWS Tackles Inter-Agent Communication

Written by on .

mcp

  1. Agent-to-Agent Communication via MCP
    1. Problem Summary
      1. Intuition
        1. Key Ideas
          1. 1. Agents as Tools
            1. 2. Async Communication Models
              1. a. Client Polling
                1. b. Event-Driven Webhooks
                2. 3. Task-Based Resource Sharing
                  1. 4. Enhanced Tool Annotations
                    1. 5. Higher-Level Abstractions
                    2. Final Thoughts
                      1. Acknowledgements
                        1. References

                          Agent-to-Agent Communication via MCP

                          When agents need to collaborate1, say one agent books your flight while another checks your loyalty rewards—how should they communicate effectively? In this session, Nicholas Aldridge from AWS explored exactly that: how to model agent-to-agent communication using the Model Context Protocol (MCP)1.

                          Problem Summary

                          Most real-world AI applications aren't just single-agent experiences. They involve agents that need to delegate tasks, invoke other agents, and manage complex workflows asynchronously. However, existing protocols often fall short when modeling inter-agent communication and shared state2.

                          Intuition

                          Nicholas proposes that instead of creating an entirely new protocol for agents, we can extend MCP to support agent semantics. The core idea is to treat agents as tools—which allows an agent to invoke another agent by wrapping it in a tool interface1.

                          This reduces complexity, avoids duplication of effort, and lets developers reuse MCP's robust authentication, streaming, and transport features2.

                          Key Ideas

                          1. Agents as Tools

                          Wrap an agent as a tool in MCP by defining the tool method to invoke another agent:

                          // AirlineAgent.java (Spring AI) @Tool(name = "statusCheck", description = "Checks flight status") public class AirlineAgent { public String statusCheck(String flightNumber) { // LLM logic to query airline API return getFlightStatus(flightNumber); } }
                          // MyAssistantAgent.java @Agent public class MyAssistantAgent { @Tool AirlineAgent airlineAgent; public String inquireFlight(String flightNumber) { return airlineAgent.statusCheck(flightNumber); } }

                          2. Async Communication Models

                          Async workflows are tricky. Nicholas outlines two models3:

                          a. Client Polling

                          POST /call_tool { "tool": "longRunningTask", "params": { "data": "..." } } Response: { "task_id": "12345" } GET /task_status/12345 → { status: "processing" } GET /task_status/12345 → { status: "complete", result: ... }

                          b. Event-Driven Webhooks

                          POST /call_tool { "tool": "longRunningTask", "params": { "data": "..." }, "callback_url": "https://my-agent.com/webhook" } // Later from server: POST /webhook { "status": "complete", "result": ... }

                          3. Task-Based Resource Sharing

                          Add states to MCP resources to model progress:

                          { "resource": { "id": "res_7890", "status": "in_progress", "metadata": { ... } } } // Later: GET /resource/res_7890 → status: complete

                          4. Enhanced Tool Annotations

                          Add metadata to help clients understand tool behavior:

                          { "tool": { "name": "GenerateReport", "streaming": true, "stateful": false, "async": true } }

                          5. Higher-Level Abstractions

                          Introduce a FastMCP-style library for agents:

                          const myAgent = new MCPAgent({ tools: [flightStatusTool, bookHotelTool], skillManager: new SkillManager(...), memory: new ConversationHistory() });

                          Final Thoughts

                          Agent-to-agent communication is no longer a futuristic idea. It is a practical requirement. Nicholas shows that MCP is well-positioned to handle these patterns today, and with a few strategic enhancements (like task states, better async, and richer annotations), it could become the dominant protocol for collaborative AI systems2.

                          Acknowledgements

                          This guide is based on Nicholas Aldridge's visionary talk at the Multi-Agent Collaboration in MCP, where he demonstrated how to model agent interactions through the MCP framework. Special thanks to the Anthropic team and the broader MCP developer community for shaping the tools that make this future possible.

                          References

                          Footnotes

                          1. AWS Blog – Open Protocols for Agent Interoperability 2 3

                          2. Model Context Protocol – Official Introduction 2 3

                          3. Google Cloud Blog – New MCP Integrations

                          Written by Om-Shree-0709 (@Om-Shree-0709)