Memori MCP (Model Context Protocol)

MCP (Model Context Protocol) is a standard way for AI agents to connect to external tools and APIs. With Memori's MCP server, your agent can retrieve relevant memories before answering and store durable facts after responding — keeping context across sessions without any SDK integration.

Why Use MCP

Without MCP, your agent only sees the current conversation. With MCP, it can:

  • Store stable user facts and preferences after answering using the advanced_augmentation tool
  • Recall relevant memories before answering using the recall tool
  • Maintain context across sessions using entity_id, process_id, and session_id

MCP is ideal for IDE agents (Cursor, Claude Code, Codex, Warp, Antigravity) and other MCP-compatible clients where you want persistent memory without writing integration code.

Server Details

PropertyValue
ServerMemori MCP
Endpointhttps://api.memorilabs.ai/mcp/
TransportStateless HTTP
AuthAPI key via request headers

Headers

  • Name
    X-Memori-API-Key
    Type
    string
    Required
    Required
    Description

    Your Memori API key from app.memorilabs.ai.

  • Name
    X-Memori-Entity-Id
    Type
    string
    Required
    Required
    Description

    Stable end-user or entity identifier (e.g. user_123).

  • Name
    X-Memori-Process-Id
    Type
    string
    Description

    Optional process, app, or workflow identifier (e.g. my_agent) for memory isolation.

session_id is derived automatically as <entity_id>-<UTC year-month-day:hour>. You do not need to provide it.

Tools

recall

Fetches relevant memories at the start of a user turn.

  • Name
    query
    Type
    string
    Required
    Required
    Description

    The latest user message — typically passed verbatim.

entity_id is read from MCP headers. process_id is read when provided. Returns a structured memory payload with relevant context.

advanced_augmentation

Stores durable memory after the agent has drafted a response.

  • Name
    user_message
    Type
    string
    Required
    Required
    Description

    The user's message for this turn.

  • Name
    assistant_response
    Type
    string
    Required
    Required
    Description

    The assistant's response for this turn.

entity_id is read from MCP headers. process_id is read when provided. Returns a confirmation: memory being created.

Example Agent Flow

Given the user message: "I prefer Python and use uv for dependency management."

  1. Agent calls recall with the user message as query
  2. Agent composes a response using any returned facts
  3. Agent sends the response to the user
  4. Agent calls advanced_augmentation with the user_message and assistant_response

On a later turn like "Write a hello world script", the agent recalls the Python + uv preference and personalizes its response.

Validation Checklist

After configuring your client, verify the setup:

  • MCP server shows as connected and healthy in your client UI
  • Tools list includes recall and advanced_augmentation
  • Calls return non-401 responses
  • recall returns memories for known entities
  • advanced_augmentation returns memory being created