npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

a2a-mcp-bridge

v1.1.0

Published

MCP server that bridges A2A (Agent-to-Agent) protocol agents into Claude Code and other MCP clients

Readme

a2a-mcp-bridge

MCP server that bridges A2A (Agent-to-Agent) protocol agents into Claude Code and other MCP clients.

Discovers external A2A agents via their Agent Cards, then exposes them as MCP tools so any MCP-compatible client (Claude Code, Cursor, Windsurf, etc.) can interact with them.

Quick Start with Claude Code

Option 1: One-liner (recommended)

Add the bridge as an MCP server with env vars inline:

claude mcp add a2a-bridge \
  -e A2A_AGENT_URLS=https://your-a2a-server.com \
  -e A2A_API_TOKEN=your-token \
  -- npx a2a-mcp-bridge

This writes to your project-level .mcp.json. Done — Claude Code will auto-start the bridge.

Option 2: Global (available in all projects)

claude mcp add a2a-bridge --scope user \
  -e A2A_AGENT_URLS=https://your-a2a-server.com \
  -e A2A_API_TOKEN=your-token \
  -- npx a2a-mcp-bridge

Option 3: Manual config

Add to your project's .mcp.json (create it in the project root if it doesn't exist):

{
  "mcpServers": {
    "a2a-bridge": {
      "command": "npx",
      "args": ["a2a-mcp-bridge"],
      "env": {
        "A2A_AGENT_URLS": "https://your-a2a-server.com",
        "A2A_API_TOKEN": "your-token"
      }
    }
  }
}

Option 4: Env vars via settings file

If you prefer to keep secrets out of .mcp.json, add the server without env vars:

claude mcp add a2a-bridge -- npx a2a-mcp-bridge

Then add env vars to .claude/settings.local.json (git-ignored):

{
  "env": {
    "A2A_AGENT_URLS": "https://your-a2a-server.com",
    "A2A_API_TOKEN": "your-token"
  }
}

Connecting to multiple A2A servers

Pass comma-separated URLs:

claude mcp add a2a-bridge \
  -e A2A_AGENT_URLS=https://server1.com,https://server2.com,https://server3.com \
  -e A2A_API_TOKEN=shared-token \
  -- npx a2a-mcp-bridge

Verify it works

After adding, restart Claude Code and run:

> use the list_agents tool to show all available A2A agents

Claude will call the list_agents MCP tool and show you all discovered agents.

Other MCP Clients

Cursor / Windsurf / any MCP-compatible editor

Add to your MCP config file (location varies by editor):

{
  "mcpServers": {
    "a2a-bridge": {
      "command": "npx",
      "args": ["a2a-mcp-bridge"],
      "env": {
        "A2A_AGENT_URLS": "https://your-a2a-server.com",
        "A2A_API_TOKEN": "your-token"
      }
    }
  }
}

Run standalone

A2A_AGENT_URLS=https://your-a2a-server.com A2A_API_TOKEN=your-token npx a2a-mcp-bridge

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | A2A_AGENT_URLS | Yes | Comma-separated base URLs of A2A agents to discover | | A2A_API_TOKEN | No | Global API token sent as X-API-TOKEN header | | A2A_AGENT_TOKENS | No | JSON object mapping agent slugs to per-agent tokens | | A2A_REFRESH_INTERVAL_MS | No | Auto-refresh interval in ms (default: 300000 = 5 min, 0 = disabled) |

Per-agent tokens

When different agents require different tokens:

A2A_AGENT_TOKENS='{"weather-agent":"token1","echo-agent":"token2"}'

MCP Tools

Once running, the bridge exposes 5 tools:

| Tool | Description | |------|-------------| | list_agents | List all discovered A2A agents with their skills and capabilities | | refresh_agents | Re-fetch agent cards from all configured URLs, updating skills and removing stale agents | | send_message | Send a message to an A2A agent and get a response | | get_task | Get the current status of a task from an A2A agent | | get_agent_card | Get the full cached agent card for an A2A agent |

Multi-turn conversations

The bridge automatically tracks conversation context per agent within a session. Subsequent send_message calls to the same agent reuse the conversation ID, enabling multi-turn dialogue.

You can also pass an explicit context_id to send_message to control which conversation to continue.

How It Works

  1. On startup, fetches Agent Cards from each URL in A2A_AGENT_URLS
    • Tries /.well-known/agent-card.json (A2A v0.3.0) then /.well-known/agent.json (v0.2.x)
  2. Registers discovered agents and exposes them as MCP tools
  3. Routes send_message calls as A2A JSON-RPC 2.0 message/send requests
  4. Extracts text from various A2A response formats (messages, tasks, artifacts)

Requirements

  • Node.js >= 18

License

MIT