Connect your AI agent to MaxMem

One long-term memory, any agent. MaxMem exposes its memory API via the Model Context Protocol (MCP), so every MCP-compatible client — Claude Code, Claude Desktop, Cursor, Continue, Cline, or a custom agent you built yourself — can read and write persistent memories with a single configuration.

What you get

Two ways to connect

Local transport

stdio (best for desktop IDEs)

The MCP client spawns a small Python server on your machine. Low latency, isolated process per user. Needs Python 3.10+.

curl -fsSL https://maxmem.it/install/maxmem-mcp.sh | bash
export PATH="$HOME/.local/bin:$PATH"
export MAXMEM_API_KEY=mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx
Remote transport

streamable-http (no install, for any client)

Point your MCP client at our shared HTTPS endpoint. Nothing to install.

URL:      https://mcp.maxmem.it/mcp
Header:   X-MaxMem-Api-Key: mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx

Step 1 — Generate an API key

  1. Sign in to your MaxMem dashboard.
  2. Open API Keys.
  3. Create a key. Pick the scopes your agent actually needs — a research agent usually only needs memory:read.
  4. Copy the mm_live_... value once. You cannot retrieve it again (only the prefix is stored).

Step 2 — Configure your MCP client

Claude Code

stdio transport, project or global config.

{
  "mcpServers": {
    "maxmem": {
      "command": "maxmem-mcp",
      "env": { "MAXMEM_API_KEY": "mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx" }
    }
  }
}

Remote transport (no install):

{
  "mcpServers": {
    "maxmem": {
      "url": "https://mcp.maxmem.it/mcp",
      "headers": { "X-MaxMem-Api-Key": "mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx" }
    }
  }
}

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).

{
  "mcpServers": {
    "maxmem": {
      "command": "maxmem-mcp",
      "env": { "MAXMEM_API_KEY": "mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx" }
    }
  }
}

Cursor

Edit .cursor/mcp.json (repo-scoped) or ~/.cursor/mcp.json (global).

{
  "mcpServers": {
    "maxmem": {
      "command": "maxmem-mcp",
      "env": { "MAXMEM_API_KEY": "mm_live_xxxxxxxxxxxxxxxxxxxxxxxxx" }
    }
  }
}

Continue.dev / Cline / any generic client

If your client supports a command + env stdio definition, use the same three keys above. If it only supports remote servers, use the HTTPS URL form.

Custom agent via the official MCP SDK (Python)

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
import asyncio

async def main():
    params = StdioServerParameters(
        command="maxmem-mcp",
        env={"MAXMEM_API_KEY": "mm_live_..."},
    )
    async with stdio_client(params) as (r, w):
        async with ClientSession(r, w) as s:
            await s.initialize()
            res = await s.call_tool("memory_search", {
                "query": "what does the user prefer?",
                "external_user_id": "user-42",
            })
            print(res.content[0].text)

asyncio.run(main())

Tool reference

ToolWhat it does
memory_list_collectionsDiscover memory collections for your tenant.
memory_writePersist a memory entry: content, collection_id, external_user_id, optional memory_type (episodic / semantic / procedural / preference), tags.
memory_searchSemantic search over stored memories. Filters: external_user_id, collection_ids, memory_types, tags.
memory_user_contextCompact per-user summary, ready to paste into a system prompt.
memory_list_userFull list of memories for a user.
memory_delete_userGDPR right-to-erasure. Irreversible.
memory_bulk_writePersist many entries in one call.
memory_statsAggregate statistics for your tenant.

Security

Troubleshooting

Quotas & pricing

Your plan determines concurrent collections, max entries, monthly search / write operations, and rate limits. See the billing page in your dashboard.