Roo Code Integration
Roo provides a convenient interface to interact with cognee’s MCP server—much like Cline but with its own approach. This guide will walk you through setting up Roo 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 Roo?
Roo 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 Roo to:
- Analyze complex codebases
- Construct visual dependency maps
- Retrieve relevant code snippets for review or refactoring
By combining Roo 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 Roo
- Open Visual Studio Code.
- Search for “Roo” in the Extensions panel or visit the Marketplace here .
- Click Install.
Note: After installation, you’ll see a Roo icon that you can use to interact with the extension.
2. Install Cognee MCP Server
3. Configure Roo to Use Cognee
Roo locates MCP servers via a configuration file, similar to how Cline does. However, you’ll specify your own path for Roo’s settings.
- Open the Roo MCP settings file in your home or user directory. (The exact path may vary depending on your OS or custom setup.)
- Insert a new entry for the cognee server. It should look something like this:
{
"mcpServers": {
"cognee": {
"command": "uv",
"args": [
"--directory",
"/{absolute_path_to}/cognee/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
}
}
}
}
- Replace
/{absolute_path_to}/cognee/cognee-mcp
with the full path to your cloned cognee repo. - Enter your LLM API key in place of
sk-...
.
- Save your settings file and exit.
4. Restart Roo
Click restart button in MCP servers window to ensure the updated Roo configuration is applied. You should see Roo recognizing the cognee server on startup.

5. Use Roo + Cognee for Code Analysis
Once Roo is configured, you can begin interacting with cognee right from your IDE:
-
Open your project in VS Code to locate the Roo interface and codify your codebase to generate a knowledge graph. For example:
Tip: For larger codebases with deep dependencies, consider setting up incremental indexing or caching to speed up repeated analyses.
-
Use the CODE search type to query your freshly generated knowledge graph.
-
Get your results promptly
Join the Conversation!
Have questions? Join our community now to connect with professionals, share insights, and get your questions answered!