MCP memory server

MCP memory. One memory, every agent.

Cognee is an open-source MCP memory server. It gives Claude Code, Cursor, and any MCP client one shared, persistent graph memory — built from your documents and data, available in every session.

What is MCP memory?

The Model Context Protocol (MCP) lets an agent call external tools. A memory MCP server exposes memory as tools — store, search, recall — so the agent can remember across sessions instead of starting from zero. Most memory MCP servers persist flat notes or vector chunks; cognee builds a knowledge graph with a vector index on top, which is what makes agent memory reliable: connected facts, not just similar text.

Because the memory lives in the server rather than in one tool's config files, Claude Code, Cursor, and Claude Desktop read and write the same memory. For the longer explainer, read what MCP memory is and how to add it to any client. New to the topic? Start with what AI memory is or see how cognee compares to mem0 and Zep.

Get running

Start the server with Docker, then connect your client. The HTTP endpoint serves every MCP client at once.

docker — start the server
$ echo "LLM_API_KEY=your_api_key_here" > .env
$ docker run -e TRANSPORT_MODE=http --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
claude code — connect
# HTTP transport (server from the Docker step)
$ claude mcp add --transport http cognee http://localhost:8000/mcp -s project

# Or run locally over stdio
$ claude mcp add cognee -s project -e LLM_API_KEY="your-key" -- uv --directory /path/to/cognee-mcp run cognee-mcp
cursor & other mcp clients
# Point your client at the HTTP endpoint
http://localhost:8000/mcp

Cursor, Claude Desktop, Continue, Cline, and Roo Code all connect to the same endpoint — see the per-client guides for setup details.

What your agent gets

Persistent project memory

Context survives across sessions. Your agent picks up tomorrow where it left off today, instead of starting from zero.

Graph search over your data

Cognee builds a knowledge graph from your documents and data, so agents retrieve connected facts — not just similar text.

One memory, shared everywhere

Claude Code, Cursor, and every other MCP client you use read and write the same memory. Switch tools without losing context.

MCP memory FAQ

What is an MCP memory server?
An MCP memory server is a Model Context Protocol server that exposes memory tools — store, search, and recall — to any MCP-compatible client. Instead of each agent keeping its own notes, Claude Code, Cursor, Claude Desktop, and other clients call the same server and share one persistent memory across sessions and tools.
How is cognee's MCP memory different from Claude Code's built-in memory?
Claude Code's built-in memory is a set of markdown files scoped to one tool. Cognee builds a knowledge graph plus vector index from your documents, repos, and conversations, so recall is a graph search over connected facts rather than a file read — and the same memory is available to every MCP client, not just Claude Code.
Which MCP clients work with cognee?
Any client that speaks MCP over HTTP or stdio: Claude Code, Cursor, Claude Desktop, Continue, Cline, Roo Code, Codex, OpenClaw, Hermes Agent, and custom agents built with the OpenAI Agents SDK, LangGraph, or Google ADK.
Is the cognee MCP memory server open source and self-hostable?
Yes. The server ships as the cognee/cognee-mcp Docker image and as a Python package in the open-source cognee repository. Run it locally, in Docker, or on-prem with your own LLM and database keys, or use Cognee Cloud if you prefer managed memory.

Go deeper

Give your agents memory that lasts.