Claude Code Integration
Claude Code is Anthropic’s command-line AI assistant with built-in MCP support. It runs in your terminal and can access MCP servers configured in your project or user settings.Prerequisites
- Node.js and npm installed
- Cognee MCP server running (see Quickstart or Local Setup)
- OpenAI API key (for Cognee’s LLM operations)
Setup Steps
1
Install Claude Code
2
Navigate to Your Project
3
Add Cognee Server
Choose the command that matches how you started the Cognee MCP server:
- Docker (HTTP)
- Local (stdio)
Use this if you started the server with Docker:This creates a configuration in your project’s
.mcp.json file that connects to the HTTP endpoint.Options:-s project: Stores configuration in the project (requires approval per project)- Omit
-s projectto store at user level (applies to all projects)
4
Start Claude Code and Approve
5
Use Cognee Tools
Claude Code will use Cognee tools when relevant to your requests. You can explicitly ask:
- “Add this code to Cognee memory”
- “Search Cognee for authentication patterns”
- “Use Cognee to codify this repository”
Where to Use This Configuration
The configuration is stored in.mcp.json in your project directory (with -s project) or in your user settings (without it). Claude Code reads this file when starting a session in that directory.
Need Help?
Join Our Community
Get support and connect with other developers using Cognee MCP.