A2A to MCP bridge MCP Server
A2A v1.0.1 agents as MCP 2026-07-28 tools, with the tasks extension
A2A to MCP bridge scores 71 (Good), licensed Apache-2.0 and written in TypeScript. It installs as a local process. It declares 4 tools. Filed under Uncategorized. GitHub shows 2 stars. Package registries report about 225 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
71 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: apache-2.0.
License, quality and maintenance
Quality: Grade B
71/100 for listing completeness. Lost points: 4 of 4 tools barely described, short summary.
How quality is graded
Where the 71 comes from
22 + 20 + 5 + 10 + 4 + 10 = 71. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 5 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
{ "mcpServers": { "amirk-s-a2a-to-mcp": { "command": "npx", "args": [ "-y", "a2a-to-mcp@0.1.0" ] } }}
Environment variables
This server does not declare environment variables.
Tools4Tool docs quality grade F
All capabilitiesa2a_cancel_tasktoolagent, taskHandle
a2a_discovertoolagent
a2a_get_tasktoolagent, taskHandle, historyLength?
a2a_send_messagetoolagent, text, contextHandle?, taskHandle?
About
a2a-to-mcp
A2A v1.0.1 agents exposed as MCP tools on a stateless MCP 2026-07-28 server, with the io.modelcontextprotocol/tasks extension.
Point the bridge at one or more A2A agents by their agent card. Any MCP client, Claude Code or Cursor among them, then sees four ordinary tools: discover an agent, send it a message, read a task, cancel a task. The bridge translates parts, artifacts, task states and errors between the two protocols and says out loud what it cannot translate.
| Surface | Version served | Pinned dependency |
|---|---|---|
| MCP, modern route | 2026-07-28 via server/discover, no session, per-request _meta | @modelcontextprotocol/server 2.0.0 |
| MCP, legacy route | 2025-11-25 via initialize, same endpoint | same |
| MCP tasks extension | io.modelcontextprotocol/tasks schema 2026-07-28, modern route only | none, served by the bridge |
| A2A | 1.0 (A2A-Version: 1.0), JSON-RPC binding | @a2a-js/sdk 1.1.0 |
Node 20 or later. Apache-2.0.
Quick start
npm install -g a2a-to-mcp
Then run a2a-to-mcp --config agents.json (see "Run it" below).
Or run it from the repository:
git clone https://github.com/AmirK-S/a2a-to-mcp.git && cd a2a-to-mcp && npm ci && npm run build
Write agents.json, one alias per agent, by base URL or by card URL:
{
"agents": {
"hello": { "url": "http://localhost:9999" },
"planner": { "cardUrl": "https://planner.example.org/.well-known/agent-card.json" }
},
"port": 8931
}
Run it:
a2a-to-mcp --config agents.json # after npm install -g
node dist/cli.js --config agents.json # from a clone, after npm run build
The bridge listens on http://127.0.0.1:8931/mcp and prints the .mcp.json block to paste into a client. Every request must carry Authorization: Bearer <token>, or it is answered 401. Without other instructions the bridge generates a token at startup and writes it in that block; a generated token changes at every start. To keep one, set it in A2A_TO_MCP_TOKEN (or pass --token, which shows in the process list). Only loopback hosts are accepted in the Host and Origin headers unless allowedHosts is set in the configuration. Read Security before connecting more than one client.
Claude Code
Add to .mcp.json at the root of the project, which is the block the bridge prints on startup:
{
"mcpServers": {
"a2a-to-mcp": {
"type": "http",
"url": "http://127.0.0.1:8931/mcp",
"headers": { "Authorization": "Bearer <token printed by the bridge>" }
}
}
}
Claude Code negotiates 2026-07-28 through server/discover since its v2 runtime, documented from 2.1.232 and measured here with 2.1.263. Older versions fall back to initialize and get the same four tools on the legacy route. A full annotated trace of a Claude Code session against the bridge, discovery, a task with an artifact and an elicitation round trip, is in docs/DEMO-CLAUDE-CODE.md. In headless mode (claude -p) there is nobody to answer an elicitation, so Claude Code cancels it and the bridge cancels the A2A task; the interactive mode asks the user.
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"a2a": {
"type": "http",
"url": "http://localhost:8931/mcp",
"headers": { "Authorization": "Bearer <token printed by the bridge>" }
}
}
}
Cursor speaks 2025-11-25 and is served through initialize on the same endpoint. Its .cursor/mcp.json needs "type": "http", as measured in docs/USAGE-REEL.md; this block, with headers, has not been run against Cursor with 0.2.0.
Security
What a default start protects, and what it does not. The bridge has no user accounts: it compares tokens, it does not verify identities.
Enforced:
- Started from the command line, the bridge answers 401 to any request that does not carry
Authorization: Bearer <token>, with a token generated at startup or given byA2A_TO_MCP_TOKENor--token.--tokencan be repeated to give each client its own token. Tokens are compared in constant time. - An
Authorizationheader that carries no credential, empty or a scheme alone such asBearer(whatBearer ${TOKEN}becomes when the variable is unset), is answered 401 in every mode. - Task handles, context handles, MCP task ids and the multi-round-trip
requestStatebelong to the caller that received them, identified by a SHA-256 hash of itsAuthorizationheader value. A handle presented under another value is answered as unknown, whether or not it has expired. HostandOriginmust be a loopback name or listed inallowedHosts, against DNS rebinding from a browser.
Not protected:
- Clients that share a token share their handles. Every client you paste the generated block into is one owner: the token keeps other processes and other machines out, not your own clients apart. Give each client its own
--tokenfor that. - A weak token is a weak lock. The bridge accepts any token you give it,
dev-tokenincluded. Keep the generated one, or use at least 32 random bytes (openssl rand -hex 32). - A token that leaks together with a handle, in the same log or transcript, gives both. A client that a prompt injection steers acts under its own token, and the binding cannot tell.
- Behind a gateway, the gateway must send a distinct and stable
Authorizationvalue per user, each listed with--token. A gateway that sends one service key for all its users, or passes the user in another header such asX-Forwarded-User, makes all of them one owner: they can read, answer and cancel each other's tasks. - The A2A agent is a second door. The bridge calls it without any per-client identity, so whoever reaches the agent directly can list, read and cancel every task, those opened through the bridge included, unless the agent protects them itself. Keep the agent reachable by the bridge only.
- A client whose
Authorizationvalue changes, a new token or the same token with another scheme casing, loses the handles it received under the old value. --insecure-no-authserves without any token and prints a warning. Clients that send noAuthorizationheader are then indistinguishable and share their handles. It is refused on a host other than loopback, because there theHostcheck stops a browser, not a client that writes its own headers.- Embedded as a library,
createBridgerequires no token unlessbearerTokensis passed: without it, clients that send noAuthorizationheader share their handles exactly as in 0.1.0.
The four tools
Every tool takes the agent alias as its first argument when several agents are configured; with a single agent the alias may be omitted and defaults to it.
| Tool | Arguments | Returns |
|---|---|---|
a2a_discover | agent | the agent card as the agent served it, after a structural check, in structuredContent, with a text summary and the card URL in _meta |
a2a_send_message | agent, text, contextHandle?, taskHandle? | the agent reply, see the result contract below |
a2a_get_task | agent, taskHandle, historyLength? | the task envelope with its history |
a2a_cancel_task | agent, taskHandle | the task envelope after the cancellation request |
Calling a tool on the wire
The argument that carries the message is text. A complete tools/call on the 2026-07-28 route, as an MCP client sends it:
$A2A_TO_MCP_TOKEN must hold the token the bridge expects. If the bridge generated its token, the variable is empty in your shell: export the token it printed (export A2A_TO_MCP_TOKEN=<token>), or start the bridge with A2A_TO_MCP_TOKEN set. Otherwise the bridge answers 401 with "carries no credential".
curl -sS http://127.0.0.1:8931/mcp \
-H "Authorization: Bearer $A2A_TO_MCP_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2026-07-28' \
-H 'Mcp-Method: tools/call' \
-H 'Mcp-Name: a2a_send_message' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientCapabilities":{}},
"name":"a2a_send_message",
"arguments":{"agent":"hello","text":"task: hello world"}}}'
A run against a public A2A agent, with the one mistake a first user makes, is in docs/USAGE-REEL.md.
Result contract
Each reply is a CallToolResult whose content holds the translated parts and whose structuredContent is an envelope:
{
"kind": "task",
"contextHandle": "cx_...",
"taskHandle": "tk_...",
"a2aState": "TASK_STATE_COMPLETED",
"status": "completed",
"note": "present when the mapping lost information",
"artifacts": [{ "artifactId": "...", "name": "result" }],
"data": {}
}
data holds the single A2A data part of the artifacts, and is absent when there is none or more than one. history is added by a2a_get_task only.
kind is message for a direct A2A message and task when the agent opened a task. Handles are opaque strings minted by the bridge, never A2A identifiers; they hide the bridge table, not what an agent chooses to write in its own messages. They live in memory for fifteen minutes after their last use by default (handleTtlMs), and an expired or unknown handle returns an explicit error. Pass contextHandle back to stay in the same conversation, and taskHandle back to answer a task the agent left waiting for input.
An agent failure (FAILED, REJECTED, AUTH_REQUIRED), and a task the agent left in the unspecified state, is a tool execution error: isError: true, the agent text in content, the A2A state and a note in the envelope. A typed A2A error (codes -32001 to -32009) is also a tool execution error, with the code in structuredContent.a2aErrorCode. The bridge never re-emits an A2A error code as a JSON-RPC code. JSON-RPC reserves -32000 to -32099 for server-defined errors, MCP already uses -32020, -32021 and -32022 in that band, and an A2A code replayed there would claim an MCP meaning it does not have.
Long-running tasks
With the tasks extension
A client that declares io.modelcontextprotocol/tasks in the per-request clientCapabilities.extensions gets a CreateTaskResult from a2a_send_message as soon as the agent opens a task, then polls tasks/get and may call tasks/update and tasks/cancel. The bridge consumes SendStreamingMessage in the background when the card announces streaming, and GetTask otherwise.
A2A TaskState | MCP TaskStatus on tasks/get | What is lost |
|---|---|---|
SUBMITTED | working | MCP has no accepted but not started state; statusMessage says so |
WORKING | working | nothing |
INPUT_REQUIRED | input_required with one synthesized form elicitation | A2A asks in free text; the form has a single string field |
COMPLETED | completed, result is the full CallToolResult | nothing |
FAILED, REJECTED, AUTH_REQUIRED | completed, result.isError is true | a refusal and an authorization request become indistinguishable from a failure without the envelope |
CANCELED | cancelled | nothing, mind the spelling |
| unspecified | completed, result.isError is true | A2A sent no lifecycle at all; the bridge does not guess one |
| bridge cannot reach the task any more | failed with a JSON-RPC error, A2A code in error.data |
AUTH_REQUIRED is deliberately not mapped to input_required: MCP forbids form elicitation for credentials, and A2A asks for out-of-band authorization. The agent text, which usually carries the URL to visit, is returned in the result.
The extension is served on the 2026-07-28 route only. On the legacy route, tasks/* answer -32021 with the required capability. As of 2026-09-06, the two clients measured against this bridge, Claude Code and Cursor, do not declare the extension. It is exercised by the test suite in this repository and by any client that opts in per request.
CreateTaskResult leaves the bridge with an empty content array in addition to the fields the extension defines. That is a workaround for the reference SDK, which validates every tools/call result against the plain result schema (typescript-sdk issue 2637). The three extension methods are served by a small router in front of the SDK on the modern route, because the SDK answers -32601 to tasks/get and tasks/cancel before consulting its handlers (typescript-sdk issue 2598), and splitting the three across two layers would let them drift. Both workarounds are isolated and will be removed when the SDK moves.
Without the extension
a2a_send_message waits for the agent to reach a terminal or interrupted state and answers inline. A task left in INPUT_REQUIRED comes back:
- as a multi-round-trip
input_requiredresult with one form elicitation, for a client that declareselicitation, which then replays the call with the answer; - as an ordinary result whose envelope says
input_requiredand carries thetaskHandle, for any other client, which then sends the answer with that handle.
What crosses the bridge, and what does not
Parts:
A2A Part | MCP content block |
|---|---|
text | TextContent |
data | TextContent holding the JSON, flagged in _meta; also structuredContent.data when it is the only data part of the task artifacts |
url | ResourceLink with filename as name and mediaType as mimeType |
raw, image or audio media type | ImageContent or AudioContent in base64 |
raw, other media type | embedded blob resource under an a2a://part/ URI |
filename, artifact identity and name, message and context identifiers travel in _meta["io.github.amirk-s/a2a"] on each block.
Not carried, by design: push notifications (no webhook in MCP), agent card signatures, securitySchemes, streaming events as such (accumulated into the task), ListTasks (handles replace it), and any routing of free text to a skill. The bridge calls no language model and keeps nothing on disk.
Conformance
Read the score with its cause: on the 2026-07-28 run, 32 of the 37 scored scenarios have at least one check that is not green, 29 with a failure and 3 with warnings only. Nineteen call tool names written into the suite, and 13 exercise prompts, resources or completions, which a bridge to A2A agents does not declare; logging is not among them, it is only scored on 2025-11-25. The suite counts both families as failures on purpose, and points at the expected-failures baseline as the answer (modelcontextprotocol/conformance#248). The run records 67 failing checks and 5 warnings in all, every one of them in the committed baseline with its reason; the suite exits 0 on both revisions, and the protocol checks that apply to a bridge are green: wire schema, server/discover, the match between the capabilities announced and the handlers mounted, the subscriptions/listen acknowledgement, SEP-2243 headers, DNS rebinding protection. The numbers are in conformance/REPORT.md, regenerated by the command below.
npm run conformance replays the official suite, @modelcontextprotocol/conformance at 0.2.0-alpha.11, for 2026-07-28 and 2025-11-25, with a baseline of expected failures where every line carries its reason. The report is in conformance/REPORT.md. The bridge runs with --insecure-no-auth for it, because that version of the suite cannot send an Authorization header and has no authorization scenario; the token check is covered by test/integration/credential-gate.test.ts and test/integration/cli.test.ts.
What the suite proves: every message the bridge emits validates against the schema of its revision (wire-schema-valid on both wires), server/discover and the stateless wire behave, header validation of SEP-2243 is enforced, DNS rebinding protection is on. What it cannot measure: the scenarios that call the suite's own fixture tools by name, and the tasks-* scenarios, which a bridge to real agents cannot satisfy without pretending to be the fixture. The tasks extension is instead covered check by check in test/integration/tasks-extension.test.ts, written against the wire.
Development
npm ci
npm test # unit and integration, in-process fixture agent, no network
npm run test:helloworld # against the official A2A helloworld sample, see scripts/helloworld
npm run conformance # official MCP suite, both revisions, baseline applied
The fixture agent in fixtures/agent is a deterministic A2A v1.0 agent without a model: its commands drive every task state an agent can deliberately report, the two-turn input-required cycle, cancellation, the four part kinds and the nine typed errors. npx tsx fixtures/agent/cli.ts --port 41241 runs it standalone.
Maintenance and issues
Issues and pull requests get an answer within seven days. Bug reports against the pinned versions are handled; requests for new features are read and answered but not promised. The extended scope that may follow, one tool per A2A skill, subscriptions/listen with task notifications, A2A authentication schemes from the configuration, and the reverse direction, is listed here so that nobody expects it silently.
End of life
What breaks at the next revision of either protocol is written in docs/END-OF-LIFE.md. Versions are pinned exactly on purpose. docs/ETAT-FINAL.md records the state of the project at the first release: what is verified, what is published, what is open and will stay so.
License
Apache-2.0. The specifications of both protocols and the A2A SDK carry the same license.
Frequently asked questions
What is A2A to MCP bridge MCP Server?
A2A v1.0.1 agents as MCP 2026-07-28 tools, with the tasks extension
How do I install A2A to MCP bridge MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. A2A to MCP bridge MCP Server is published as the npm package a2a-to-mcp.
Is A2A to MCP bridge MCP Server free and open source?
Yes. A2A to MCP bridge MCP Server is released under the Apache-2.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
What tools does A2A to MCP bridge MCP Server provide?
A2A to MCP bridge MCP Server provides 4 tools: a2a_cancel_task, a2a_discover, a2a_get_task, and a2a_send_message. See the full tool list for descriptions and parameters.
How is A2A to MCP bridge MCP Server's trust score calculated?
A2A to MCP bridge MCP Server scores 71 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.