A2A Bridge MCP server

Bridges LLMs with Agent-to-Agent protocol-compatible agents, enabling delegation of complex tasks to specialized external agents without requiring direct protocol implementation
Back to servers
Setup instructions
Provider
tesla0225
Release date
Apr 12, 2025
Language
TypeScript
Stats
24 stars

The A2A Client MCP Server acts as a bridge between Large Language Models (LLMs) and Agent-to-Agent (A2A) compatible agents through the Model Context Protocol (MCP). This server enables LLMs to send tasks, receive responses, and manage interactions with A2A agents in a structured way.

Installation

You can install the A2A Client MCP Server globally or run it directly using npx:

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

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

Configuration

Environment Variables

The server can be configured using the following environment variables:

  • A2A_ENDPOINT_URL: URL of the A2A agent to connect to (default: "http://localhost:41241")

Integration with Claude Desktop

Using NPX

Add this configuration to your claude_desktop_config.json:

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

Using Docker

First, build the Docker image:

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

Then 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

The server provides several tools for interacting with A2A agents:

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 demonstrates how to use the 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.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later