home / mcp / a2a client mcp server

A2A Client MCP Server

Provides MCP-based access to A2A agents, enabling task submission, status tracking, streaming updates, and agent information queries.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You run an MCP server that acts as a client to the A2A protocol, enabling your LLMs to communicate with A2A agents through the Model Context Protocol. This server handles sending and receiving messages, tracking tasks, streaming responses, and querying agent capabilities and metadata, all through easy-to-use command patterns.

How to use

You connect to an A2A agent and choose a workflow that fits your use case. Use the built-in tools to send tasks, monitor progress, retrieve results, and subscribe to streaming updates. You can also query the connected agent’s info to tailor requests to its capabilities.

Key usage patterns include sending a task to an agent, checking its status, and optionally subscribing to updates for long-running tasks. You can also request information about the agent to understand what it can do and how it will respond.

How to install

Prerequisites: you need a Node.js runtime to install and run the MCP server. You may also install and run the server via a container if you prefer.

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

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

Additional sections

Configuration and runtime are centered around the A2A_ENDPOINT_URL environment variable, which specifies the A2A agent to connect to. By default this is http://localhost:41241 unless you override it.

Two practical ways to run the MCP server are shown below. They are equivalent in functionality; choose the one that matches your workflow, whether you want a quick npx run or a reproducible Docker setup.

Security considerations include ensuring the endpoint is accessible only to trusted components and that any authentication or access controls used by the A2A agent are properly configured in your environment.

Examples show how to start the server via NPX (for quick testing) or via Docker (for isolation and deployment). The server exposes operations to send tasks, get task status, cancel tasks, subscribe to streaming updates, and fetch agent information.

{
  "mcpServers": {
    "a2a_client_npx": {
      "command": "npx",
      "args": ["-y", "a2a-client-mcp-server"],
      "env": {
        "A2A_ENDPOINT_URL": "http://localhost:41241"
      }
    },
    "a2a_client_docker": {
      "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 message to the connected A2A agent and optionally provide a taskId for tracking.

a2a_get_task

Retrieve the current state and results of a previously submitted task by its taskId.

a2a_cancel_task

Cancel a running task on the connected A2A agent using its taskId.

a2a_send_task_subscribe

Send a task and subscribe to streaming updates with optional maxUpdates to limit the number of responses.

a2a_agent_info

Query information about the connected A2A agent, including capabilities and metadata.