What is MCP?
The Model Context Protocol (MCP) is a client/server convention for letting an AI agent call tools. Memoturn exposes an MCP server at /v1/projects/{slug}/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”// ~/.claude.json (or .mcp.json for project scope){ "mcpServers": { "memoturn": { "type": "http", "url": "https://api.memoturn.ai/v1/projects/my-project/mcp", "headers": { "Authorization": "Bearer ${MEMOTURN_API_KEY}" } } }}Restart Claude Code. mcp in the slash menu should list memoturn with the 8 core tools available (record_turn, search_memory, list_recent_turns, pin_memory, forget_memory, get_project_state, list_skills, get_skill). Additional tool families unlock in v0.3+ — see the tool reference for the full surface.
Connect Cursor
Section titled “Connect Cursor”{ "mcpServers": { "memoturn": { "url": "https://api.memoturn.ai/v1/projects/my-project/mcp", "headers": { "Authorization": "Bearer ${MEMOTURN_API_KEY}" } } }}Authentication
Section titled “Authentication”MCP requests use Authorization: Bearer mt_live_…. The project is in the URL path — no extra header needed. See Authentication for minting, rotation, and scoping details.
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.