Cline Integration
Cline provides a convenient interface to interact with cognee’s MCP server—much like Roo but with its own approach. This guide will walk you through setting up Cline in Visual Studio Code and configuring cognee’s MCP server, allowing you to generate knowledge graphs from your Python projects, perform deep code searches, and more.
Why Use Cline?
Cline is designed to make natural language interactions possible within your development environment. Instead of juggling multiple terminals or external tools, you can directly send requests to cognee through Cline to:
- Analyze complex codebases
- Construct visual dependency maps
- Retrieve relevant code snippets for review or refactoring
By combining Cline and cognee, you get an all-in-one solution for deeply understanding and maintaining large repositories.
Prerequisites
Before proceeding, ensure you have:
- Visual Studio Code installed.
- A local copy of the cognee repository.
- An LLM API key (default setup requires OpenAI).
Let’s get started step by step.
1. Install Cline
- Open Visual Studio Code.
- Search for “Cline” in the Extensions panel or visit the Marketplace here .
- Click Install.
Note: After installation, you’ll need to enable MCP server connections in Settings.
2. Install Cognee MCP Server
3. Configure Cline to Use Cognee
Cline locates MCP servers via a configuration file, similar to how Roo does. However, you’ll specify your own path for Cline’s settings.
- Open your Cline MCP settings file. The default location on a Mac is:
~/Library/Application\ Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
You can edit the file by typing
nano ~/Library/Application\ Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Find the current working directory where you set up the Cognee MCP server by running
pwd
-
Edit the file (using your preferred text editor, or simply
nano
) to add a new server entry for Cognee:
{
"mcpServers": {
"cognee": {
"command": "uv",
"args": [
"--directory",
"/{cognee_root_path}/cognee-mcp",
"run",
"cognee"
],
"env": {
"ENV": "local",
"TOKENIZERS_PARALLELISM": "false",
"LLM_API_KEY": "sk-...}",
"EMBEDDING_PROVIDER":"fastembed",
"EMBEDDING_MODEL":"sentence-transformers/all-MiniLM-L6-v2",
"EMBEDDING_DIMENSIONS":384,
"EMBEDDING_MAX_TOKENS"256
}
}
}
}
{cognee_root_path}
: Replace with the absolute path to where you cloned Cognee.LLM_API_KEY
: Replace the placeholder with your AI provider key.
- Save the file.
4. Restart Cline
- Once the configuration is saved, restart Cline.
- When Cline initializes, it will detect the new Cognee server from your config file.
4. Example - Use Cognee from Cline
- Navigate to the repo you want to analyze within VS Code.
- Make sure to enable Cline to use MCP servers by navigating to Settings and checking MCP Server Connection box
- Open the Cline interface — SHIFT+COMMAND+P Cline: Open in New Tab
- Type your natural language commands one-by-one to invoke the Cognee server.
# clears the databases
prune cognee
# extracts structure from the repository
run codify in this repo
# Use the `CODE` search type to query your code graph.
find dependencies and relationships between components with CODE search
Running these commands should look something like this:


With Cognee integrated into Cline, you can now seamlessly:
- Generate detailed knowledge graphs of your complex codebases.
- Search and manage tangled dependencies directly through natural language commands in your IDE.
- Build more advanced workflows around code analysis, refactoring, or knowledge retrieval.
Join the Conversation!
Have questions? Join our community now to connect with professionals, share insights, and get your questions answered!