a2a-bridge
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@a2a-bridgelist available A2A agents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
A2A Bridge — Bidirectional Multi-Agent Communication
Two companion servers enabling full bidirectional A2A communication between AI coding agents:
a2a-bridge (MCP server) — Outbound: Claude Code/Gemini/OpenCode reach A2A agents
a2a-server (HTTP server) — Inbound: A2A agents reach Claude Code
Architecture
Outbound (MCP bridge)
Claude Code ─┐
Gemini CLI ─┤─ MCP (stdio) ─► a2a-bridge ─► Elastic Agent Builder
OpenCode ─┘ ─► Gemini CLI A2A Server
─► Any standard A2A agent
Inbound (A2A server)
Gemini CLI ──A2A──► a2a-server (HTTP :3008) ──subprocess──► claude -p
Other agents /.well-known/agent-card.jsonRelated MCP server: claude-mesh
Tools
Tool | Description |
| List all agents across all configured providers |
| Get an agent's A2A card (capabilities, skills, metadata) |
| Send a message to an agent via A2A and get a response |
Agent IDs use compound format: provider/agentId (e.g., elastic/dev_assistant, gemini-local/default). Bare IDs auto-resolve when only one provider is configured.
Prerequisites
Node.js 18+
At least one A2A-compatible agent endpoint (Elastic Agent Builder, Gemini CLI A2A server, etc.)
Quick Start
Initial Setup (One-Time)
Clone and install:
git clone <repo-url>
cd native-api
npm install
npm run buildCreate a
.envfile (sole source of truth for all credentials):
# For Elastic provider
KIBANA_URL=https://your-deployment.kb.elastic-cloud.com
ELASTIC_API_KEY=your-api-key
# Optional: For Gemini or other A2A servers
# MY_AGENT_TOKEN=your-token-here(Optional) Create
agents.jsonfor multi-provider setup:
cp agents.json.example agents.json
# Edit agents.json to add your providersWithout agents.json, the system auto-creates an Elastic provider from .env variables.
Running Bidirectional A2A (Three Terminals)
Open three terminal windows and run these commands in parallel:
Terminal 1 — Claude Code A2A Server (receives messages from Gemini):
npm run serve
# Output: "A2A server listening on http://127.0.0.1:3008"Terminal 2 — Gemini CLI A2A Server (receives messages from Claude):
npm run gemini-a2a
# Output: "A2A server listening on port 41965"Terminal 3 — Claude Code or Gemini CLI for testing:
# In Claude Code, use the MCP bridge:
# List the available A2A agents
# Ask the gemini-local/default agent to [task]
# Or from Gemini CLI:
# /agents list
# /ask claude-code "do something"Claude Code Integration
Open the project in Claude Code. The .mcp.json auto-starts the MCP bridge:
Verify the server:
/mcp— you should seea2a-bridgelistedTry: "List the available A2A agents" → should show agents including
gemini-local/defaultTry: "Ask the gemini-local/default agent to list files in the current directory"
Gemini CLI Integration
Configure Gemini to discover Claude Code as an A2A agent:
Copy the agent config:
mkdir -p ~/.gemini/agents cp examples/gemini-agents/claude-code.md ~/.gemini/agents/Verify:
/agents listin Gemini CLI should showclaude-codeTry:
/ask claude-code "list my open files"
Usage
Outbound (MCP bridge — npm start)
> List the available A2A agents
> Get the agent card for elastic/dev_assistant
> Ask the elastic/dev_assistant agent to list the available indices
> Send a message to gemini-local/default asking it to summarize this fileInbound (A2A server — npm run serve)
Start the A2A server to let other agents talk to Claude Code:
npm run serveThis exposes Claude Code at http://localhost:3008 with a standard A2A agent card. Gemini CLI (or any A2A client) can discover and message it. See Bidirectional Demo for a full walkthrough.
Configuration
Credentials (.env)
.env is the single source of truth for all secrets. Never put credentials in agents.json or .mcp.json.
KIBANA_URL=https://your-deployment.kb.elastic-cloud.com
ELASTIC_API_KEY=your-api-key
MY_AGENT_TOKEN=your-token-hereProvider Registry (agents.json)
agents.json defines which A2A providers to connect to. It references env var names for secrets — never raw values. This file is safe to commit.
{
"providers": [
{
"type": "elastic",
"name": "elastic",
"baseUrl": "${KIBANA_URL}",
"auth": {
"scheme": "api-key",
"envVar": "ELASTIC_API_KEY",
"headers": { "kbn-xsrf": "true" }
}
},
{
"type": "a2a",
"name": "gemini-local",
"baseUrl": "http://localhost:41965",
"auth": { "scheme": "none" }
},
{
"type": "a2a",
"name": "my-remote-agent",
"baseUrl": "https://agent.example.com",
"auth": {
"scheme": "bearer",
"envVar": "MY_AGENT_TOKEN"
}
}
]
}Provider types:
elastic— Elastic Agent Builder (Kibana-specific endpoints and auth)a2a— Standard A2A agent (well-known discovery at/.well-known/agent-card.json)
Auth schemes:
api-key—Authorization: ApiKey <value>headerbearer—Authorization: Bearer <value>headerheader— Custom static headers onlynone— No authentication (local agents)
Backward Compatibility
If no agents.json exists, the server auto-creates an Elastic provider from KIBANA_URL and ELASTIC_API_KEY environment variables. Existing setups work without changes.
MCP Config (.mcp.json)
{
"mcpServers": {
"a2a-bridge": {
"command": "node",
"args": ["--env-file=.env", "dist/index.js"]
}
}
}Using in Other Clients
See the docs/ directory for client-specific setup guides:
User-level MCP config (Claude Code)
Register the server once for all Claude Code sessions:
claude mcp add --scope user a2a-bridge node -- --env-file=/path/to/project/.env /path/to/project/dist/index.jsA2A Protocol Details
Standard A2A: Discovery via
/.well-known/agent-card.json, messaging viaPOSTwith JSON-RPC 2.0message/sendElastic A2A: Agent card at
/api/agent_builder/a2a/{id}.json, messaging at/api/agent_builder/a2a/{id}Part format:
kind: "text"discriminator (A2A v0.3+)Streaming: Not currently supported
Security
.envis the sole credential store (gitignored, 600 permissions)HTTPS enforced for all non-localhost URLs
Agent ID validation:
[a-zA-Z0-9_.-]{1,128}per segment30s request timeout, 32KB message size limit
Error sanitization: internal details logged to stderr only
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/joltedbot/a2a-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server