About Roo-Code Agents & MCP Setup
Roo-Code Agents & MCP Setup is a configuration framework that combines the open-source Roo Code AI agent with MCP to enhance coding capabilities for complex projects with domain-specific context.
Key features
- 01Configure multiple agent modes (SPARC Agents)
- 02Connect custom MCP servers for domain expertise
- 03Support multiple LLM provider APIs
- 04Integrate feedback loops for code evaluation
- 05Complete agent configuration management
Use cases
- 01Autonomous code generation and debugging
- 02Add domain-specific context for specialized projects
- 03Leverage multiple LLM providers for development
- 04Improve generated code quality through evaluation
MCP support
The setup connects Roo Code to custom MCP servers like mcp-code, providing domain-specific knowledge and tools to the agent for more informed coding decisions.
Details
From the project READMERoo-Code Agents & MCP Setup
Credit
All thanks to Pablof7z who made this setup and gave the workshop at SEC.
Introduction
Roo Code is an autonomous open-source AI agent designed to code, debug, and evolve software systems with minimal human input. Its like cursor, but unleashed. It is extremely customizable and here we are going to get it OVER 9000!.
The following setup is to have roocode, (github) better agentic capabilities even for complex projects and augment it with MCP to provide domain specific context.
Prerequisites
-
Install roo-code if you don't have it yet, following official documentation or if you have VSCode, download from Extensions.
-
Clone this repo.
-
Clone the
mcp-coderepo anywhere you want and follow its instructions to build it. This is our MCP server built for Nostr. -
Install
cursor-toolsfrom their github (not strictly necessary). This is for the feedback loop using gemini for the code generated for evaluation. -
Get an API key from any of your LLM providers, OpenRouter, PPQ.ai(accepts lightning) are good ones that allow you to use many of the latest LLMs
Info on files
.roomodes: Has all the info on all the different modes(agents) we have configured in SPARC..cursorrules: Has the rules forcursor-tools
Steps
-
Create a test project directory & copy all the files (incl dotfiles) from the settings directory in to your test project directory.
-
Start VSCode with roocode installed.
-
Go in to Settings & setup your API keys & endpoints.
-
Once you get out of roocode settings and look under the chat section, you should see the SPARC Agents:
- Connect to your
mcp-codeMCP server by clicking the MCP server icon andEdit Project MCPand adding the following:
{
"mcpServers": {
"mcp-code": {
"command": "<FULL/PATH/TO/mcp-code>",
"args": [
"mcp"
],
"alwaysAllow": [
"find_snippets",
"find_user",
"list_usernames",
"fetch_snippet_by_id",
"publish-new-code-snippet",
"wallet_balance",
"deposit",
"zap",
"create_pubkey"
],
"disabled": false
}
}
}
Usage
We are fully setup to test our setup. We will do a comparative test.
Open another instance of VSCode with roocode in a vanilla-test-roo project directory that doesn't have these config files and no MCP server setup.
Now, enter the same prompt for simple app idea in both the projects and see if you have any difference. Choose an app idea for Nostr since we have set this setup for nostr domain expertise.
Example prompt: make a cli app to post GM fiatjaf
LICENSE: GPL-2.0
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.