Skip to content

بروتوكولات وكيل الذكاء الاصطناعي (MCP و A2A)

السؤال الأساسي

كيف "يتحدث" وكلاء الذكاء الاصطناعي مع العالم الخارجي؟ تماماً كما يحتاج الإنترنت إلى بروتوكول HTTP، يحتاج وكلاء الذكاء الاصطناعي أيضاً إلى بروتوكولات اتصال موحدة. يقدم هذا الفصل بروتوكولين رئيسيين: MCP و A2A، يحلان مشاكل التواصل بين الذكاء الاصطناعي والأدوات، وبين الوكلاء أنفسهم.


0. ما هو البروتوكول؟

في مجال الحوسبة، البروتوكول (Protocol) هو مجموعة من القواعد والاتفاقيات الموحدة التي تتيح لأنظمة وبرامج مختلفة "الفهم" و"التواصل" فيما بينها.

0.1 لماذا نحتاج البروتوكولات؟

تخيل موقفاً: تريد إرسال طرد لصديق وتحتاج إلى كتابة العنوان. لو كان كل شخص يكتب العنوان بشكل مختلف، لن يتمكن ساعي البريد من التسليم. البروتوكول هو المعيار الذي يحدد "كيفية كتابة العنوان" — المحافظة، المدينة، الحي، الشارع، رقم المنزل؛ عند الكتابة بهذا الشكل، يمكن للجميع الفهم.

الحواسيب أيضاً كذلك. لكي يتواصل برنامجان، يجب الاتفاق على:

  • ما هو تنسيق البيانات؟ (JSON؟ ثنائي؟)
  • كيف يتم إنشاء الاتصال؟ (عملية المصافحة)
  • ماذا نفعل عند حدوث خطأ؟ (معالجة الأخطاء)

0.2 البروتوكولات الشائعة في الحوسبة

البروتوكولالوظيفةتستخدمه يومياً
HTTPبروتوكول نقل الويبالمتصفح يفتح صفحات الويب
HTTPSHTTP مشفرالخدمات المصرفية، صفحات الدفع
TCP/IPبروتوكول الإنترنت الأساسيجميع اتصالات الشبكة
DNSبروتوكول تحليل أسماء النطاقاتتحويل google.com إلى عنوان IP
SMTPبروتوكول إرسال البريدإرسال البريد الإلكتروني
WebSocketاتصال ثنائي الاتجاه في الوقت الفعليبرامج الدردشة، الألعاب عبر الإنترنت
SSHتسجيل الدخول عن بُعد بشكل آمنالاتصال بالخوادم
FTPبروتوكول نقل الملفاترفع/تنزيل الملفات

تشكل هذه البروتوكولات حجر الأساس للإنترنت. بدونها، لا يمكنك تصفح الويب أو إرسال البريد أو مشاهدة الفيديو.

0.3 قيمة البروتوكولات

القيمة الأساسية للبروتوكولات هي التوحيد والتشغيل البيني:

  • التوحيد: يعمل الجميع وفق نفس القواعد، مما يقلل تكاليف الاتصال
  • التشغيل البيني: يمكن للأنظمة من موردين وتقنيات مختلفة التواصل بسلاسة

على سبيل المثال، يتيح بروتوكول HTTP لمتصفح Chrome الوصول إلى خوادم Nginx، ولمتتبع بايثون جمع البيانات من مواقع جافا. لا حاجة لأن "يتعارف" Chrome و Nginx، فقط يلتزمان ببروتوكول HTTP.

0.4 وكلاء الذكاء الاصطناعي يحتاجون البروتوكولات أيضاً

لكي يتمكن وكلاء الذكاء الاصطناعي من "العمل" فعلياً، يحتاجون إلى:

  • استدعاء أدوات خارجية (التحقق من الطقس، إرسال البريد، تشغيل قواعد البيانات)
  • التعاون مع وكلاء آخرين (تقسيم العمل لإكمال المهام المعقدة)

هذا يتطلب بروتوكولات موحدة تحدد "كيف يستدعي الذكاء الاصطناعي الأدوات" و"كيف يتواصل الوكلاء فيما بينهم". هذا هو أصل MCP و A2A.


1. مستويات بروتوكولات الوكلاء

قبل التعمق في البروتوكولات المحددة، دعونا نلقي نظرة على مستويات الاتصال في نظام الوكلاء:

المستوىالبروتوكولالمشكلة التي يحلهاالتشبيه
1Function Callكيف تستدعي الذكاء الاصطناعي الدوال المحليةالدماغ يصدر التعليمات
2MCPكيف تتصل الذكاء الاصطناعي بالأدوات ومصادر البيانات الخارجيةواجهة USB-C
3A2Aكيف يتواصل الوكلاء ويتعاونون فيما بينهموي تشات للمؤسسات

شرح الجدول سطراً بسطر

المستوى 1 (Function Call): هذه القدرة الأساسية للنماذج الكبيرة — تفعيل تنفيذ الدوال من خلال توليد بيانات منظمة (JSON). هي أساس "البروتوكولات"، لكنها في حد ذاتها أشبه بالقدرة من البروتوكول المعياري.

المستوى 2 (MCP): Model Context Protocol، أصدرته Anthropic في نوفمبر 2024. يوحّد طريقة اتصال الذكاء الاصطناعي بالأدوات ومصادر البيانات الخارجية، تماماً كما وحدت USB-C منافذ الشحن للأجهزة المختلفة.

المستوى 3 (A2A): Agent-to-Agent Protocol، أصدرته Google في أبريل 2025. يتيح للوكلاء المختلفين اكتشاف بعضهم البعض والتواصل والتعاون، تماماً كما يتيح وي تشات للمؤسسات للزملاء توزيع المهام والدردشة.

يركز هذا الفصل على البروتوكولين الرسميين في المستويين 2 و3: MCP و A2A.


2. MCP (Model Context Protocol)

2.1 المعلومات الأساسية للبروتوكول

العنصرالمحتوى
الاسم الكاملModel Context Protocol
المبادرAnthropic
تاريخ الإصدار25 نوفمبر 2024
الوثائق الرسميةmodelcontextprotocol.io
ترخيص المصدر المفتوحMIT License
GitHubgithub.com/modelcontextprotocol

لماذا سُمي "Context Protocol"؟

السياق (Context) هو المفتاح لفهم النماذج الكبيرة للمهام. الفكرة الأساسية لـ MCP هي: تمكين الذكاء الاصطناعي من الحصول ديناميكياً على معلومات السياق المطلوبة، بدلاً من حشر كل المعلومات في الـ Prompt.

على سبيل المثال، عندما يحتاج الذكاء الاصطناعي لقراءة ملف، لا تحتاج لنسخ ولصق محتواه، بل يصل مباشرة إلى نظام الملفات عبر MCP.

2.2 خلفية الإصدار

في عام 2024، مع إطلاق Claude 3.5 Sonnet، اكتشفت Anthropic مشكلة: كل أداة يجب دمجها بشكل منفصل.

تخيل:

  • تريد أن يقرأ الذكاء الاصطناعي مستودع GitHub → يجب كتابة كود تكامل GitHub
  • تريد أن يستعلم الذكاء الاصطناعي قاعدة بيانات → يجب كتابة كود تكامل قاعدة البيانات
  • تريد أن يعمل الذكاء الاصطناعي على نظام الملفات → يجب كتابة كود تكامل نظام الملفات

كل تكامل يتطلب كتابة كود مشابه بشكل متكرر: المصادقة، معالجة الأخطاء، تحويل البيانات...

كتبت Anthropic في مدونتها الرسمية:

"We're introducing the Model Context Protocol (MCP), an open protocol that standardizes how applications provide context to LLMs."

الهدف الأساسي: تمكين مطوري الأدوات من كتابة الكود مرة واحدة، لتستخدمه جميع تطبيقات الذكاء الاصطناعي المتوافقة مع MCP.

2.3 ما هو MCP؟

What is MCP?
MCP (Model Context Protocol) is a unified standard introduced by Anthropic in November 2024 for connecting AI with external tools. It lets AI applications call tools, read resources, and use predefined prompts, giving AI practical "hands" and "eyes".
Three Core Capabilities
Capability
English
Role
Example
Tools
Tools
Functions AI can call
Check weather, send email, call APIs
Resources
Resources
Data AI can read
File content, database records, configuration
Prompts
Prompts
Predefined prompt templates
Code review templates, writing templates
When should you use MCP?
When AI needs to perform real actions
AI should not only answer questions, but also send emails, operate files, and call third-party APIs.
When AI needs access to private data
Read local files, query databases, or access internal business systems.
When tool integration should be standardized
Build once and reuse across AI applications such as Claude, Cursor, and Windsurf.
How do you use MCP?
1
Develop an MCP Server
Implement a server that provides tools, resources, and prompts according to the MCP spec.
2
Configure the AI app connection
Add the MCP Server configuration to your AI app, either local or remote.
3
Let AI call it automatically
AI discovers and calls suitable tools or reads resources based on the task.

ثلاث قدرات أساسية:

القدرةالإنجليزيةالوظيفةالمثال
الأدواتToolsوظائف يمكن للذكاء الاصطناعي استدعاؤهاالاستعلام عن الطقس، إرسال البريد
المواردResourcesبيانات يمكن للذكاء الاصطناعي قراءتهامحتوى الملفات، سجلات قاعدة البيانات
الموجهاتPromptsقوالب prompt محددة مسبقاًقالب مراجعة الكود، قالب الكتابة

2.4 التنفيذ الداخلي لـ MCP

MCP InternalsCommunication details of the client-server architecture
Why is MCP so popular?

Before MCP, AI could only read and respond. With MCP, AI can finally take action by operating programs and helping with real work.

How do you use MCP?

Using MCP is simple: configure an mcp.json file, then your IDE can use MCP tools.

1
Find an MCP Server
Find the MCP Server you need from an MCP directory or GitHub.
2
Configure mcp.json
Find the MCP config location in your AI editor, such as Cursor or Claude Desktop, and add the server configuration.
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/home/user/projects"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "your-token-here"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost/db"
      }
    }
  }
}
3
Restart the IDE
After restart, AI discovers and loads MCP tools automatically, so you can ask it to use them.
Are Skills replacing MCP?
As Skills become more common, many scenarios are starting to use Skills instead of the MCP protocol. Skills are lighter and easier to write for common tasks. MCP remains better for complex tool integrations and reuse across multiple clients. For simple operations, consider Skills first.
Common mcp.json locations
Cursor~/.cursor/mcp.json
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Windsurf~/.windsurf/mcp.json
How do you implement an MCP Server?

Suppose you have a weather API and want to wrap it as an MCP Server that AI can call. This Node.js example shows the shape:

weather-mcp-server.js
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'

// 1. Create MCP Server
const server = new Server({
  name: 'weather-server',
  version: '1.0.0'
}, {
  capabilities: { tools: {} }
})

// 2. Define tool list
server.setRequestHandler('tools/list', async () => ({
  tools: [{
    name: 'get_weather',
    description: 'Get weather for a city',
    inputSchema: {
      type: 'object',
      properties: {
        city: { type: 'string', description: 'City name' }
      },
      required: ['city']
    }
  }]
}))

// 3. Implement tool call logic
server.setRequestHandler('tools/call', async (request) => {
  const { name, arguments: args } = request.params

  if (name === 'get_weather') {
    // Call your weather API
    const response = await fetch(
      `https://api.weather.com/v1/current?city=${args.city}`
    )
    const data = await response.json()

    return {
      content: [{
        type: 'text',
        text: JSON.stringify(data)
      }]
    }
  }
})

// 4. Start service through stdio
const transport = new StdioServerTransport()
await server.connect(transport)
stdio vs HTTP+SSE transport
stdio (local process)

The MCP Server runs as a child process and communicates through standard input and output.

Pros: simple, secure, and suitable for local tools.

Cons: local only; no remote access.

HTTP + SSE (remote service)

The MCP Server runs as an HTTP service and supports SSE pushes.

Pros: remote access and sharing across multiple clients.

Cons: requires server deployment and authentication.

Communication Flow (4 Steps)
1Handshake (initialize)
When the MCP Server starts, it sends an initialize request to the client and declares protocol version and capabilities.
Server → Client
// Server sends an initialize request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {
      "tools": {},
      "resources": {},
      "prompts": {}
    },
    "serverInfo": {
      "name": "filesystem",
      "version": "1.0.0"
    }
  }
}
2List tools (tools/list)
3Call tool (tools/call)
4Return result
Deep Dive: JSON-RPC 2.0 Message Format
Request Message Structure
{
  "jsonrpc": "2.0",           // protocol version
  "id": 1,                     // request ID used to match response
  "method": "tools/call",      // method name
  "params": { ... }            // parameter object
}
Response Message Structure
// Successful response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { ... }
}

// Error response
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32600,
    "message": "Invalid Request"
  }
}
JSON-RPC 2.0 is stateless. Every request includes an id so the client can match the response.
Deep Dive: Two Transport Modes
stdio (local process)
Used for local tools through standard input and output.
// Start MCP Server as a child process
npx @modelcontextprotocol/server-filesystem ./project

// Communicate through stdio
// stdin: receive requests
// stdout: send responses
HTTP + SSE (remote)
Used for remote services with long-lived push connections.
// HTTP transport with Server-Sent Events
POST /mcp HTTP/1.1
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": { ... }
}

// SSE long connection for push updates
GET /mcp/sse HTTP/1.1
// Continuously receive server updates
Deep Dive: MCP Core APIs
initializeInitialize
Server declares protocol version and capabilities to the client.
tools/listTool list
Get all available tools provided by the server.
tools/callCall tool
Call a specific tool and receive the result.
resources/listResource list
Get accessible resources such as files and databases.
resources/readRead resource
Read content from a specific resource.
prompts/listPrompt templates
Get predefined prompt templates.

2.5 التشبيه: واجهة USB-C

MCP مثل واجهة USB-C:

  • سابقاً: كان لكل جهاز منفذ شحن خاص به (دائري، مسطح، مغناطيسي...)
  • الآن: وحدت USB-C الشحن ونقل البيانات لجميع الأجهزة
  • MCP: وحد طريقة اتصال الذكاء الاصطناعي بجميع الأدوات

يحتاج مطورو الأدوات لتنفيذ MCP Server مرة واحدة فقط، لتتمكن جميع تطبيقات الذكاء الاصطناعي المتوافقة مع MCP (Claude، Cursor، Windsurf، إلخ) من استخدامه مباشرة.

2.6 سيناريوهات التطبيق النموذجية لـ MCP

السيناريوالوصفالمثال
عمليات الملفات المحليةتمكين الذكاء الاصطناعي من قراءة/تعديل الملفات المحليةقراءة مستودع الأكواد، تحليل ملفات السجل
استعلامات قاعدة البياناتتمكين الذكاء الاصطناعي من الاستعلام المباشر عن قاعدة البياناتاستعلامات SQL، تحليل البيانات
استدعاء APIتمكين الذكاء الاصطناعي من استدعاء خدمات الطرف الثالثGitHub API، Slack، البريد
تكامل أدوات التطويرتمكين الذكاء الاصطناعي من استخدام أدوات التطويرعمليات Git، أوامر الطرفية

حالات استخدام فعلية:

  • Cursor/Windsurf: الاتصال بنظام الملفات و Git والطرفية عبر MCP
  • Claude Desktop: الاتصال ببرامج الملاحظات وعميل البريد عبر MCP
  • البرمجيات النصية للأتمتة: تمكين الذكاء الاصطناعي من تنفيذ مهام مؤتمتة (النسخ الاحتياطي، النشر، مزامنة البيانات)

3. A2A (Agent-to-Agent Protocol)

3.1 المعلومات الأساسية للبروتوكول

العنصرالمحتوى
الاسم الكاملAgent-to-Agent Protocol
المبادرGoogle
تاريخ الإصدار9 أبريل 2025
الوثائق الرسميةgoogle.github.io/A2A
ترخيص المصدر المفتوحApache 2.0
GitHubgithub.com/google/A2A

لماذا بدأت Google هذا المشروع؟

أصدرت Google بروتوكول A2A في مؤتمر Cloud Next 2025، مرتبطاً بشكل وثيق باستراتيجيتها للذكاء الاصطناعي المؤسسي.

تعتقد Google أن الذكاء الاصطناعي المؤسسي المستقبلي لن يكون وكيلاً خارقاً واحداً، بل وكلاء متخصصين متعددين يتعاونون — بعضهم مسؤول عن تحليل البيانات، وبعضهم عن توليد الأكواد، وبعضهم عن معالجة المستندات.

يحتاج هؤلاء الوكلاء إلى طريقة موحدة للتواصل فيما بينهم، ولهذا ظهر A2A.

3.2 خلفية الإصدار

حل MCP مشكلة "كيف يتصل الذكاء الاصطناعي بالأدوات"، لكن بقيت مشكلة: كيف يتعاون وكلاء متعددون؟

تخيل سيناريو:

  • الوكيل A هو "خبير تحليل المتطلبات"
  • الوكيل B هو "خبير توليد الأكواد"
  • الوكيل C هو "خبير الاختبار"

يقول المستخدم: "ساعدني في تطوير ميزة تسجيل الدخول"

يحلل الوكيل A المتطلبات ويحتاج لتعيين المهمة للوكيل B؛ ينتهي الوكيل B من كتابة الكود ويحتاج للوكيل C للاختبار. كيف يتواصلون فيما بينهم؟

كتبت Google في مدونتها الرسمية:

"A2A is an open protocol that enables AI agents to communicate with each other, facilitating collaboration across different frameworks and vendors."

الهدف الأساسي: تمكين الوكلاء الذين طورهم موردين وأطر عمل مختلفة من التعاون بسلاسة.

3.3 ما هو A2A؟

What is A2A?
A2A (Agent-to-Agent Protocol) is a communication standard introduced by Google in April 2025 for collaboration between agents. It lets agents from different vendors and frameworks discover each other, assign tasks, and exchange information, like an intercom for the AI world.
Core Concepts
Agent Card
Public metadata for each agent, including capability descriptions, version, and endpoint.
Task
A work unit passed between agents. It can include multi-turn dialogue and file attachments.
Message
Communication content between agents, supporting text, files, audio, and other modalities.
SSE (Server-Sent Events)
A server push mechanism used for real-time task progress updates.
When should you use A2A?
When multiple agents need to complete a complex task
One agent analyzes requirements, another writes code, and another tests the result.
When integrating agents from different vendors
Agents from Google, Anthropic, OpenAI, and others need to collaborate.
When task delegation and progress tracking are needed
A main agent assigns work to expert agents and receives live progress updates.
How do you use A2A?
1
Publish an Agent Card
Expose the agent capability description at /.well-known/agent.json.
2
Discover agents
Use the agents/get API to fetch another agent card and inspect capabilities.
3
Send a task
Use the tasks/send API to send work, optionally receiving progress through SSE.
4
Fetch the result
After completion, use the tasks/get API to retrieve the final result.

ثلاثة مفاهيم أساسية:

المفهومالإنجليزيةالوظيفةالتشبيه
Agent Cardبطاقة تعريف الوكيلتصف قدرات الوكيلشارة الموظف
Taskالمهمةوحدة العمل المراد تنفيذهاأمر العمل
Messageالرسالةمحتوى التواصل بين الوكلاءسجل الدردشة

3.4 التنفيذ الداخلي لـ A2A

A2A InternalsCommunication details of the peer-to-peer architecture
What can A2A do?

A2A lets multiple AI agents collaborate instead of working alone. A complex task can be assigned to specialized agents, each doing what it is best at.

How do you use A2A?

A2A is still early and mainly driven by Google. To try it, you need to develop an agent service that supports the A2A protocol.

1
Implement the Agent Card endpoint
Expose /.well-known/agent.json in your agent service and declare capabilities and version.
2
Implement A2A APIs
Implement core APIs such as agents/get, tasks/send, and tasks/get.
3
Deploy and register the agent
Deploy the agent to a server and register it so other agents can discover it.
Current Status
A2A was released in April 2025 and is still evolving quickly. Google provides reference implementations, while the ecosystem is still being built. Follow the official docs for current progress.
Communication Flow (5 Steps)
1Discovery (agents/get)
Agents fetch each other Agent Cards over HTTP to understand capabilities and versions.
HTTP request
// Agent A fetches Agent B's Agent Card
GET /.well-known/agent.json HTTP/1.1
Host: agent-b.company.com

// Response
{
  "name": "Code Agent",
  "description": "Professional code generation agent",
  "url": "https://agent-b.company.com",
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true
  },
  "skills": [
    {"id": "code-gen", "name": "Code generation"},
    {"id": "code-review", "name": "Code review"}
  ]
}
2Send task (tasks/send)
3Process task
4Push updates (SSE)
5Return result (tasks/get)
Deep Dive: Agent Card Format
An Agent Card is a JSON file, usually hosted at /.well-known/agent.json.
Agent Card Example
{
  "name": "Code Generation Agent",
  "description": "Professional frontend and backend code generation agent",
  "url": "https://code-agent.company.com",
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": true
  },
  "skills": [
    {
      "id": "frontend",
      "name": "Frontend development",
      "description": "React/Vue/Angular"
    },
    {
      "id": "backend",
      "name": "Backend development",
      "description": "Node/Python/Go"
    }
  ],
  "authentication": {
    "schemes": ["Bearer", "OAuth2"]
  }
}
With Agent Cards, agents can discover each other, understand capabilities and versions, and interoperate.
Deep Dive: HTTP + SSE Communication
Task Send (HTTP POST)
POST /tasks/send HTTP/1.1
Host: agent-b.company.com
Content-Type: application/json
Authorization: Bearer {token}

{
  "id": "task-001",
  "message": {
    "role": "user",
    "parts": [{ "type": "text", "text": "Write a login endpoint" }]
  }
}
Real-time Push (SSE)
GET /tasks/task-001/sse HTTP/1.1
Authorization: Bearer {token}

event: progress
data: {"status": "processing", "progress": 50}

event: completed
data: {"status": "completed", "result": {...}}
SSE (Server-Sent Events) lets the server push messages, which works well for long-running task status updates.
Deep Dive: A2A Core APIs
GETagents/get
Fetch the target agent Agent Card and inspect capabilities.
POSTtasks/send
Send a task to the target agent and wait synchronously for the result.
POSTtasks/sendSubscribe
Send a task and subscribe to SSE progress updates.
GETtasks/get
Fetch task status and result by task ID.
GETtasks/cancel
Cancel a running task.
Deep Dive: Authentication
API Key
Simple authentication for internal agent communication.
Authorization: Bearer sk-xxxxx
# or
Authorization: ApiKey sk-xxxxx
OAuth 2.0
Enterprise authentication with token refresh and permission control.
Authorization: Bearer {access_token}
# refresh token supported
POST /oauth/token
{
  "grant_type": "refresh_token",
  "refresh_token": "xxx"
}

3.5 التشبيه: وي تشات للمؤسسات

A2A مثل وي تشات للمؤسسات:

  • Agent Card: بطاقة تعريف كل شخص، تعرض الاسم والقسم والمسؤوليات
  • توزيع المهام: @شخص ما، تعيين مهمة
  • الدردشة: التواصل في أي وقت أثناء تنفيذ المهمة
  • تتبع المهام: رؤية تقدم المهمة وحالتها

الوكلاء المختلفون مثل الزملاء المختلفين، يتيح A2A لهم التعاون لإكمال المشاريع المعقدة.

3.6 سيناريوهات التطبيق النموذجية لـ A2A

السيناريوالوصفالمثال
تطوير البرمجياتوكلاء متعددون يتعاونون في مهام التطويرتحليل المتطلبات←الكود←الاختبار←النشر
سير العمل المؤسسيوكلاء من أقسام مختلفة يتعاونونوكيل الموارد البشرية + وكيل المالية + وكيل الشؤون القانونية
خدمة العملاء الذكيةوكلاء متخصصون متعددون يقسمون العملالاستقبال←الإجابة←التحويل←التسجيل
تحليل البياناتوكلاء متعددون يتعاونون في تحليل البياناتالجمع←التنظيف←التحليل←التصور←التقرير

حالات استخدام فعلية:

  • Google Agent Space: وكلاء متعددون داخل المؤسسة يتعاونون في معالجة المستندات والبريد والجدولة
  • فرق تطوير البرمجيات: وكيل المتطلبات ← وكيل الأكواد ← وكيل الاختبار ← وكيل النشر
  • أنظمة خدمة العملاء الذكية: وكيل الاستقبال ← وكيل الإجابة المتخصصة ← وكيل التحويل البشري

4. MCP مقابل A2A: المقارنة والعلاقة

4.1 الاختلافات الأساسية

البعدMCPA2A
المبادرAnthropic (2024.11)Google (2025.04)
التموضعاتصال بين الذكاء الاصطناعي والأدواتتعاون بين الوكلاء
نطاق الاتصالClient-ServerPeer-to-Peer
تنسيق البياناتJSON-RPC 2.0HTTP + JSON
التشبيهواجهة USB-Cوي تشات للمؤسسات

4.2 العلاقة بينهما

MCP و A2A ليسا في تنافس، بل في تكامل:

MCP vs A2APositioning differences between two major AI Agent protocols
Imagine a large shopping mall: MCP is like a unified outlet standard, so every tool can plug in; A2A is like an internal intercom system, so different agents can coordinate with each other.
MCPTool connection
Model Context Protocol
A protocol that connects AI applications with external tools and data sources, so tool builders can write once and support many AI apps.
InitiatorAnthropic
Released2024.11
ArchitectureClient-Server
Data formatJSON-RPC 2.0
AnalogyUSB-C: one interface for many devices
A2AAgent collaboration
Agent-to-Agent Protocol
A communication protocol that lets agents from different vendors and frameworks collaborate smoothly.
InitiatorGoogle
Released2025.04
ArchitecturePeer-to-Peer
Data formatHTTP + JSON
AnalogyWork chat: coworkers can assign tasks and talk
Core idea:MCP and A2A are complementary, not competing. MCP answers "how can AI access external capabilities"; A2A answers "how can multiple AI agents collaborate".

4.3 كيف تختار؟

السيناريوالاختيار
جعل الذكاء الاصطناعي يستدعي دوال أو أدوات محليةFunction Call
استخدام أدوات طرف ثالث (قواعد البيانات، API، نظام الملفات)MCP
بناء نظام تعاون متعدد الوكلاءA2A
الحاجة لتكامل الأدوات والتعاون متعدد الوكلاء معاًMCP + A2A

5. الاتجاهات المستقبلية للبروتوكولات

5.1 تطوير النظام البيئي

النظام البيئي MCP (بداية 2025):

  • خوادم مقدمة رسمياً: نظام الملفات، SQLite، Git، PostgreSQL، إلخ
  • خوادم ساهم بها المجتمع: Slack، Notion، Figma، Stripe، إلخ
  • تطبيقات تدعم MCP: Claude Desktop، Cursor، Windsurf، Zed، إلخ

النظام البيئي A2A (حديث الإصدار):

  • منتجات Agent من Google تدعمه أولاً
  • مجتمع المصادر المفتوحة يطور حزم SDK بلغات متعددة
  • التطبيقات المؤسسية في مرحلة الاستكشاف

5.2 عملية التوحيد القياسي

حالياً، بروتوكولات الوكلاء في "عصر الدول المتنافسة":

  • MCP و A2A هما الأكثر هيمنة
  • هناك بروتوكولات ناشئة أخرى مثل ANP و AGP
  • في المستقبل قد تدمج أو تتحد

التشبيه بتطور الإنترنت:

  • المرحلة المبكرة: تعايش بروتوكولات شبكات محلية متعددة
  • لاحقاً: أصبح TCP/IP المعيار
  • الآن: قد تتجه بروتوكولات الوكلاء نحو التوحيد أيضاً

6. الخلاصة

النقاط الرئيسية

البروتوكولالفهم بجملة واحدةتاريخ الإصدارالمبادرالسيناريو المطبق
MCP"USB-C" الذي يربط الذكاء الاصطناعي بالأدوات2024.11Anthropicتكامل الأدوات، الاتصال بمصادر البيانات
A2A"وي تشات للمؤسسات" للتعاون بين الوكلاء2025.04Googleالتعاون متعدد الوكلاء، تفويض المهام

الرؤى الرئيسية:

  1. MCP يحل مشكلة "كيف يكتسب الذكاء الاصطناعي قدرات خارجية"
  2. A2A يحل مشكلة "كيف يتعاون ذكاءات اصطناعية متعددة"
  3. كلاهما يكمل الآخر، وقد يُستخدمان معاً في المستقبل
  4. اختيار البروتوكول يعتمد على السيناريو المحدد، لا توجد رصاصة سحرية

المراجع

  1. الوثائق الرسمية لـ MCP: modelcontextprotocol.io
  2. GitHub لـ MCP: github.com/modelcontextprotocol
  3. مدونة إطلاق Anthropic: "Introducing the Model Context Protocol" (2024-11-25)
  4. الوثائق الرسمية لـ A2A: google.github.io/A2A
  5. GitHub لـ A2A: github.com/google/A2A
  6. Google CloudBlog: "Announcing the Agent-to-Agent Protocol" (2025-04-09)