A2A endpoint
When its A2A surface is on (see Availability), Mnemoverse answers the Agent2Agent (A2A) protocol, version 1.0, on the same server as its remote MCP server. An A2A client reaches the same memory an MCP client gets. There is one JSON-RPC endpoint, one public Agent Card, and two skills: one searches memory, one stores a memory.
| Item | Value |
|---|---|
| Agent Card | https://mcp.mnemoverse.com/.well-known/agent-card.json (public, no credential) |
| Endpoint | https://mcp.mnemoverse.com/a2a (POST, JSON-RPC, method SendMessage) |
| Protocol | A2A 1.0 only, JSON-RPC binding |
| Credential | Authorization: Bearer with a Mnemoverse API key (mk_live_...) |
Availability
Mnemoverse switches the A2A surface on and off on the server. Check its state before you depend on it:
curl -sS -o /dev/null -w '%{http_code}\n' https://mcp.mnemoverse.com/.well-known/agent-card.json200: the surface is on, and the body is the Agent Card.404: the surface is off.POST /a2aanswers404too.
The card is sent with Cache-Control: public, max-age=300, so a cache between you and the server can return it for up to five minutes after the surface was switched off, while POST /a2a already answers 404.
The same card is also published on the main site, at https://mnemoverse.com/.well-known/agent-card.json, for tools that look for an agent on that domain. It names the same endpoint. To discover the agent from code, use the server's address above (see Authentication).
Quick start
You need an API key (see Authentication). The examples write it as mk_live_...; put your own key there.
1. Fetch the Agent Card
curl -sS https://mcp.mnemoverse.com/.well-known/agent-card.json \
| jq '{name, supportedInterfaces, capabilities, skills: [.skills[].id]}'{
"name": "Mnemoverse Memory",
"supportedInterfaces": [
{
"url": "https://mcp.mnemoverse.com/a2a",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"capabilities": {
"streaming": false,
"pushNotifications": false,
"extendedAgentCard": false
},
"skills": [
"memory-search",
"memory-write"
]
}The full card also carries each skill's description and examples, and the one security scheme, mnemoverseBearer.
2. Search memory
curl -sS -X POST https://mcp.mnemoverse.com/a2a \
-H 'Content-Type: application/json' \
-H 'A2A-Version: 1.0' \
-H 'Authorization: Bearer mk_live_...' \
--data '{"jsonrpc":"2.0","id":"probe-b","method":"SendMessage","params":{"message":{"messageId":"m-b","role":"ROLE_USER","parts":[{"text":"what do I know about the probe"}]}}}'The response, pretty-printed. It comes from a test run against a stub memory service: the memory, its id and the timing are an example, not real data.
{
"jsonrpc": "2.0",
"id": "probe-b",
"result": {
"message": {
"messageId": "0598cb1f-49b0-44a7-b73a-38645c02e588",
"contextId": "cd80ffc3-4658-4650-b934-2ad5866b1149",
"role": "ROLE_AGENT",
"parts": [
{
"text": "1. Stub memory: the probe works. (probe) @\"test\"\n id: 11111111-1111-1111-1111-111111111111\n\n(1ms)"
},
{
"data": {
"items": [
{
"memory_id": "11111111-1111-1111-1111-111111111111",
"content": "Stub memory: the probe works.",
"domain": "test"
}
]
},
"mediaType": "application/json"
}
]
}
}
}3. Store a memory
Storing is never chosen from the text: set message.metadata.skillId to "memory-write". This request stores a real memory in your account, and no A2A call deletes it. To keep a trial apart from your real memories, add "domain": "a2a-test" to metadata.
curl -sS -X POST https://mcp.mnemoverse.com/a2a \
-H 'Content-Type: application/json' \
-H 'A2A-Version: 1.0' \
-H 'Authorization: Bearer mk_live_...' \
--data '{"jsonrpc":"2.0","id":"probe-e","method":"SendMessage","params":{"message":{"messageId":"m-w","role":"ROLE_USER","parts":[{"text":"The probe stores this fact."}],"metadata":{"skillId":"memory-write"}}}}'The response, pretty-printed, from the same test run (the id and importance are an example):
{
"jsonrpc": "2.0",
"id": "probe-e",
"result": {
"message": {
"messageId": "79c5c393-63cb-401e-9ae8-7050169c0b0b",
"contextId": "f4285e63-8ea7-4bc9-b290-d86db8a041d6",
"role": "ROLE_AGENT",
"parts": [
{
"text": "Stored (importance: 0.70). ID: 22222222-2222-2222-2222-222222222222"
},
{
"data": {
"stored": true,
"memory_id": "22222222-2222-2222-2222-222222222222",
"reason": "stored",
"importance": 0.7
},
"mediaType": "application/json"
}
]
}
}
}Authentication
Send Authorization: Bearer <credential> on every POST /a2a. The Agent Card itself needs no credential.
Give your client the server's own address, https://mcp.mnemoverse.com, to find the card. Several A2A clients send the key they are configured with on the card request too (see Clients), so the address a client discovers the agent from is an address your key goes to.
- API key. A Mnemoverse API key,
mk_live_.... Create one in the console athttps://console.mnemoverse.com/dashboard/keys. This is the credential an agent you build can hold. - OAuth access token. Access tokens that
https://auth.mnemoverse.com/api/authissues to registered Mnemoverse connectors are accepted on the same header, as on/mcp. A third-party agent cannot obtain one by itself: every grant that yields such a token needs a person to sign in and consent in a browser. That is why the card declares only one scheme, HTTP Bearer, and no OAuth flow.
Storing needs write permission. An API key may write. An OAuth token needs the memory:write (or memory:admin) scope; without it, memory-write is refused before anything is stored, with HTTP 403 and the header WWW-Authenticate: Bearer error="insufficient_scope", scope="memory:write", ...:
{
"error": "insufficient_scope",
"error_description": "Storing memories requires write permission: an OAuth access token with the memory:write scope."
}A missing, malformed or refused credential gets the same answer POST /mcp gives: the same status (401, 403, 429 or 503), WWW-Authenticate challenge, Retry-After and body. The credential is checked before the body is read, so a request without a valid credential gets that answer even when its body is malformed or too large.
Protocol version
Every request must say it speaks A2A 1.0: send the header A2A-Version: 1.0, or, when you cannot set a header, the query parameter ?A2A-Version=1.0. The query parameter is read only when the header is absent. 1.0 and 1.0.<patch> are accepted.
A request with no version is a version 0.3 request by the specification (A2A v1.0.1 §3.6.2, read 2026-11-15). This server serves 1.0 only, so it answers -32009:
{
"jsonrpc": "2.0",
"id": "probe-f",
"error": {
"code": -32009,
"message": "This agent supports A2A protocol version 1.0 only. Send the A2A-Version: 1.0 header (or ?A2A-Version=1.0); a request without it is read as version 0.3.",
"data": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "VERSION_NOT_SUPPORTED",
"domain": "a2a-protocol.org"
}
]
}
}Send the version once. Two A2A-Version headers reach the server as one value with a comma in it, which is not a version: the answer is -32009, with a message that says to send exactly one.
Method names are the 1.0 names: SendMessage, not message/send. A 0.3 method name sent with A2A-Version: 1.0 is -32601 (method not found).
Skills
message.metadata.skillId selects the skill. When the key is absent, the skill is memory-search. The skill is never guessed from the text.
| Skill id | What it does | How it is selected | Text |
|---|---|---|---|
memory-search | Searches the caller's memory, through the MCP tool memory_read | The default: leave skillId out, or set it to "memory-search" | The joined text is the query, up to 5,000 characters |
memory-write | Stores one durable fact in the caller's memory, through the MCP tool memory_write | Only skillId: "memory-write" | The joined text is the content, up to 10,000 characters |
An explicit null or an unknown skillId is -32602; the error message lists the skill ids.
Both keys are read from message.metadata only, spelled exactly skillId and domain. A request that names a skill or a domain anywhere else is refused with -32602. It is not run as the default search, so a message you meant to store is never answered as if you had searched:
- In the request's own metadata,
params.metadata, in any spelling. Some clients put it there: see Google ADK. - In
message.metadataunder another spelling:skill_id,SkillId,skill-id,skill,Domain.
A key names the skill or the domain when, ignoring case and every character that is not a letter or a digit, it reads skillid, skill or domain. Every other key in either metadata object is yours and is ignored. HTTP headers and the text of the message never select a skill.
{
"jsonrpc": "2.0",
"id": "probe-k",
"error": {
"code": -32602,
"message": "message.metadata carries a key that looks like skillId but is not spelled that way. The key is message.metadata.skillId, exactly.",
"data": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message.metadata.skill_id",
"description": "message.metadata carries a key that looks like skillId but is not spelled that way. The key is message.metadata.skillId, exactly."
}
]
}
]
}
}message.metadata.domain, a non-empty string, is passed to the tool as its domain, up to 100 characters. For memory-search it searches only that domain or shared room address; for memory-write it files the memory under that domain. A longer domain is -32602 before anything runs.
Do not store passwords, credentials or other secrets with memory-write.
The request
SendMessage takes params.message and, optionally, params.configuration:
message.messageId: required, a non-empty string of at most 128 characters.message.role:"ROLE_USER", or its enum number1. Any other value is-32602.message.parts: a non-empty array of text parts,{ "text": "..." }. The text parts are joined with a newline, all of them: a client that sends a conversation's history as parts sends the whole transcript as the query or the memory. Only text is read: araw,urlordatapart is refused with-32005, and is never fetched or decoded. A part must carry exactly one oftext,raw,urlanddata; text that is empty or only whitespace after joining is-32602.message.contextId: optional, at most 128 characters. The response carries the one you sent; without it, or with an empty one, the server generates one.message.metadata: optional, holdingskillIdanddomain(see Skills).message.taskId: leave it out or empty. This agent keeps no tasks, so any non-empty task id is-32001.configuration.acceptedOutputModes: optional.["text/plain"]asks for only the text part,["application/json"]for only the data part. A non-empty list with neither type is refused with-32005before the skill runs.configuration.taskPushNotificationConfig: not supported,-32003.params.tenant: leave it out. The card declares no tenant.
The JSON-RPC envelope is one object with jsonrpc: "2.0", a string method, and an id that is a string of at most 128 characters or a number.
Field spellings. A2A 1.0 payloads are ProtoJSON, so each protocol field is accepted in its lowerCamelCase name or its original proto name: messageId or message_id, contextId or context_id, taskId or task_id, referenceTaskIds or reference_task_ids, mediaType or media_type, acceptedOutputModes or accepted_output_modes, taskPushNotificationConfig or task_push_notification_config, historyLength or history_length, returnImmediately or return_immediately. Every rule applies to both spellings. Both spellings of one field in one object are -32602, even when the values are equal. Responses always use lowerCamelCase.
Null fields. A protocol field sent as null is read as if it were left out, as ProtoJSON defines: "configuration": null, "contextId": null, or a text part that also carries "raw": null change nothing. A required field that is null is missing and is -32602. Two things are values, not absent fields: a part's data (so "data": null is a data part, -32005), and the keys inside metadata (so "skillId": null is -32602).
The keys inside metadata are this server's own contract and are read in camelCase only. They have no second spelling, and a near miss is refused, not ignored: metadata.skill_id is -32602 (see Skills).
This request uses the proto names and the numeric role; the response carries the contextId it sent:
curl -sS -X POST https://mcp.mnemoverse.com/a2a \
-H 'Content-Type: application/json' \
-H 'A2A-Version: 1.0' \
-H 'Authorization: Bearer mk_live_...' \
--data '{"jsonrpc":"2.0","id":"probe-h","method":"SendMessage","params":{"message":{"message_id":"m-h","context_id":"ctx-h","role":1,"parts":[{"text":"what do I know about the probe"}]}}}'Unknown fields are ignored, and so are referenceTaskIds, extensions, historyLength and returnImmediately. So are the keys of your own in either metadata object.
The response
A successful SendMessage answers with a Message, in result.message. No Task is created.
roleis"ROLE_AGENT",messageIdis new, andcontextIdis yours or a generated one.partsholds a text part, the tool's text, and a data part withmediaType: "application/json", the tool's structured result. Both are what the MCP tool returns for the same call.- If the tool returned no structured result, only the text part is sent, even if you asked for
application/jsononly. The call has already run (a write is already stored), so the server answers rather than reporting a failure that did not happen. - A write that the memory service declines (
stored: falsewith areason) is a normal Message that says so.
A failure is a JSON-RPC error, never a Message.
Errors
Transport and credential problems are HTTP statuses. Problems with the JSON-RPC request are HTTP 200 with a JSON-RPC error, except a body that cannot be read and an unexpected server failure.
| HTTP | JSON-RPC code | Meaning |
|---|---|---|
401, 403, 429, 503 | none | The credential check refused the request: missing, malformed, refused or expired credential, or the check is unavailable. Same status, headers and body as POST /mcp. |
403 | none | insufficient_scope: memory-write with an OAuth token that lacks memory:write. Nothing is stored. |
404 | none | The A2A surface is off (see Availability). Also /.well-known/agent.json at any time. |
405 | none | A method other than POST on /a2a. Header Allow: POST. |
413 | -32600 | Body larger than 256 KB. |
415 | -32600 | Content-Type is not application/json (parameters such as charset are allowed), or the charset or encoding is not supported. |
421 | none | The Host header names a host this server does not serve. |
429 | none | The request budget for the minute is spent (see Limits). Body {"error": "rate_limited", "error_description": "Too many requests; slow down."}, with a Retry-After header. |
400 | -32600 | The body cannot be read for another reason, for example a body that claims gzip and is not. |
500 | -32603 | An unexpected server failure. Message Internal error. |
200 | -32700 | The body is not valid JSON. |
200 | -32600 | The body is not one JSON object (a batch array, a string, a number, null); or id is missing, null, not a string or number, or longer than 128 characters; or jsonrpc is not "2.0"; or method is not a string. |
200 | -32601 | Unknown method, including A2A 0.3 names such as message/send. Message Method not found. |
200 | -32602 | Invalid SendMessage params: a required field missing or of the wrong type, a role other than ROLE_USER, a messageId or contextId over 128 characters, an unknown or null skillId, a skill or domain named outside message.metadata or under another spelling, an empty or too long domain, text that is empty (or only whitespace) or longer than the skill accepts, a part that does not carry exactly one of text, raw, url or data, a non-empty tenant, or both spellings of one field. The error data names the field. |
200 | -32603 | The memory tool answered an error, for example the memory service refused or failed. The message is the tool's error text, as /mcp returns it to the same caller, with anything shaped like a credential replaced by [redacted], cut to at most 2,000 characters. Also Internal error. when the server could not run the tool. |
200 | -32001 | Task not found: GetTask, CancelTask, or a non-empty message.taskId. This agent keeps no tasks. |
200 | -32003 | Push notifications are not supported: the four push notification config methods, or configuration.taskPushNotificationConfig. |
200 | -32004 | Unsupported operation: SendStreamingMessage, SubscribeToTask, GetExtendedAgentCard. |
200 | -32005 | Content type not supported: a raw, url or data part, or acceptedOutputModes with neither text/plain nor application/json. |
200 | -32009 | No A2A-Version, a version other than 1.0, or several values. |
The response id is null when the body cannot be read (400, 413, 415), on an unexpected server failure (500), when the body is not valid JSON, is not one object, or has an unusable id. Otherwise it is the id you sent.
error.data, when present, is an array of objects with an @type. The A2A-specific codes carry a google.rpc.ErrorInfo with a reason (TASK_NOT_FOUND, PUSH_NOTIFICATION_NOT_SUPPORTED, UNSUPPORTED_OPERATION, CONTENT_TYPE_NOT_SUPPORTED, VERSION_NOT_SUPPORTED) and domain: "a2a-protocol.org". -32602 carries a google.rpc.BadRequest whose field violation names the field by its lowerCamelCase path, for example:
{
"jsonrpc": "2.0",
"id": "probe-i",
"error": {
"code": -32602,
"message": "message.metadata.domain is longer than the 100 characters the memory tools accept.",
"data": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations": [
{
"field": "message.metadata.domain",
"description": "message.metadata.domain is longer than the 100 characters the memory tools accept."
}
]
}
]
}
}The error codes follow the A2A specification: the JSON-RPC standard codes per §9.5, the A2A-specific codes per §5.4 (A2A v1.0.1, read 2026-11-15).
What it does not do
- Tasks. Every answer is a Message.
GetTaskandCancelTaskare-32001, andListTasksreturns an empty page. - Streaming. The card says
streaming: false;SendStreamingMessageandSubscribeToTaskare-32004. - Push notifications. The card says
pushNotifications: false; the push notification methods are-32003. - An extended Agent Card. The card says
extendedAgentCard: false;GetExtendedAgentCardis-32004. - File or data parts. Only text parts are read; other parts are
-32005. - A2A 0.3. No 0.3 method names, and no request without a version.
- The legacy card path.
/.well-known/agent.json, the path of A2A 0.2, answers404. The card is at/.well-known/agent-card.jsononly. - Browser calls to
/a2a.POST /a2asends no CORS headers. The card allows any origin to read it. - Other memory tools. The two skills run
memory_readandmemory_write. Room management, feedback and the other tools are on the MCP server.
Limits
- Request body: 256 KB per
POST /a2a(/mcpallows 4 MB). - Request rate: 720 requests per minute per client address (an IPv6 address counts by its /48), one budget for
/a2a, the Agent Card,/mcp, the server's discovery documents and/healthtogether, so requests spent on/a2aleave fewer for/mcpin that minute, and the other way round. It is counted by address, not by API key: callers behind one public address share it. On a429, wait for itsRetry-After, then retry; it is the same429/mcpsends. - Plan limits: the request limits and daily quotas of your plan (see Pricing) apply as on
/mcp, because each skill runs the same memory tool. A call over them is-32603with the tool's error text, which quotes the memory service's answer. - Text: per skill, see Skills.
- Tool call: if the tool has not answered within 90 seconds, the request is answered with
-32603Internal error.A write may have been stored all the same, so check with a search before you send it again. The same holds when your own client gives up first: its timeout does not stop the server.
Clients
These clients were run against the server's code on 2026-11-15. Each ran against a local run of the server with a stub memory service in place of the real one, so the answers were the stub's; none was run against mcp.mnemoverse.com. Each found the agent through its card and called the endpoint the card names.
| Client | Version | Search | Store | What it needs |
|---|---|---|---|---|
| A2A Inspector | 1.0.0-alpha.1 | Yes | Yes | The key as --auth; the skill in the composer's metadata field |
a2a-sdk for Python | 1.3.0 | Yes | Yes | The key on the HTTP client, the user role, a longer timeout |
@a2a-js/sdk | 1.3.0 | Yes | From code | The key through fetchImpl. Its sample terminal client only searches |
Google ADK, RemoteA2aAgent | 2.14.1 | Yes | With a request interceptor | The server's own card URL; the key on the HTTP client |
| A2A TCK | 1.0.0.alpha3 | n/a | n/a | A conformance kit, not a client: see below |
Three things to know before the notes on each client:
- The version header needs no setting. Each client sends
A2A-Version: 1.0on its calls by itself. - You supply the key. The card says the endpoint takes an HTTP Bearer credential; each client still has to be given the key through a setting of its own, shown below.
- The key also goes to the card's address in the Inspector, the JavaScript SDK's sample terminal client, Google ADK, and the Python SDK when the key is a default header of its HTTP client. That is why the examples discover the agent from
https://mcp.mnemoverse.com.
A2A Inspector
The A2A Inspector is the quickest way to try the agent without writing code. It is one binary; it prints the address of a page to open in your browser.
export MNEMOVERSE_API_KEY=mk_live_...
a2a-inspector -a https://mcp.mnemoverse.com --auth "Bearer $MNEMOVERSE_API_KEY"In this run the Inspector's card check and its check of each answer reported no findings, and it carried the contextId from one message to the next. The run drove the Inspector through its HTTP API, not through the page, so the page's labels below are read from its source at that release:
- Leave Stream unticked. It starts unticked, because the card says
streaming: false; a streaming call is-32004. - To store, open Attachments, data and metadata and put
{"skillId": "memory-write", "domain": "a2a-test"}into Metadata (JSON object). Typing "remember that ..." alone runs a search. - Do not add an
A2A-Versionheader in its settings: it is sent next to the one the Inspector already sends, and the server answers-32009(see Protocol version). - The key is not kept across a page reload or a restart.
Python SDK
a2a-sdk 1.0 or later is required; 0.3.26 could not read the card, which has the 1.0 shape. Install it with pip install "a2a-sdk==1.3.0", save this as memory.py, set MNEMOVERSE_API_KEY, and run python memory.py. It stores one memory under the domain a2a-test, then searches that domain:
import asyncio
import os
import httpx
from a2a.client import ClientConfig, create_client
from a2a.helpers import get_data_parts, get_message_text, new_text_message
from a2a.types import Role, SendMessageRequest
async def ask(client, text, **metadata):
msg = new_text_message(text, role=Role.ROLE_USER) # the helper defaults to the agent role
msg.metadata.update(metadata) # skillId and domain go here
async for event in client.send_message(SendMessageRequest(message=msg)):
return get_message_text(event.message), get_data_parts(event.message.parts)
async def main():
http = httpx.AsyncClient(
headers={"Authorization": f"Bearer {os.environ['MNEMOVERSE_API_KEY']}"},
timeout=60, # httpx waits 5 seconds by default
)
# Fetches /.well-known/agent-card.json on this origin and calls the endpoint the card names.
client = await create_client("https://mcp.mnemoverse.com", client_config=ClientConfig(httpx_client=http))
try:
print(await ask(client, "The team chose PostgreSQL for billing.", skillId="memory-write", domain="a2a-test"))
print(await ask(client, "Which database did we choose?", domain="a2a-test"))
finally:
await client.close()
await http.aclose()
asyncio.run(main())- Pass the origin, not the endpoint.
create_client("https://mcp.mnemoverse.com/a2a")looks for the card under/a2aand fails with a404. - Set the role.
new_text_message(text)builds an agent message, which this server refuses with-32602. - Write the keys in camelCase. The SDK's own fields are snake_case, the two metadata keys are not:
skill_idis refused (see Skills). - Raise the timeout. A client timeout does not stop the server, so a write may already be stored.
- Errors. A JSON-RPC error is raised as a typed exception whose text is the server's message, for example
InvalidParamsErrorfor-32602. A refused credential isA2AClientError("HTTP Error 401 ..."); the server's explanation is ine.__cause__.response.
JavaScript SDK
The server's own tests run the official JavaScript client, @a2a-js/sdk 1.3.0: they resolve the card from the server's origin and call SendMessage through it. You add the credential through fetchImpl, which keeps the key off the card request.
@a2a-js/sdk 1.3.0 needs Node.js 20 or later. Install it with npm install @a2a-js/sdk@1.3.0, save this as search.mjs, set MNEMOVERSE_API_KEY, and run node search.mjs:
import { randomUUID } from 'node:crypto';
import { ClientFactory, ClientFactoryOptions, JsonRpcTransportFactory } from '@a2a-js/sdk/client';
import { Role } from '@a2a-js/sdk';
// Add the API key to every JSON-RPC call. The card itself is fetched without it.
const authFetch = (input, init = {}) => {
const headers = new Headers(init.headers);
headers.set('Authorization', `Bearer ${process.env.MNEMOVERSE_API_KEY}`);
return fetch(input, { ...init, headers });
};
const factory = new ClientFactory(
ClientFactoryOptions.createFrom(ClientFactoryOptions.default, {
transports: [new JsonRpcTransportFactory({ fetchImpl: authFetch })],
}),
);
// Resolves /.well-known/agent-card.json on this origin and picks the JSONRPC 1.0 interface.
const client = await factory.createFromUrl('https://mcp.mnemoverse.com');
const reply = await client.sendMessage({
message: {
messageId: randomUUID(),
contextId: '',
taskId: '',
role: Role.ROLE_USER,
parts: [
{
content: { $case: 'text', value: 'Which database did we choose for the API, and why?' },
metadata: undefined,
filename: '',
mediaType: '',
},
],
metadata: undefined,
extensions: [],
referenceTaskIds: [],
},
configuration: undefined,
metadata: undefined,
tenant: '',
});
// A Message: the first part is the text, the second the structured result.
for (const part of reply.parts) console.log(part.content.$case, part.content.value);- Message objects. The client takes the SDK's own message objects (enum numbers,
content: { $case, value }), not the JSON shown in the curl examples. - To store, set
metadata: { skillId: 'memory-write' }on the message object, where the example hasmetadata: undefined. The request's ownmetadata, the last-but-one field of the example, staysundefined. - Errors. A JSON-RPC error is one of the SDK's
JsonRpc...Errorclasses, with the code ine.envelopeCode, note.code. A refused credential is a plainErrorwhose message holds the status and the response body. - TypeScript.
sendMessageis typed to return a Message or a Task. This server always answers a Message; narrow the type before you readparts. - The sample terminal client (
src/samples/cli.tsin the SDK's repository, not in the npm package) searches, but cannot store: it sends empty message metadata and has no option for it.
Google ADK
RemoteA2aAgent of google-adk 2.14.1 (with a2a-sdk 1.3.0) works as a client when it is built like this:
import os
import httpx
from a2a.client.client import ClientConfig
from a2a.client.client_factory import ClientFactory
from google.adk.a2a.agent.config import A2aRemoteAgentConfig, RequestInterceptor
from google.adk.agents.remote_a2a_agent import RemoteA2aAgent
def message_metadata(meta):
async def before(ctx, msg, params):
msg.metadata.update(meta) # skillId and domain belong to the message
return msg, params
return A2aRemoteAgentConfig(request_interceptors=[RequestInterceptor(before_request=before)])
http = httpx.AsyncClient(
headers={"Authorization": f"Bearer {os.environ['MNEMOVERSE_API_KEY']}"},
timeout=120,
)
store = RemoteA2aAgent(
name="mnemoverse_store",
agent_card="https://mcp.mnemoverse.com/.well-known/agent-card.json",
a2a_client_factory=ClientFactory(ClientConfig(httpx_client=http)),
config=message_metadata({"skillId": "memory-write", "domain": "a2a-test"}),
)- The card URL is the server's own. ADK refuses a card whose endpoint is on another origin than the card, so it cannot start from the copy on the main site. Give it the full card URL: a bare origin with a trailing slash made it fetch the site's root page.
- Not
a2a_request_meta_provider. That hook writes the request's own metadata,params.metadata, which this server refuses with-32602(see Skills). Leaveconfigout to search. - History. When the session already holds earlier events, as it does when the agent is a sub-agent of a coordinator, ADK sends them as extra text parts, and the server joins all text parts into the query or the memory. Give
RemoteA2aAgentacontext_builderthat returns only the latest user text. - Answers and errors. The text part arrives as text. The data part arrives as inline data of type
text/plain, wrapped in<a2a_datapart_json>tags. An error arrives as a string inevent.error_message, with no code.
Conformance kit
The A2A TCK is the protocol's conformance test kit. It cannot send a credential and it calls the endpoint the card names, so it cannot test mcp.mnemoverse.com from outside; it ran against a local run whose card named a local proxy that adds the key. Release 1.0.0.alpha3 lists 129 requirements for the JSON-RPC transport: 49 passed, 6 failed, 48 were skipped (the other transports, streaming, push notifications, an extended card, and tests that need a Task) and 26 the kit does not test. The six failures:
| Requirement | Why it fails here |
|---|---|
DM-ART-001, DM-MSG-001 | They expect the kit's own scripted agent: a Task with an artifact, and a Message with a fixed text. This agent answers with a Message and the memory tool's text. |
CORE-SEND-003 | The server answers the -32005 the requirement names; the kit has no expected error recorded for it and counts any error as a failure. |
JSONRPC-SSE-002 | The kit sends Content-Type: text/plain and expects -32005. The server answers HTTP 415 with -32600 (see Errors). |
DM-SERIAL-001 | The kit reports the key memory_id, which is inside the data part: the memory tool's own result, the same one /mcp returns. The protocol's fields are lowerCamelCase. |
CARD-CACHE-003 | Optional in the specification: the card carries Cache-Control and an ETag, and no Last-Modified. |
How it relates to MCP
The A2A endpoint is a second door to the same memory. Each skill runs the remote MCP server's own tool in process: memory-search runs memory_read, memory-write runs memory_write. So an A2A call gets what /mcp gives the same caller:
- Same memory: the account behind the credential, the same domains and rooms.
- Same permissions: the same credentials are accepted, and the same write rule applies.
- Same limits: the same text limits and plan limits, and one request budget for both endpoints. One restriction is A2A's own:
/a2arefuses a domain over 100 characters for a search too, while on/mcponly a write bounds the domain and a search passes any domain through (it then finds nothing, because nothing can be stored under a domain that long). - Same results: the text and data parts are the tool's text and structured result.
What each tool does and its parameters: MCP Server and Remote MCP Server. The REST endpoints behind the tools: API Reference.
Related
- Remote MCP Server: the hosted MCP endpoint on the same server
- MCP Server: the memory tools and what each one does
- API Reference: the REST endpoints behind the tools
- Rooms: shared memory, addressed through
metadata.domain - The A2A Agent Card: what an Agent Card is and how agents use it
- A2A vs MCP: how the two protocols differ and compose