What is MCP?
The Model Context Protocol (MCP) is a client/server convention for letting an AI agent call tools. Memoturn ships an MCP server at https://api.memoturn.ai/v1/mcp that any MCP-aware client (Claude Code, Cursor, Codex, Continue, etc.) can use to record turns, search memory, and subscribe to live updates — without writing any glue code.
Underneath, the server speaks JSON-RPC 2.0 over HTTP (the MCP “Streamable HTTP” transport). You don’t usually see this directly — your client wraps it.
Connect Claude Code
Section titled “Connect Claude Code”{ "mcpServers": { "memoturn": { "transport": "http", "url": "https://api.memoturn.ai/v1/mcp", "headers": { "Authorization": "Bearer ${MEMOTURN_API_KEY}", "X-Project-Id": "my-project" } } }}Restart Claude Code. mcp in the slash menu should list memoturn with all 12 tools available.
Connect Cursor
Section titled “Connect Cursor”{ "mcpServers": { "memoturn": { "url": "https://api.memoturn.ai/v1/mcp", "headers": { "Authorization": "Bearer ${MEMOTURN_API_KEY}", "X-Project-Id": "my-project" } } }}Authentication
Section titled “Authentication”Every request needs two headers:
| header | value |
|---|---|
Authorization | Bearer <api key from the dashboard> |
X-Project-Id | The project slug. Memory is scoped per-project. |
API keys are project-scoped — minted in the dashboard, hashed in KV, never logged. The acting-user email is bound to the key at mint time (it’s whoever was signed into the dashboard when the key was issued); turns recorded with this key are stamped with that email automatically. Rotate via the dashboard; old hashes revoke instantly.
Live updates
Section titled “Live updates”Subscribe over WebSocket to wss://api.memoturn.ai/v1/projects/<slug>/subscribe. Events arrive as JSON: turn_recorded, memory_pinned, memory_forgotten, broadcast_set, presence_updated, consolidation_completed. The SDK has a typed subscribe() AsyncIterable that wraps this.
See the tool reference for every method available over MCP.