Skip to main content
Glama

A2A MCP Server

MCP (Model Context Protocol) server for interacting with Agent-to-Agent (A2A) protocol compliant agents.

Overview

This MCP server enables LLMs to communicate with A2A-compliant agents through the Agent-to-Agent protocol. It provides tools for sending messages, managing tasks, and retrieving agent information.

Related MCP server: A2A MCP Server

Features

  • a2a_send_message: Send messages to A2A agents and optionally continue existing conversations

  • a2a_get_task: Retrieve task status and details by task ID

  • a2a_cancel_task: Cancel a running task

  • a2a_get_agent_card: Fetch agent metadata and capabilities

Installation

npm install
npm run build

Usage

The server communicates via stdio and can be configured in your MCP client:

{
  "mcpServers": {
    "a2a": {
      "command": "node",
      "args": ["/path/to/a2a-mcp-server/dist/index.js"]
    }
  }
}

Tools

a2a_send_message

Send a message to an A2A agent.

Parameters:

  • agentCardUrl (string, required): URL to the agent's card endpoint

  • message (string, required): The message text to send

  • taskId (string, optional): Existing task ID to continue conversation

Example:

{
  "agentCardUrl": "https://example.com/.well-known/agent-card.json",
  "message": "Hello, what can you do?",
  "taskId": "optional-task-id-to-continue"
}

a2a_get_task

Retrieve the status and details of a task.

Parameters:

  • agentCardUrl (string, required): URL to the agent's card endpoint

  • taskId (string, required): The task ID to retrieve

a2a_cancel_task

Cancel a running task.

Parameters:

  • agentCardUrl (string, required): URL to the agent's card endpoint

  • taskId (string, required): The task ID to cancel

a2a_get_agent_card

Retrieve an agent's card with metadata and capabilities.

Parameters:

  • agentCardUrl (string, required): URL to the agent's card endpoint

Development

# Install dependencies
npm install

# Run in development mode with auto-reload
npm run dev

# Build for production
npm run build

# Run the built server
npm start

License

MIT

Available Tools

4 tools
a2a_cancel_taskCancel A2A TaskA
DestructiveIdempotent

Cancel a running A2A task.

This tool requests cancellation of an active task. The agent will attempt to gracefully stop the task execution and update its status to "canceled".

Args:

  • agentCardUrl (string): URL to the agent's card endpoint

  • taskId (string): The unique identifier of the task to cancel

Returns: JSON response confirming the cancellation request:

  • success: Boolean indicating if cancellation was initiated

  • message: Description of the cancellation result

  • task: Updated task object with "canceled" status (if available)

Note: Cancellation may not be immediate. The task status should transition to "canceled" once the agent completes the cancellation process.

Examples:

Error Handling:

  • Returns "Error: Task not found" if the task ID doesn't exist

  • Returns "Error: Task already completed" if the task is no longer running

  • Returns "Error: Cancellation not supported" if the agent doesn't support task cancellation

  • After cancellation, use a2a_get_task to verify the task status changed to "canceled"

Inputs: taskId (required), agentCardUrl (required).

a2a_get_agent_cardGet A2A Agent CardA
Read-onlyIdempotent

Retrieve an agent's card containing metadata and capability information.

This tool fetches the agent card which describes what the agent can do, its configuration, supported features, and other metadata.

Args:

  • agentCardUrl (string): URL to the agent's card endpoint, typically at /.well-known/agent-card.json

Returns: JSON response containing the agent card with:

  • name: Agent name

  • description: Agent purpose and capabilities

  • version: Agent version

  • skills: Array of skills/capabilities the agent provides

  • endpoints: Available API endpoints

  • supportedFeatures: List of A2A protocol features supported

  • metadata: Additional agent information

Agent cards follow the A2A protocol specification and help clients understand how to interact with the agent.

Examples:

Error Handling:

  • Returns "Error: Failed to fetch agent card" if the URL is unreachable

  • Returns "Error: Invalid agent card format" if the card doesn't conform to A2A specifications

  • Returns "Error: Agent card not found" if the endpoint returns 404

Inputs: agentCardUrl (required).

a2a_get_taskGet A2A TaskA
Read-onlyIdempotent

Retrieve the status and details of an A2A task by its ID.

This tool fetches information about a previously created task, including its current status, progress, and any generated artifacts.

Args:

  • agentCardUrl (string): URL to the agent's card endpoint

  • taskId (string): The unique identifier of the task to retrieve

Returns: JSON response containing task information:

  • id: Task identifier

  • status: Object with state ("submitted", "in_progress", "completed", "failed", "canceled") and optional progress information

  • artifacts: Array of generated outputs, each with:

    • artifactId: Unique identifier

    • name: Artifact name/title

    • kind: Type of artifact (e.g., "text", "image", "file")

    • parts: Artifact content

  • messages: Conversation history associated with the task

  • created: Task creation timestamp

  • updated: Last update timestamp

Examples:

Error Handling:

  • Returns "Error: Task not found" if the task ID doesn't exist

  • Returns "Error: Failed to connect to agent" if the agent is unreachable

  • Task status will indicate "failed" if the task encountered errors during execution

Inputs: taskId (required), agentCardUrl (required).

a2a_send_messageSend A2A MessageA

Send a message to an Agent-to-Agent (A2A) protocol compliant agent.

This tool establishes communication with an A2A agent and sends a text message. The agent may respond immediately with a message or return a task object for asynchronous processing.

Args:

  • agentCardUrl (string): URL to the agent's card endpoint, typically at /.well-known/agent-card.json

  • message (string): The text message to send to the agent (1-10,000 characters)

  • taskId (string, optional): Existing task ID to continue a conversation thread. If provided, the message is sent as a follow-up to the specified task.

Returns: JSON response containing either:

  • A message object with the agent's immediate response

  • A task object for asynchronous operations, containing:

    • id: Task identifier

    • status: Current task state and progress

    • artifacts: Any generated outputs or results

    • kind: Response type ("message" or "task")

The response may include multiple parts (text, images, etc.) depending on the agent's capabilities.

Examples:

Error Handling:

  • Returns "Error: Failed to connect to agent" if the agent URL is unreachable

  • Returns "Error: Invalid agent card" if the card endpoint doesn't return valid A2A metadata

  • Returns "Error: Message sending failed" if the agent rejects the message

  • If a task is returned, use a2a_get_task to poll for completion status

Inputs: message (required), agentCardUrl (required), taskId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.8/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct A2A operation: sending messages, retrieving tasks, canceling tasks, and fetching agent cards. There is no meaningful overlap between their purposes, and the descriptions include explicit cross-references to prevent misselection.

    Naming Consistency5/5

    All tools follow the same a2a_<verb>_<noun> pattern: a2a_send_message, a2a_get_task, a2a_cancel_task, and a2a_get_agent_card. The naming is uniform, predictable, and clearly indicates the action and resource involved.

    Tool Count5/5

    Four tools is well-scoped for an A2A protocol server. Each tool covers one essential protocol interaction without unnecessary redundancy or missing core functionality.

    Completeness5/5

    The tool set covers the essential A2A workflow: discovering agent capabilities via the agent card, sending messages, checking task status, and canceling tasks. This is a complete surface for the stated purpose of interacting with A2A-compliant agents.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude to connect and interact with A2A Protocol agents, allowing discovery of agent capabilities, sending messages to remote agents, managing multi-turn conversations, and viewing artifacts returned by agents.
      60 PyPI
      17
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to communicate with business agents across company boundaries using Google's A2A protocol, with tools for discovery, messaging, and connection management.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LLM agents to send, receive, and discover contacts on the agentic message bus via native tools.
      5
      MIT