TM

tesla0225/mcp-a2a

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

28 stars 9 forks Качество 57 Тренд 11

Сервер MCP, который действует как клиент протокола Agent-to-Agent (A2A), позволяя LLM взаимодействовать с агентами A2A через протокол Model Context Protocol (MCP).

Обзор

Сервер MCP, который действует как клиент протокола Agent-to-Agent (A2A), позволяя LLM взаимодействовать с агентами A2A через протокол Model Context Protocol (MCP). Подключение к любому A2A-совместимому агенту - Отправка и получение сообщений - Отслеживание и управление задачами - Поддержка потоковых ответов - Возможности агента запроса и метаданные - A2A ENDPOINT URL: URL агента A2A для подключения (по умолчанию: "http://localhost:41241")) Добавьте это в claude desktop config.json: Отправить задание агенту A2A - сообщение (струна): Сообщение отправить агенту - задание Id (струна, факультативно): Идентификатор задачи (сгенерирован, если не предоставлен) Получить текущее состояние задачи - taskId (струна): ID задачи для извлечения Отменить исполняемое задание - taskId (string): ID задания на отмену Отправить задание и подписаться на обновления (стриминг) - сообщение (струна): Сообщение для отправки агенту - taskId (струна, факультативно): Идентификатор задачи (сгенерированный, если не предоставлен) - maxUpdates (номер, необязательно): Максимальные обновления для получения (по умолчанию: 10)

Обзор (машинный перевод)

Сервер MCP, который действует как клиент протокола Agent-to-Agent (A2A), позволяя LLM взаимодействовать с агентами A2A через протокол Model Context Protocol (MCP).

Особенности

Подключение к любому A2A-совместимому агенту

  • отправлять и получать сообщения Отслеживать и управлять задачами
  • Поддержка потоковых ответов
  • Возможности агента запроса и метаданные

##Установка

Конфигурация

Переменные среды

  • A2A_ENDPOINT_URL: URL агента A2A для подключения (по умолчанию: «http://localhost:41241"))

Использование с Claude Desktop

Добавьте это к своему [2]:

NPX

###Докер

Создайте образ Docker:

Настройка Claude Desktop:

Доступные инструменты

a2a send task

Отправить задание агенту A2A [[Т3]] (струна): Сообщение для отправки агенту

  • [[Т4]] (струна, факультативно): Идентификатор задачи (сгенерирован, если не предоставлен)

####2a get task Получить текущее состояние задачи [[Т5]] (струна): идентификатор задачи для извлечения

####2a cancel task Отменить выполнение задачи

  • taskId (струна): идентификатор задачи для отмены

a2a send task subscribe

Отправить задание и подписаться на обновления (стриминг) message (струна): Сообщение для отправки агенту

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

A2A Client MCP Server

An MCP server that acts as a client to the Agent-to-Agent (A2A) protocol, allowing LLMs to interact with A2A agents through the Model Context Protocol (MCP).

Features

  • Connect to any A2A-compatible agent
  • Send and receive messages
  • Track and manage tasks
  • Support for streaming responses
  • Query agent capabilities and metadata

Installation

# Install globally
npm install -g a2a-client-mcp-server

# Or run directly with npx
npx a2a-client-mcp-server

Configuration

Environment Variables

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

NPX

npm run build
npm link
{
  "mcpServers": {
    "a2a-client": {
      "command": "npx",
      "args": ["-y", "a2a-client-mcp-server"],
      "env": {
        "A2A_ENDPOINT_URL": "http://localhost:41241"
      }
    }
  }
}

Docker

Build the Docker image:

docker build -t a2a-client-mcp-server .

Configure Claude Desktop:

{
  "mcpServers": {
    "a2a-client": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "A2A_ENDPOINT_URL",
        "a2a-client-mcp-server"
      ],
      "env": {
        "A2A_ENDPOINT_URL": "http://localhost:41241"
      }
    }
  }
}

Available Tools

a2a_send_task

Send a task to an A2A agent

  • message (string): Message to send to the agent
  • taskId (string, optional): Task ID (generated if not provided)

a2a_get_task

Get the current state of a task

  • taskId (string): ID of the task to retrieve

a2a_cancel_task

Cancel a running task

  • taskId (string): ID of the task to cancel

a2a_send_task_subscribe

Send a task and subscribe to updates (streaming)

  • message (string): Message to send to the agent
  • taskId (string, optional): Task ID (generated if not provided)
  • maxUpdates (number, optional): Maximum updates to receive (default: 10)

a2a_agent_info

Get information about the connected A2A agent

  • No parameters required

Resources

The server provides access to two MCP resources:

  • a2a://agent-card: Information about the connected A2A agent
  • a2a://tasks: List of recent A2A tasks

Example Usage

This example shows how to use A2A Client MCP Server to interact with a Coder Agent:

First, let me explore what A2A agent we're connected to.

I'll use the a2a_agent_info tool to check the agent details.

The agent provides a coding service that can generate files based on natural language instructions. Let's create a simple Python script.

I'll use the a2a_send_task tool to send a request:

Task: "Create a Python function that calculates the Fibonacci sequence"

Now I can check the task status using a2a_get_task with the task ID from the previous response.

The agent has created the requested Python code. I can now retrieve and use this code in my project.
Открыть полный README на GitHub

Установка

npx -y a2a-client-mcp-server
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "a2a-client": { "command": "npx", "args": ["-y", "a2a-client-mcp-server"], "env": { "A2A_ENDPOINT_URL": "http://localhost:41241" } } } }