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 Palace.

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)",
  "palace_id": "string (optional)",
  "limit": "number (optional, default 20, max 50)"
}

unimatrix_list_palaces / unimatrix_get_palace

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

  1. Call unimatrix_list_palaces
  2. Call unimatrix_get_palace on the most relevant palace(s)
  3. Optionally follow up with unimatrix_search_memories

Additional Tools

unimatrix_create_palace
Create a new top-level memory workspace.
Requires: name (string). Optional: description, is_public
unimatrix_create_location
Create a "room" inside a palace (supports parent_id for nesting).
Requires: palace_id, name
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
Palace, 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_palaces
2. Call unimatrix_search_memories or unimatrix_get_palace on the most relevant workspace(s)
3. 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