Cognee MCP is the MCP server component of the open-source AI memory platform Cognee. Its goal is to provide Cognee's memory engine to AI agents in the form of a Model Context Protocol service, enabling agents to have persistent long-term memory and to be queried from any MCP-compatible client (terminal or IDE).
In terms of main capabilities, it provides a streamlined memory API that exposes only three core tools—remember, recall, and forget—for agent memory workflows. Among them, remember can store text, or ingest uploaded files of no more than 10 MB via filename and content_base64; with a session_id it writes to the fast session cache (text only), and without a session_id it writes to permanent graph memory. recall supports automatic routing, prioritizes searching the session cache, and can attach session and search controls. forget can delete a single piece of data, a certain dataset, or all of one's own memories. In addition, it provides a cognify_status progress check and an improve tool. The server integrates logging, writing all operations to a rotating file and mirroring them to the console; it supports session-aware memory; and it provides code_search code graph search, which can perform query_facts, explore, traverse, find_path, impact_analysis, insights, architecture, delta, as well as capabilities, search, neighbors, subgraph, flows, hubs, ask and other operations on indexed code datasets, where search and ask accept natural language questions.
In terms of usage, it supports three transports: stdio (default), SSE (--transport sse), and Streamable HTTP (--transport http, recommended for web deployments). Connection modes include: direct mode (default, local SQLite, LanceDB, Ladybug databases, full functionality); cloud mode (connect to Cognee Cloud or a remote instance via --serve-url or COGNEE_SERVICE_URL, requiring --serve-api-key or COGNEE_API_KEY, automatically skips database migration); API mode (connects to an already running Cognee FastAPI server via --api-url, with optional --api-token, exposing only the memory API). Installation steps: clone the repository, enter the cognee-mcp subdirectory, install uv, run uv sync --dev --all-extras --reinstall, activate the virtual environment, set LLM_API_KEY in .env, then run python src/server.py or start with transport parameters. Docker can also be used: build locally or pull cognee/cognee-mcp:main from Docker Hub, select the transport via the TRANSPORT_MODE environment variable, and install optional dependency groups at runtime via EXTRAS (such as aws, postgres, neo4j, turso, scraping, langchain, llama-index, anthropic, groq, mistral, ollama/huggingface, docs, tracing, redis, etc.). If there is no API key and the MCP host grants sampling capability, you can set LLM_PROVIDER="mcp-sampling" to delegate completions to the host model, but embeddings still require a provider; host support varies, and as of early 2026 Claude Code has not yet granted sampling.
Applicable scenarios include: building persistent memory for AI agents, storing and retrieving memory through MCP clients in an IDE or terminal, structured graph search and impact analysis of codebases, and centralized deployment where multiple MCP servers share the same knowledge graph.
Limitations and caveats: HTTP and SSE transports validate the Host and Origin headers to block DNS rebinding attacks; unrecognized Host returns 421, and unrecognized Origin returns 403; when binding to a non-loopback address, by default only localhost/127.0.0.1/[::1] are accepted, so an allowlist must be configured or protection disabled only on trusted networks. Docker uses environment variables rather than command-line arguments. In API mode, database migration is automatically skipped and some features are limited; operational auxiliary tools such as cognify, search, list_data, delete, and prune are not exposed as MCP tools. Regarding charges, pricing, and specific results, the materials do not provide information.