Skip to main content

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:

FieldRequiredTypeDescription
jsonrpcYesstringUse 2.0.
idYesstring or numberCaller request id.
methodYesstringMCP/JSON-RPC method such as tools/list or tools/call.
paramsNoobjectMethod-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:

FieldRequiredDescription
connector_tokenYesShort-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 areaPurpose
recall/searchRetrieve scoped memories.
retain/writebackStore useful outcomes with writeback hygiene.
agent contextBuild pre-turn prompt context.
courtroomInspect evidence and verdicts.
canary/statusVerify 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:

FieldTypeDescription
response_formatstringcompact by default; full returns raw payloads for explicit debugging.
include_rawbooleanBypasses compaction when true.
diagnostics_onlybooleanReturns source counts, fallback status, and runtime diagnostics only.
max_response_bytesintegerCaps 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

StatusMeaning
200MCP JSON-RPC response returned.
401Missing or invalid key/token.
403Key lacks requested tool capability.
404Connector token or MCP route not found.
422Invalid JSON-RPC payload.

Next steps