Skip to main content
Glama
ww2521
by ww2521

A2A MCP Server

将 A2A (Agent-to-Agent) 协议暴露为 MCP tools,让 Goose 可以通过 External Subagent 机制调用远程 A2A agents。

功能

  • a2a_discover - 发现并注册远程 A2A agent

  • a2a_list_agents - 列出所有已发现的 agents

  • a2a_send - 发送消息给 agent 并等待结果(支持轮询)

  • a2a_get_task - 查询任务状态

  • a2a_cancel_task - 取消运行中的任务

  • a2a_list_tasks - 列出 agent 上的任务

Related MCP server: a2a-mcp-bridge

环境变量

变量

说明

默认值

A2A_GATEWAY_URL

A2A Gateway URL (如 LiteLLM)

http://localhost:4000

A2A_API_KEY

认证 API Key

A2A_TIMEOUT

HTTP 请求超时 (毫秒)

30000

安装

cd a2a-mcp-server
npm install
npm run build

配置 Goose External Subagent

~/.config/goose/config.yaml 中添加:

extensions:
  a2a-mcp-server:
    type: stdio
    cmd: node
    args:
      - /path/to/a2a-mcp-server/dist/server.js
    env:
      A2A_GATEWAY_URL: "http://localhost:4000"
      A2A_API_KEY: "your-api-key"
    timeout: 300
    bundled: false
    enabled: true

或者使用绝对路径的 wrapper script:

#!/bin/bash
# /usr/local/bin/a2a-mcp-server
export A2A_GATEWAY_URL="http://localhost:4000"
export A2A_API_KEY="your-api-key"
exec node /path/to/a2a-mcp-server/dist/server.js

然后配置:

extensions:
  a2a-mcp-server:
    type: stdio
    cmd: /usr/local/bin/a2a-mcp-server
    timeout: 300
    bundled: false
    enabled: true

使用示例

1. 发现 Agent

使用 a2a_discover 发现 http://localhost:10001 的 agent

2. 发送消息

用 a2a_send 给 my-agent 发送消息:"帮我分析这段代码的性能问题"

3. 查询任务

用 a2a_get_task 查询任务 task-12345 的状态

4. 列出所有 agents

用 a2a_list_agents 看看有哪些可用的 agents

架构

Goose Main Agent (GUI)
    │
    ├── LLM: Claude/GPT/etc.
    │
    ├── External Subagent: a2a-mcp-server (stdio MCP)
    │       │
    │       └── A2A Client
    │               │
    │               └── HTTP/JSON-RPC (A2A Protocol)
    │                       │
    │                       ▼
    │               LiteLLM Gateway
    │                       │
    │               ┌───────┼───────┐
    │               ▼       ▼       ▼
    │            Agent1  Agent2  Agent3
    │
    └── 其他 extensions...

与 LiteLLM 集成

如果你使用 LiteLLM 作为 A2A Gateway:

# 启动 LiteLLM
litellm --config config.yaml

# 配置 A2A MCP Server
export A2A_GATEWAY_URL="http://localhost:4000"
export A2A_API_KEY="sk-xxx"

LiteLLM 会自动代理 A2A 请求到上游 agents,并提供:

  • 认证管理

  • 请求日志

  • 花费追踪

  • 负载均衡

开发

# 开发模式
npm run dev

# 编译
npm run build

# 运行
npm start

License

MIT

Available Tools

6 tools
a2a_cancel_taskC

Cancel a running task.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentYesAgent name or URL where the task was submitted
task_idYesThe task ID to cancel

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing behavioral traits. It only says 'Cancel a running task,' failing to mention side effects, success/failure conditions, or whether cancellation is immediate or reversible. This is insufficient for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (4 words), but it omits critical information. While brevity is valued, the trade-off here is under-specification, so a middle score is appropriate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (2 params, no output schema), the description is still too sparse. It lacks any information about behavior on success/error, asynchronous nature, or state transitions, leaving the agent with significant uncertainty.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already well-documented. The description adds no extra meaning beyond what the schema provides, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Cancel') and resource ('a running task'), which is specific and distinct from siblings like a2a_get_task or a2a_send. However, it doesn't explicitly differentiate itself from other mutation tools like a2a_send, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor are there exclusions or prerequisites. The description simply states the action without any context about typical use cases or when cancellation is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

a2a_discoverA

Discover an A2A agent at a URL. Fetches the agent card and registers it for later use.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the A2A agent (e.g., http://localhost:10001)

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions 'fetches the agent card and registers it,' but does not clarify side effects (e.g., state mutation), required permissions, error handling for invalid URLs, or whether duplicate registrations are handled. The description is too vague for a tool that likely modifies persistent state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two short sentences that immediately convey the action and outcome. Every word adds value, with no redundancy or filler. It is well-structured and front-loaded for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema), the description covers the essential purpose and basic behavior. However, it lacks details about return values, idempotency, and error scenarios. The sibling tools provide partial context, but the description could be more complete for a new user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single 'url' parameter. The description adds context (e.g., 'A2A agent' and example URL), but does not provide additional semantic value beyond the schema, such as format constraints or authentication context. A score of 3 is appropriate as the schema already documents the parameter adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to discover an A2A agent at a URL, fetching and registering the agent card. The verb 'discover' and resource 'A2A agent' are specific, and it distinguishes from siblings like a2a_list_agents (for listing known agents) and a2a_send (for interactions).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly suggests when to use the tool (when you have an agent URL to discover), but it does not explicitly state when not to use it or mention alternatives like a2a_list_agents for already-known agents. No usage exclusions or prerequisites are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

a2a_get_taskB

Get the current status and result of a task by ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentYesAgent name or URL where the task was submitted
task_idYesThe task ID to query

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; the description only says 'get' without disclosing any behavioral traits like idempotency, auth needs, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with key information front-loaded. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks output schema and description of return format. For a simple get-by-ID tool, could mention fields like status and result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% - both parameters have clear descriptions in the schema. The description adds no extra meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get' and the resource 'current status and result of a task by ID', distinguishing it from siblings like a2a_cancel_task and a2a_send.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives (e.g., a2a_list_tasks). No mention of prerequisites or scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

a2a_list_agentsA

List all discovered A2A agents with their capabilities and skills.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only says 'list', which implies a read operation, but does not disclose any behavioral traits such as whether it's read-only, destructive, rate limits, authentication needs, or data freshness.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, 10 words, no filler. Every word adds value. Ideal conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple list tool with no output schema, but it lacks details about return format, pagination, error handling, or any behavioral context. Given the absence of annotations, more completeness would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so schema coverage is trivially 100%. The description adds no parameter information because none is needed. Baseline for 0 parameters is 4, which is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'List all discovered A2A agents with their capabilities and skills.' This is a specific verb ('List') + resource ('A2A agents'), and distinctly differs from sibling tools like a2a_list_tasks or a2a_cancel_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when agents need to be listed, but provides no explicit guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

a2a_list_tasksA

List tasks on a remote agent, optionally filtered by context.

ParametersJSON Schema
NameRequiredDescriptionDefault
agentYesAgent name or URL
page_sizeNoMaximum number of tasks to return
context_idNoOptional context ID to filter tasks

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It indicates a read operation ('List'), but does not disclose error handling, rate limits, auth requirements, or pagination behavior. The page_size parameter is not explained in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that delivers the core purpose without any extraneous information. Every word is necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 3 parameters and no output schema, the description provides the basic purpose but lacks details on return format, pagination, error scenarios, or task metadata. It is adequate but incomplete for a list operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal extra meaning beyond the schema ('optionally filtered by context' echoes the context_id param).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List tasks') and the target ('on a remote agent'), and distinguishes from sibling tools like a2a_get_task (single task) and a2a_list_agents (lists agents). The optional filter by context is also mentioned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for listing tasks, but does not explicitly guide when to use this tool over alternatives (e.g., a2a_get_task for a single task, a2a_cancel_task for cancellation). No exclusions or context triggers are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

a2a_sendA

Send a message to an A2A agent and wait for the result. Supports polling for async tasks.

ParametersJSON Schema
NameRequiredDescriptionDefault
pollNoWhether to poll for task completion (default: true)
agentYesAgent name (from discovered agents) or direct URL
messageYesThe message to send to the agent
context_idNoOptional context ID for conversation continuation
poll_timeout_msNoTotal polling timeout in milliseconds (default: 120000)
poll_interval_msNoPolling interval in milliseconds (default: 2000)
poll_max_attemptsNoMaximum polling attempts (default: 60)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description provides some behavioral context (supports polling for async tasks), but it lacks details on error handling, blocking behavior, or side effects, which are important for a tool that waits for results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two short sentences that convey the essential purpose and a notable feature (polling). No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (7 parameters, no output schema, no annotations), the description is incomplete. It does not explain return values, error cases, or what 'wait for the result' entails in terms of output structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already well-documented in the schema. The description does not add additional meaning beyond the schema, hence a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'send a message' to a specific resource (A2A agent) and indicates waiting for a result, which is distinct from sibling tools like a2a_get_task or a2a_cancel_task.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for sending messages and waiting for results, but it does not explicitly state when to use or not use this tool compared to alternatives, nor does it provide guidance on prerequisites or scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observeda2a_cancel_task
    • First observeda2a_discover
    • First observeda2a_get_task
    • First observeda2a_list_agents
    • First observeda2a_list_tasks
    • First observeda2a_send

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: discovery, listing agents, sending messages, and managing tasks by ID or listing. No overlap.

Naming Consistency5/5

All tools follow the consistent pattern 'a2a_verb_noun' in lowercase snake_case, with verbs like list, get, send, cancel, discover.

Tool Count5/5

With 6 tools covering discovery, task lifecycle (send, get, list, cancel), the count is well-scoped for an A2A protocol server.

Completeness4/5

Covers core A2A operations: agent discovery, task creation (via send), retrieval, listing, and cancellation. Minor gap: explicit task creation tool, but send likely handles it.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ww2521/a2a-mcp-adaptor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server