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
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 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. A few possible configurations look like the following:
-
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 Roo will connect to it:
- 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-...
.
- Replace
-
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 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