Get the FREE Ultimate OpenClaw Setup Guide →

cognee

MCP server from JeromyJSmith/cognee-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jeromyjsmith-cognee-mcp-server /Users/{user}/cognee/.venv/bin/uv --directory /Users/{user}/cognee/cognee-mcp run cognee \
  --env ENV="local" \
  --env LLM_API_KEY="sk-" \
  --env TOKENIZERS_PARALLELISM="false"

How to use

This MCP server implements Cognee for Claude Desktop, exposing a Cognee-based chat/assistant pipeline via the MCP framework. The primary Cognee server runs through uv inside a Python virtual environment and is configured with local environment variables to control behavior, tokenization parallelism, and API keys. A companion filesystem service is also exposed via the server-filesystem MCP package, enabling Claude to interact with user directories such as Desktop and Projects through a standardized interface. Use the Cognee tools to process prompts, manage model interactions, and access file-system capabilities within Claude.

To use, start the Cognee MCP server via your Claude client configuration. The main server is invoked by uv with a specified directory containing the Cognee MCP code and a run cognee command. The filesystem service is provided as a separate MCP endpoint and can be referenced by Claude to perform file operations within the allowed paths. Ensure the environment variables are set (ENV, TOKENIZERS_PARALLELISM, LLM_API_KEY) to match your local setup and API keys before starting the server, then restart Claude Desktop to pick up the new MCP configuration.

How to install

Prerequisites:

  • Python 3.9+ and virtualenv capabilities
  • uv installed in the Python environment
  • Node.js/npm for optional CLI tools (if using Smithery or npx tools)
  • Optional: PostgreSQL for local development dependencies

Manual installation steps:

# 1) Clone the cognee MCP repository (as per your setup)
# Replace with the actual repository you intend to use
# git clone https://www.github.com/topoteretes/cognee
# 2) Install uv via Python package manager
pip install uv
# 3) Install required OS packages (macOS example)
brew install postgresql
# 4) Install Rust if building native components (required by some dependencies)
brew install rust
# 5) Enable and activate the Python virtual environment for Cognee MCP
# This assumes you have a venv created in cognee/.venv
cd cognee-mcp
uv sync --dev --all-extras

# Activate the venv (example path shown in README)
source .venv/bin/activate
# 6) Ensure the MCP config file is in Claude's config directory and restart Claude
# The config snippet in README should be placed into claude_desktop_config.json

Smithery installation (optional but automated):

# Install Cognee for Claude Desktop automatically
npx -y @smithery/cli install cognee --client claude

Note: After installation, define cognify tools in server.py and restart Claude Desktop. Ensure any environment variables required by Cognee are provided in the MCP config (ENV, TOKENIZERS_PARALLELISM, LLM_API_KEY) and that file system paths are correct for your environment.

Additional notes

Tips and notes:

  • The mcp_config includes a Cognee server instance and a separate server-filesystem instance. Ensure the paths use your actual user directory or replace {user} with your username.
  • Environment variables: ENV is commonly set to local for local development; TOKENIZERS_PARALLELISM can be set to false to avoid tokenizer bottlenecks; LLM_API_KEY should be your actual API key for the LLM backend.
  • After changing the MCP configuration, restart Claude Desktop to apply changes.
  • If you encounter path or permission errors, verify that the venv has the uv executable at the specified path and that filesystem access aligns with your OS permissions.
  • The server-filesystem endpoint relies on npx and the @modelcontextprotocol/server-filesystem package; ensure npm is installed and accessible.
  • Placeholder paths like /Users/{user}/... should be updated to your actual user paths before running.

Related MCP Servers

Sponsor this space

Reach thousands of developers