cognee/cognee-mcp
Vasilije b58d7d44f3
fix: 0.1.41 Release (#894)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.

---------

Signed-off-by: Diego B Theuerkauf <diego.theuerkauf@tuebingen.mpg.de>
Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
Co-authored-by: Boris Arzentar <borisarzentar@gmail.com>
Co-authored-by: Boris <boris@topoteretes.com>
Co-authored-by: Igor Ilic <igorilic03@gmail.com>
Co-authored-by: Hande <159312713+hande-k@users.noreply.github.com>
Co-authored-by: Matea Pesic <80577904+matea16@users.noreply.github.com>
Co-authored-by: hajdul88 <52442977+hajdul88@users.noreply.github.com>
Co-authored-by: Daniel Molnar <soobrosa@gmail.com>
Co-authored-by: Diego Baptista Theuerkauf <34717973+diegoabt@users.noreply.github.com>
Co-authored-by: Dmitrii Galkin <36552323+dm1tryG@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
2025-05-31 02:19:29 +02:00
..
src fix: 0.1.41 Release (#894) 2025-05-31 02:19:29 +02:00
.python-version ruff format 2025-01-05 19:09:08 +01:00
Dockerfile fix: 0.1.41 Release (#894) 2025-05-31 02:19:29 +02:00
entrypoint.sh fix: 0.1.41 Release (#894) 2025-05-31 02:19:29 +02:00
pyproject.toml fix: 0.1.41 Release (#894) 2025-05-31 02:19:29 +02:00
README.md fix: run cognee in Docker [COG-1961] (#775) (#779) 2025-04-23 21:35:48 +02:00
uv.lock fix: 0.1.41 Release (#894) 2025-05-31 02:19:29 +02:00

cognee MCP server

Installing Manually

A MCP server project

  1. Clone the cognee repo

  2. Install dependencies

brew install uv
cd cognee-mcp
uv sync --dev --all-extras --reinstall
  1. Activate the venv with
source .venv/bin/activate
  1. Add the new server to your Claude config:

The file should be located here: ~/Library/Application\ Support/Claude/

cd ~/Library/Application\ Support/Claude/

You need to create claude_desktop_config.json in this folder if it doesn't exist Make sure to add your paths and LLM API key to the file bellow Use your editor of choice, for example Nano:

nano claude_desktop_config.json
{
	"mcpServers": {
		"cognee": {
			"command": "/Users/{user}/cognee/.venv/bin/uv",
			"args": [
        "--directory",
        "/Users/{user}/cognee/cognee-mcp",
        "run",
        "cognee"
      ],
      "env": {
        "ENV": "local",
        "TOKENIZERS_PARALLELISM": "false",
        "LLM_API_KEY": "sk-"
      }
		}
	}
}

Restart your Claude desktop.

Installing via Smithery

To install Cognee for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install cognee --client claude

Define cognify tool in server.py Restart your Claude desktop.

To use debugger, run:

mcp dev src/server.py

Open inspector with timeout passed:

http://localhost:5173?timeout=120000

To apply new changes while developing cognee you need to do:

  1. poetry lock in cognee folder
  2. uv sync --dev --all-extras --reinstall
  3. mcp dev src/server.py

Development

In order to use local cognee build, run in root of the cognee repo:

poetry build -o ./cognee-mcp/sources

After the build process is done, change the cognee library dependency inside the cognee-mcp/pyproject.toml from

cognee[postgres,codegraph,gemini,huggingface]==0.1.38

to

cognee[postgres,codegraph,gemini,huggingface]

After that add the following snippet to the same file (cognee-mcp/pyproject.toml).

[tool.uv.sources]
cognee = { path = "sources/cognee-0.1.38-py3-none-any.whl" }