cognee-mcp logo

cognee-mcp

Free

GraphRAG 记忆服务器,支持自定义摄取、数据处理和搜索。

FreeFree tier
Type
Open Source

About cognee-mcp

Cognee-mcp is a Model Context Protocol (MCP) server that wraps cognee's memory engine, allowing agents and MCP-compatible clients to build, store, and query memory. It supports multiple transports (stdio, SSE, Streamable HTTP), cloud and API connection modes, and exposes a minimal memory API with remember, recall, and forget tools. The server is open source, runs locally or in Docker, and integrates with AI assistants (e.g., Claude Desktop) for persistent, session-aware memory workflows.

Key Features

Multiple transports: Streamable HTTP, SSE, and stdio
Cloud Mode – connect to Cognee Cloud via service URL
API Mode – connect to an existing Cognee FastAPI server
Minimal memory API: remember, recall, and forget tools
Session-aware memory with separate session cache and permanent graph memory
Focused recall with optional session and search controls
Integrated logging to rotating files and console
Docker support for containerized deployment

Pros & Cons

Pros
  • Multiple transport options for different deployment needs (web, streaming, pipes)
  • Session-aware memory enables both transient and persistent storage
  • Open source (MIT licensed) with full access to source code
  • Docker support simplifies deployment and environment management
  • Minimal API surface (three tools) makes it easy to integrate
  • Supports MCP sampling delegation to host LLM (no API key needed if host supports it)
Cons
  • Requires an LLM API key (e.g., OpenAI) for default operation
  • MCP sampling capability is not yet supported by all hosts (e.g., Claude Code as of early 2026)
  • Visualize graph tool requires building UI bundle manually in non-Docker setups
  • Documentation is primarily code-based README; some configuration steps are manual

Best For

Building long-term memory for AI agents in terminal or IDE environmentsAdding persistent memory to MCP-compatible clients (Claude Desktop, etc.)Prototyping agent workflows with minimal setup and recall capabilitiesDeploying memory infrastructure in production via Streamable HTTP transport

FAQ

What is cognee-mcp?
Cognee-mcp is an open-source Model Context Protocol (MCP) server that runs cognee's memory engine, providing agents and MCP clients with persistent memory via remember, recall, and forget tools.
What transports does cognee-mcp support?
It supports three transports: Streamable HTTP (recommended for web deployments), SSE (real-time streaming), and stdio (classic pipe, default).
Do I need an LLM API key to run cognee-mcp?
By default you need an OpenAI API key set as LLM_API_KEY in .env. However, you can use MCP sampling if your host grants the capability (set LLM_PROVIDER='mcp-sampling') to delegate completions to the host's own model, though not all hosts support it yet.
Can I run cognee-mcp in Docker?
Yes. The repository provides a Dockerfile and you can either build the image locally or use a pre-built image. Docker usage is documented in the README.