MCP
UnifiedMemory exposes MCP routes for agent tools.
POST /mcp
POST /mcp/connect/{connector_token}
Use MCP for Claude Code, Codex, Gemini CLI, Cursor, VS Code, and other clients that can call remote tools.
Auth
For direct MCP calls, send an authorization header:
Authorization: Bearer $UNIFIED_MEMORY_API_KEY
For connector bootstrap, use a short-lived connector token generated by the Connections UI. The connector token should exchange into scoped runtime auth; do not paste admin keys into agent config.
Schema from OpenAPI
This section is generated from /openapi.public.json. Edit the OpenAPI source or generator, not this block.
POST /mcp
- Operation ID:
mcp_handler_mcp_post - Declared response statuses:
200
Request schema
OpenAPI does not declare a JSON schema for this operation.
200 response schema
OpenAPI does not declare a JSON schema for this operation.
POST /mcp/connect/{connector_token}
- Operation ID:
mcp_connector_handler_mcp_connect__connector_token__post - Declared response statuses:
200,422
Request schema
OpenAPI does not declare a JSON schema for this operation.
200 response schema
OpenAPI does not declare a JSON schema for this operation.
Direct endpoint
Request fields follow JSON-RPC:
| Field | Required | Type | Description |
|---|---|---|---|
jsonrpc | Yes | string | Use 2.0. |
id | Yes | string or number | Caller request id. |
method | Yes | string | MCP/JSON-RPC method such as tools/list or tools/call. |
params | No | object | Method-specific parameters. |
curl https://edge-api.jithendranara.dev/mcp \
-H "Authorization: Bearer $UNIFIED_MEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
Connector endpoint
Path parameters:
| Field | Required | Description |
|---|---|---|
connector_token | Yes | Short-lived connector token from the Connections UI. |
curl https://edge-api.jithendranara.dev/mcp/connect/<connector-token> \
-X POST \
-H "Content-Type: application/json" \
-d '{"client":"codex"}'
Expected tools
Tool names may evolve, but first-party integrations should expose memory flows such as:
| Tool area | Purpose |
|---|---|
| recall/search | Retrieve scoped memories. |
| retain/writeback | Store useful outcomes with writeback hygiene. |
| agent context | Build pre-turn prompt context. |
| courtroom | Inspect evidence and verdicts. |
| canary/status | Verify key, scope, and runtime health. |
Tool output controls
MCP clients that expose UnifiedMemory recall/profile/context tools may pass
compact-output controls in tools/call arguments:
| Field | Type | Description |
|---|---|---|
response_format | string | compact by default; full returns raw payloads for explicit debugging. |
include_raw | boolean | Bypasses compaction when true. |
diagnostics_only | boolean | Returns source counts, fallback status, and runtime diagnostics only. |
max_response_bytes | integer | Caps compact responses for agent/tool consumers. |
The compact form is intended for normal QA and agent loops. Use full output only when inspecting evidence in detail.
Response shape
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "memory_recall",
"description": "Retrieve scoped UnifiedMemory context."
}
]
}
}
Common outcomes
| Status | Meaning |
|---|---|
200 | MCP JSON-RPC response returned. |
401 | Missing or invalid key/token. |
403 | Key lacks requested tool capability. |
404 | Connector token or MCP route not found. |
422 | Invalid JSON-RPC payload. |
Next steps
- Use the Connect an Agent guide.
- Start with Codex or Claude if your client supports remote MCP.