# MCP, A2A और Function Calling: कौन क्या करता है — MCP और Agent-to-Agent Protocols

Source: https://www.geekswithgeeks.com/hi/mcp-a2a/w-landscape

> हर तंत्र को stack में सही जगह रखें।

## तीन अलग परतें

**Function (tool) calling** मॉडल API की सुविधा है: आप functions का वर्णन करते हैं और मॉडल आपसे उन्हें बुलाने को कह सकता है। वह एक application के भीतर रहती है। **MCP (Model Context Protocol)** मानकीकृत करता है कि AI application बाहरी servers द्वारा उपलब्ध **tools, resources (डेटा) और prompts** कैसे खोजे और उपयोग करे, ताकि एक ही tool server कई hosts के साथ चले। **A2A (Agent2Agent protocol)** मानकीकृत करता है कि **स्वतंत्र agents**, जो संभवतः अलग टीमों या vendors ने अलग frameworks पर बनाए हों, एक-दूसरे को कैसे खोजें, **tasks** सौंपें और अपनी आंतरिक संरचना साझा किए बिना परिणाम बदलें। अंगूठे का नियम: **MCP ऊर्ध्वाधर** है (agent से tools और डेटा), **A2A क्षैतिज** (agent से agent)। वे एक-दूसरे के पूरक हैं, और दोनों विनिर्देशों के ब्योरे विकसित होते रहते हैं, इसलिए मौजूदा आधिकारिक दस्तावेज़ देखें।

## Stack

हर हिस्सा कहाँ बैठता है।

```text
                 user
                   |
          [ Host application / agent ]  <---- A2A ---->  [ another agent ]
             |        |                                        (own tools, own model,
         MCP client  MCP client                                 own framework)
             |        |
        MCP server  MCP server
        (orders DB) (calendar)

function calling = how the model inside the host asks for a tool call
MCP              = how the host reaches external tools/data
A2A              = how agents delegate work to each other
```

**Quiz:** कौन-सा कथन सही है?

- [x] MCP agent को tools और डेटा से जोड़ता है; A2A agents को agents से
- [ ] A2A agent को database से जोड़ता है; MCP दो मॉडलों को
- [ ] वे एक ही protocol हैं
- [ ] दोनों LLM की जगह लेते हैं

*Answer:* MCP agent को tools और डेटा से जोड़ता है; A2A agents को agents से. MCP ऊर्ध्वाधर integration है; A2A क्षैतिज सहयोग।
