Use a2a agents in your editor.
a2amcp is a tiny Model Context Protocol gateway. Runs on your machine, exposes private or public a2a cloud agents to Claude Code, Cursor, Windsurf, and other MCP clients. Each call still goes through the agent's hosted identity, auth, file grants, receipt trail.
Quick start
Same credentials as the Python a2a CLI; token in ~/.a2a/credentials.json.
npx -y a2amcp loginnpx -y a2amcp add greeter
npx -y a2amcp add research-agentBrowse all public and private agents your account can access: npx -y a2amcp agents.
Add this block to your client's MCP config and restart the editor. Done once — adding new agents later just edits a local file the gateway re-reads on each call.
{
"mcpServers": {
"a2a": { "command": "npx", "args": ["-y", "a2amcp"] }
}
}Per-client setup
Or run `claude mcp add a2a -- npx -y a2amcp`.
Paste the JSON block above as the server definition.
Any stdio MCP client works. Same JSON block.
Managing agents
Gateway reads ~/.a2a/mcp.json on every tools/list call — no gateway restart, only editor restart so it re-asks for the tool list.
| command | what it does |
|---|---|
| a2a-mcp list | Show enabled agents (local). |
| a2a-mcp agents | Show every agent your account can see (control plane). |
| a2a-mcp add <name> | Enable an agent. Looks up its public URL. |
| a2a-mcp remove <name> | Drop an agent from the gateway. |
| a2a-mcp doctor | Probe each /mcp endpoint and report tool counts. |
| a2a-mcp whoami | Show the logged-in account. |
| a2a-mcp logout | Forget the cached token. |
How it works
Each deployed agent on a2a cloud serves MCP at POST /mcp on its public URL. The gateway aggregates many agents into a single MCP server your editor connects to over stdio. Calls execute in the hosted runtime where permissions and proof are enforced — not as local scripts.
Claude Code / Cursor
│ stdio MCP
▼
a2amcp gateway ── reads ~/.a2a/mcp.json
│ Streamable HTTP + Bearer token
▼
greeter.a2acloud.io/mcp research.a2acloud.io/mcp ...Skills appear as tools named <agent>__<skill>. Auth uses the bearer token from ~/.a2a/credentials.json on every upstream call.
What carries through
- Agent identityTools map back to deployed agent, skill, version, AgentCard.
- Account accessPrivate agents stay private. Gateway uses your a2a login.
- Hosted runtimeExecution in the cloud agent service, not inside your editor.
- Proof trailTool calls produce receipts, artifacts, file ops, evals, review history.
Remote MCP (no local install)
If your client supports Streamable HTTP MCP, skip the gateway and connect directly to a single agent:
{
"mcpServers": {
"greeter": { "type": "http", "url": "https://greeter.a2acloud.io/mcp" }
}
}Trade-off: one MCP server per agent, manage auth headers yourself. Gateway is better when you have more than one.
Troubleshooting
- Tools missing? Run a2a-mcp doctor — pings every enabled agent and reports per-agent tool counts.
- 401 from upstream? Token expired. Re-run a2a-mcp login.
- Agent not in list? Probably still building — a2a-mcp agents shows status.
- Pin a version? Use npx -y a2amcp@0.1.2 in client config.