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
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).
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:
-
Edit the file (using your preferred text editor, or simply
nano) to add a new server entry for Cognee. There are a few possible configurations:-
The easiest setup is to have the Cognee MCP server running in http transport mode (e.g. by following the quickstart guide).
In this case, add the following to your mcp.json:
-
On the other hand, if you cloned the Cognee github repository, and want to run the MCP server in stdio transport mode,
you can add the following configuration to your mcp.json, which will run the mcp server and Cline will connect to it:
{cognee_root_path}: Replace with the absolute path to where you cloned Cognee.LLM_API_KEY: Replace the placeholder with your AI provider key.
-
The easiest setup is to have the Cognee MCP server running in http transport mode (e.g. by following the quickstart guide).
In this case, add the following to your mcp.json:
- 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.
5. 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.


- 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.