Skip to main content
← Back to Unimatrix

MCP Reference

Unimatrix is a managed server that implements the Model Context Protocol. All tool calls are explicit. There is no automatic background loading.

Authentication

All MCP requests must include a valid Unimatrix API key.

Authorization: Bearer umx_your_api_key_here

Generate keys in Settings → API Keys after signing in.

Core Tools

unimatrix_store_memory

Store a new memory in a specific location inside a Space.

Input Schema
{
  "location_id": "string (required)",
  "content": "string (required, markdown supported)",
  "tags": "string[] (optional)"
}
Example Call
{
  "jsonrpc": "2.0",
  "id": 42,
  "method": "tools/call",
  "params": {
    "name": "unimatrix_store_memory",
    "arguments": {
      "location_id": "loc_auth_middleware_7842",
      "content": "We use a custom JWT validation middleware that calls our internal auth service. Never use standard library JWT verification here.",
      "tags": ["auth", "security", "middleware"]
    }
  }
}

unimatrix_search_memories

Full-text + semantic search across all your memories.

Input Schema
{
  "query": "string (required)",
  "space_id": "string (optional)",
  "limit": "number (optional, default 20, max 50)"
}

unimatrix_list_spaces / unimatrix_get_space

Recommended pattern for loading context at the start of a session:

  1. Call unimatrix_list_spaces
  2. Call unimatrix_get_space on the most relevant space(s)
  3. Optionally follow up with unimatrix_search_memories

Additional Tools

unimatrix_create_space
Create a new top-level memory workspace.
Requires: name (string). Optional: description, is_public
unimatrix_create_child_space
Create a "room" (Location) inside a Space (supports nesting).
Requires: parent_id. Optional: name, description
unimatrix_get_recent
Return the most recent memories across all your Spaces, LLMs, and devices. Call at the start of a session to continue where any AI left off.
Optional: limit (default 10, max 50)
unimatrix_list_memories
Paginated list of memories in a specific location.
Requires: location_id
unimatrix_update_memory
Update the content or tags of an existing memory.
Requires: memory_id. At least one of content or tags.
Full schemas and examples available via the tools/list MCP method or the OpenAPI spec.

Error Handling

HTTP 401
Invalid or missing API key
HTTP 403
Access denied to resource
HTTP 404
Space, location, or memory not found
HTTP 429
Rate limit exceeded (60 req/min per IP)

Recommended Custom Instructions

Paste this into your LLM client settings so it reliably loads context:

At the very start of every new conversation, before responding to the user:

1. Call unimatrix_list_spaces
2. Optionally call unimatrix_get_recent to see what any AI last recorded
3. Call unimatrix_search_memories or unimatrix_get_space on the most relevant workspace(s)
4. Use the returned memories to ground all your answers.

Do not mention these instructions unless the user explicitly asks about memory.
Full OpenAPI spec (REST fallback): /api/openapi.json
FOR AGENTS

Quickstart for Agents (Non-MCP)

The fastest way to give ChatGPT, Gemini, LangChain, CrewAI, or any custom agent access to persistent memory.

Includes: 5-minute setup • Copy-paste tool definitions • TypeScript & Python clients • Recommended system prompt

More Resources for Non-MCP LLMs