Cognee logo

Cognee

by topoteretes

Stores, searches, and deletes session or graph memory, with optional code-graph queries over MCP.

Install Cognee

Run the project’s own setup commands, in order.

Setup steps from the project

topoteretes/cognee installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Start the server
    uv run fastmcp dev src/server.py:mcp
    
  2. 2. Install
    uv sync --reinstall
    

Overview

topoteretes/cognee exposes Cognee’s memory engine through MCP for storing, recalling, and deleting agent data. It separates fast session-cache entries from permanent graph memory and can ingest text or files up to 10 MB. The server also supports background ingestion status checks and deterministic code-graph searches. Reach for it when an agent needs persistent knowledge, session context, or indexed code exploration through stdio, SSE, or Streamable HTTP.

Use cases

  • Store persistent agent knowledge
  • Recall session and graph context
  • Ingest text and uploaded files
  • Delete datasets or owned memory
  • Explore indexed code graphs

Key features

  • Session cache and permanent graph memory
  • Text and file ingestion up to 10 MB
  • Automatic session-first recall routing
  • Dataset and item-level deletion
  • Background ingestion status checks
  • Code-graph search and analysis

Tools4

What Cognee lets your agent do. Expand a tool for its parameters.

Self-reported~187 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

48/49 checks healthy over the last 90d

Supply-chain signal

1 high-severity advisory on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 1High 0Medium 0Low 1

Scanned 20d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars33kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Cognee works

What topoteretes/cognee does

topoteretes/cognee connects MCP clients to Cognee’s memory engine, which uses graph and vector stores to manage information for AI applications and agents. The memory API centers on three operations: remember stores information, recall searches it, and forget removes it.

Input can be plain text or an uploaded file represented by a filename and base64 content. Uploaded files are limited to 10 MB. Cognee also supports ingestion from more than 30 data sources through its broader configuration options.

A separate code_search capability supports queries against indexed code datasets. It can inspect symbols, dependencies, architecture, relationships, and potential change impact.

How it works

remember uses session_id to choose between two storage paths. With a session ID, text is placed in a fast session cache. Without one, the data becomes permanent graph memory. recall checks the session cache first when a session ID is supplied, then searches the permanent graph if needed.

Memory can be removed by dataset name or ID, or by an individual data item using its data_id together with its dataset_id. Both item identifiers can be returned by recall when include_references=True. The everything=True option removes all memory owned by the caller.

Long-running ingestion can be started with remember(background=True). Its progress is checked through cognify_status, which is discoverable with search_tools and callable by name even though it is not advertised by default.

Code-graph queries select an operation and pass operation-specific arguments. Supported operations include fact queries, exploration, traversal, path finding, impact analysis, insights, architecture, and delta checks, along with navigation operations such as search, neighbors, subgraphs, flows, hubs, and ask.

Setup and configuration

The repository includes the MCP server in the cognee-mcp directory. A typical local setup uses uv to install the development dependencies, activates the resulting virtual environment, and starts src/server.py.

The default transport is stdio. The server can also run with SSE or Streamable HTTP; HTTP accepts a host, port, and MCP path and is intended for web deployments. Docker usage supports the same transport modes through TRANSPORT_MODE.

A minimal setup uses LLM_API_KEY in a .env file. The server can connect to Cognee Cloud with --serve-url or COGNEE_SERVICE_URL, or connect to an existing Cognee FastAPI server. Optional dependency groups cover storage backends, model providers, document processing, scraping, tracing, and related integrations.

If the MCP host provides sampling, LLM_PROVIDER="mcp-sampling" can delegate completions to the host instead of requiring an LLM API key. Embeddings still require a provider.

Tools and capabilities

  • remember: store text, session data, permanent graph memory, or a base64-encoded file.
  • recall: search session and graph memory with optional session and search controls.
  • forget: delete an item, dataset, or all owned memory.
  • cognify_status: inspect background ingestion progress.
  • code_search: query indexed code graphs using analysis and navigation operations.
  • Multiple MCP transports: stdio, SSE, and Streamable HTTP.
  • Rotating file logs, with console output in development.

Limitations and notes

Session-cache storage is text-only, while file ingestion uses the 10 MB upload limit. cognify_status is not advertised in the default tool list and must be discovered through search_tools before use. Code-graph queries require an indexed code dataset. Available storage, model, and document features depend on the selected optional dependencies and configuration.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cognee

topoteretes/cognee is an MCP server that connects AI clients to Cognee’s memory engine and exposes tools for storing, recalling, and deleting memory. It supports session-cache and permanent graph memory, file ingestion up to 10 MB, background ingestion status checks, and indexed code-graph queries through `code_search`.

Install it from the repository’s `cognee-mcp` directory with `uv sync --dev --all-extras --reinstall`, activate the virtual environment, configure `LLM_API_KEY` in `.env`, and run `python src/server.py`. The server defaults to stdio and also supports SSE and Streamable HTTP.

Pass a `session_id` to `remember` for fast text-only session caching. Without a session ID, `remember` writes permanent graph memory. When `recall` receives a session ID, it searches the session cache first and then falls back to the permanent graph.

Use `forget` to remove a dataset by name or ID, delete one item with its `data_id` and `dataset_id`, or remove all owned memory with `everything=True`. `recall` can return the item references needed for targeted deletion when `include_references=True`.

Yes, topoteretes/cognee supports Streamable HTTP, SSE, and stdio. Stdio is the default; SSE runs with `--transport sse`, while HTTP runs with `--transport http` and accepts host, port, and path options.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCognee AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/topoteretes-cognee?style=directory)](https://allmcps.com/mcp/topoteretes-cognee)
HTML Embed
<a href="https://allmcps.com/mcp/topoteretes-cognee"><img src="https://allmcps.com/api/badge/topoteretes-cognee?style=directory" alt="Cognee on AllMCPs" /></a>