home / mcp / a2a mcp client server
Connects to A2A agents, enabling messaging, task tracking, and streaming responses via MCP.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-tesla0225_mcp-a2a": {
"command": "npx",
"args": [
"-y",
"a2a-client-mcp-server"
],
"env": {
"A2A_ENDPOINT_URL": "http://localhost:41241"
}
}
}
}You can connect your MCP client to an Agent-to-Agent (A2A) companion, enabling seamless messaging, task management, and streaming responses through the Model Context Protocol. This server acts as a bridge so your LLMs can interact with A2A agents in a structured, MCP-friendly way.
You will run the MCP server locally or in a container and connect your MCP client to it. Use the available tools to send tasks, monitor progress, stream updates, and fetch agent information. Typical patterns involve sending a task, polling or streaming updates, and querying agent details to tailor requests to the agent’s capabilities.
Key usage patterns include: sending a task to an A2A agent to perform a computation or generate content; subscribing to updates for real-time feedback; retrieving the current status of tasks; and querying agent information to adapt your prompts to the agent’s capabilities.
Prerequisites you need before installation:
- Node.js (stable LTS release) and npm are required to install and run the MCP server.
Install options you can choose from.
# Install globally
npm install -g a2a-client-mcp-server
# Or run directly with npx
npx a2a-client-mcp-serverSet the A2A endpoint URL to point to the A2A agent you want to connect to. The default is http://localhost:41241 if you do not provide a value.
# Example configuration for Claude Desktop integration (NPX approach)
```
```
{
"mcpServers": {
"a2a_client": {
"command": "npx",
"args": ["-y", "a2a-client-mcp-server"],
"env": {
"A2A_ENDPOINT_URL": "http://localhost:41241"
}
}
}
}If you prefer running via Docker, build and run as shown below to connect with the same endpoint:
docker build -t a2a-client-mcp-server .
```
```
# Run with environment variable exposed to the container
docker run -i --rm -e A2A_ENDPOINT_URL=http://localhost:41241 a2a-client-mcp-serverThis server can be started using a local runtime (stdio) approach. The command to start is issued as a single runtime call with arguments that include the package and any required flags. The environment variable A2A_ENDPOINT_URL controls which A2A agent is targeted by the MCP server.
To set up a development environment, install dependencies and start a watcher that rebuilds as you code.
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run watchSend a task to an A2A agent with an optional taskId to track progress.
Retrieve the current state of a previously submitted task using its taskId.
Cancel a running task identified by its taskId.
Send a task and subscribe to its updates in streaming mode, with an optional maxUpdates limit.
Query information about the connected A2A agent, including capabilities and metadata.