create-sparc
Version:
NPX package to scaffold new projects with SPARC methodology structure
402 lines (316 loc) โข 16.5 kB
Markdown
# Roo Modes and MCP Integration Guide
## Overview
This guide provides information about the various modes available in Roo and detailed documentation on the Model Context Protocol (MCP) integration capabilities.
Create by @ruvnet
## Available Modes
Roo offers specialized modes for different aspects of the development process:
### ๐ Specification Writer
- **Role**: Captures project context, functional requirements, edge cases, and constraints
- **Focus**: Translates requirements into modular pseudocode with TDD anchors
- **Best For**: Initial project planning and requirement gathering
### ๐๏ธ Architect
- **Role**: Designs scalable, secure, and modular architectures
- **Focus**: Creates architecture diagrams, data flows, and integration points
- **Best For**: System design and component relationships
### ๐ง Auto-Coder
- **Role**: Writes clean, efficient, modular code based on pseudocode and architecture
- **Focus**: Implements features with proper configuration and environment abstraction
- **Best For**: Feature implementation and code generation
### ๐งช Tester (TDD)
- **Role**: Implements Test-Driven Development (TDD, London School)
- **Focus**: Writes failing tests first, implements minimal code to pass, then refactors
- **Best For**: Ensuring code quality and test coverage
### ๐ชฒ Debugger
- **Role**: Troubleshoots runtime bugs, logic errors, or integration failures
- **Focus**: Uses logs, traces, and stack analysis to isolate and fix bugs
- **Best For**: Resolving issues in existing code
### ๐ก๏ธ Security Reviewer
- **Role**: Performs static and dynamic audits to ensure secure code practices
- **Focus**: Flags secrets, poor modular boundaries, and oversized files
- **Best For**: Security audits and vulnerability assessments
### ๐ Documentation Writer
- **Role**: Writes concise, clear, and modular Markdown documentation
- **Focus**: Creates documentation that explains usage, integration, setup, and configuration
- **Best For**: Creating user guides and technical documentation
### ๐ System Integrator
- **Role**: Merges outputs of all modes into a working, tested, production-ready system
- **Focus**: Verifies interface compatibility, shared modules, and configuration standards
- **Best For**: Combining components into a cohesive system
### ๐ Deployment Monitor
- **Role**: Observes the system post-launch, collecting performance data and user feedback
- **Focus**: Configures metrics, logs, uptime checks, and alerts
- **Best For**: Post-deployment observation and issue detection
### ๐งน Optimizer
- **Role**: Refactors, modularizes, and improves system performance
- **Focus**: Audits files for clarity, modularity, and size
- **Best For**: Code refinement and performance optimization
### ๐ DevOps
- **Role**: Handles deployment, automation, and infrastructure operations
- **Focus**: Provisions infrastructure, configures environments, and sets up CI/CD pipelines
- **Best For**: Deployment and infrastructure management
### ๐ Supabase Admin
- **Role**: Designs and implements database schemas, RLS policies, triggers, and functions
- **Focus**: Ensures secure, efficient, and scalable data management with Supabase
- **Best For**: Database management and Supabase integration
### โพ๏ธ MCP Integration
- **Role**: Connects to and manages external services through MCP interfaces
- **Focus**: Ensures secure, efficient, and reliable communication with external APIs
- **Best For**: Integrating with third-party services
### โก๏ธ SPARC Orchestrator
- **Role**: Orchestrates complex workflows by breaking down objectives into subtasks
- **Focus**: Ensures secure, modular, testable, and maintainable delivery
- **Best For**: Managing complex projects with multiple components
### โ Ask
- **Role**: Helps users navigate, ask, and delegate tasks to the correct modes
- **Focus**: Guides users to formulate questions using the SPARC methodology
- **Best For**: Getting started and understanding how to use Roo effectively
## MCP Integration Mode
The MCP Integration Mode (โพ๏ธ) in Roo is designed specifically for connecting to and managing external services through MCP interfaces. This mode ensures secure, efficient, and reliable communication between your application and external service APIs.
### Key Features
- Establish connections to MCP servers and verify availability
- Configure and validate authentication for service access
- Implement data transformation and exchange between systems
- Robust error handling and retry mechanisms
- Documentation of integration points, dependencies, and usage patterns
### MCP Integration Workflow
| Phase | Action | Tool Preference |
|-------|--------|-----------------|
| 1. Connection | Establish connection to MCP servers and verify availability | `use_mcp_tool` for server operations |
| 2. Authentication | Configure and validate authentication for service access | `use_mcp_tool` with proper credentials |
| 3. Data Exchange | Implement data transformation and exchange between systems | `use_mcp_tool` for operations, `apply_diff` for code |
| 4. Error Handling | Implement robust error handling and retry mechanisms | `apply_diff` for code modifications |
| 5. Documentation | Document integration points, dependencies, and usage patterns | `insert_content` for documentation |
### Non-Negotiable Requirements
- โ
ALWAYS verify MCP server availability before operations
- โ
NEVER store credentials or tokens in code
- โ
ALWAYS implement proper error handling for all API calls
- โ
ALWAYS validate inputs and outputs for all operations
- โ
NEVER use hardcoded environment variables
- โ
ALWAYS document all integration points and dependencies
- โ
ALWAYS use proper parameter validation before tool execution
- โ
ALWAYS include complete parameters for MCP tool operations
# Agentic Coding MCPs
## Overview
This guide provides detailed information on Management Control Panel (MCP) integration capabilities. MCP enables seamless agent workflows by connecting to more than 80 servers, covering development, AI, data management, productivity, cloud storage, e-commerce, finance, communication, and design. Each server offers specialized tools, allowing agents to securely access, automate, and manage external services through a unified and modular system. This approach supports building dynamic, scalable, and intelligent workflows with minimal setup and maximum flexibility.
## Install via NPM
```
npx create-sparc init --force
```
---
## Available MCP Servers
### ๐ ๏ธ Development & Coding
| | Service | Description |
|:------|:--------------|:-----------------------------------|
| ๐ | GitHub | Repository management, issues, PRs |
| ๐ฆ | GitLab | Repo management, CI/CD pipelines |
| ๐งบ | Bitbucket | Code collaboration, repo hosting |
| ๐ณ | DockerHub | Container registry and management |
| ๐ฆ | npm | Node.js package registry |
| ๐ | PyPI | Python package index |
| ๐ค | HuggingFace Hub| AI model repository |
| ๐ง | Cursor | AI-powered code editor |
| ๐ | Windsurf | AI development platform |
---
### ๐ค AI & Machine Learning
| | Service | Description |
|:------|:--------------|:-----------------------------------|
| ๐ฅ | OpenAI | GPT models, DALL-E, embeddings |
| ๐งฉ | Perplexity AI | AI search and question answering |
| ๐ง | Cohere | NLP models |
| ๐งฌ | Replicate | AI model hosting |
| ๐จ | Stability AI | Image generation AI |
| ๐ | Groq | High-performance AI inference |
| ๐ | LlamaIndex | Data framework for LLMs |
| ๐ | LangChain | Framework for LLM apps |
| โก | Vercel AI | AI SDK, fast deployment |
| ๐ ๏ธ | AutoGen | Multi-agent orchestration |
| ๐งโ๐คโ๐ง | CrewAI | Agent team framework |
| ๐ง | Huggingface | Model hosting and APIs |
---
### ๐ Data & Analytics
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐ข๏ธ | Supabase | Database, Auth, Storage backend |
| ๐ | Ahrefs | SEO analytics |
| ๐งฎ | Code Interpreter| Code execution and data analysis |
---
### ๐
Productivity & Collaboration
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| โ๏ธ | Gmail | Email service |
| ๐น | YouTube | Video sharing platform |
| ๐ | LinkedIn | Professional network |
| ๐ฐ | HackerNews | Tech news discussions |
| ๐๏ธ | Notion | Knowledge management |
| ๐ฌ | Slack | Team communication |
| โ
| Asana | Project management |
| ๐ | Trello | Kanban boards |
| ๐ ๏ธ | Jira | Issue tracking and projects |
| ๐๏ธ | Zendesk | Customer service |
| ๐ฎ | Discord | Community messaging |
| ๐ฒ | Telegram | Messaging app |
---
### ๐๏ธ File Storage & Management
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| โ๏ธ | Google Drive | Cloud file storage |
| ๐ฆ | Dropbox | Cloud file sharing |
| ๐ | Box | Enterprise file storage |
| ๐ช | OneDrive | Microsoft cloud storage |
| ๐ง | Mem0 | Knowledge storage, notes |
---
### ๐ Search & Web Information
| | Service | Description |
|:------|:----------------|:---------------------------------|
| ๐ | Composio Search | Unified web search for agents |
---
### ๐ E-commerce & Finance
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐๏ธ | Shopify | E-commerce platform |
| ๐ณ | Stripe | Payment processing |
| ๐ฐ | PayPal | Online payments |
| ๐ | QuickBooks | Accounting software |
| ๐ | Xero | Accounting and finance |
| ๐ฆ | Plaid | Financial data APIs |
---
### ๐ฃ Marketing & Communications
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐ | MailChimp | Email marketing platform |
| โ๏ธ | SendGrid | Email delivery service |
| ๐ | Twilio | SMS and calling APIs |
| ๐ฌ | Intercom | Customer messaging |
| ๐๏ธ | Freshdesk | Customer support |
---
### ๐ Social Media & Publishing
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐ฅ | Facebook | Social networking |
| ๐ท | Instagram | Photo sharing |
| ๐ฆ | Twitter | Microblogging platform |
| ๐ฝ | Reddit | Social news aggregation |
| โ๏ธ | Medium | Blogging platform |
| ๐ | WordPress | Website and blog publishing |
| ๐ | Webflow | Web design and hosting |
---
### ๐จ Design & Digital Assets
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐จ | Figma | Collaborative UI design |
| ๐๏ธ | Adobe | Creative tools and software |
---
### ๐๏ธ Scheduling & Events
| | Service | Description |
|:------|:---------------|:-----------------------------------|
| ๐ | Calendly | Appointment scheduling |
| ๐๏ธ | Eventbrite | Event management and tickets |
| ๐
| Calendar Google | Google Calendar Integration |
| ๐
| Calendar Outlook| Outlook Calendar Integration |
---
## ๐งฉ Using MCP Tools
To use an MCP server:
1. Connect to the desired MCP endpoint or install server (e.g., Supabase via `npx`).
2. Authenticate with your credentials.
3. Trigger available actions through Roo workflows.
4. Maintain security and restrict only necessary permissions.
### Example: GitHub Integration
```
<!-- Initiate connection -->
<use_mcp_tool>
<server_name>github</server_name>
<tool_name>GITHUB_INITIATE_CONNECTION</tool_name>
<arguments>{}</arguments>
</use_mcp_tool>
<!-- List pull requests -->
<use_mcp_tool>
<server_name>github</server_name>
<tool_name>GITHUB_PULLS_LIST</tool_name>
<arguments>{"owner": "username", "repo": "repository-name"}</arguments>
</use_mcp_tool>
```
### Example: OpenAI Integration
```
<!-- Initiate connection -->
<use_mcp_tool>
<server_name>openai</server_name>
<tool_name>OPENAI_INITIATE_CONNECTION</tool_name>
<arguments>{}</arguments>
</use_mcp_tool>
<!-- Generate text with GPT -->
<use_mcp_tool>
<server_name>openai</server_name>
<tool_name>OPENAI_CHAT_COMPLETION</tool_name>
<arguments>{
"model": "gpt-4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum computing in simple terms."}
],
"temperature": 0.7
}</arguments>
</use_mcp_tool>
```
## Tool Usage Guidelines
### Primary Tools
- `use_mcp_tool`: Use for all MCP server operations
```
<use_mcp_tool>
<server_name>server_name</server_name>
<tool_name>tool_name</tool_name>
<arguments>{ "param1": "value1", "param2": "value2" }</arguments>
</use_mcp_tool>
```
- `access_mcp_resource`: Use for accessing MCP resources
```
<access_mcp_resource>
<server_name>server_name</server_name>
<uri>resource://path/to/resource</uri>
</access_mcp_resource>
```
- `apply_diff`: Use for code modifications with complete search and replace blocks
```
<apply_diff>
<path>file/path.js</path>
<diff>
<<<<<<< SEARCH
// Original code
=======
// Updated code
>>>>>>> REPLACE
</diff>
</apply_diff>
```
### Secondary Tools
- `insert_content`: Use for documentation and adding new content
- `execute_command`: Use for testing API connections and validating integrations
- `search_and_replace`: Use only when necessary and always include both parameters
## Detailed Documentation
For detailed information about each MCP server and its available tools, refer to the individual documentation files in the `.roo/rules-mcp/` directory:
- [GitHub](./rules-mcp/github.md)
- [Supabase](./rules-mcp/supabase.md)
- [Ahrefs](./rules-mcp/ahrefs.md)
- [Gmail](./rules-mcp/gmail.md)
- [YouTube](./rules-mcp/youtube.md)
- [LinkedIn](./rules-mcp/linkedin.md)
- [OpenAI](./rules-mcp/openai.md)
- [Notion](./rules-mcp/notion.md)
- [Slack](./rules-mcp/slack.md)
- [Google Drive](./rules-mcp/google_drive.md)
- [HackerNews](./rules-mcp/hackernews.md)
- [Composio Search](./rules-mcp/composio_search.md)
- [Mem0](./rules-mcp/mem0.md)
- [PerplexityAI](./rules-mcp/perplexityai.md)
- [CodeInterpreter](./rules-mcp/codeinterpreter.md)
## Best Practices
1. Always initiate a connection before attempting to use any MCP tools
2. Implement retry mechanisms with exponential backoff for transient failures
3. Use circuit breakers to prevent cascading failures
4. Implement request batching to optimize API usage
5. Use proper logging for all API operations
6. Implement data validation for all incoming and outgoing data
7. Use proper error codes and messages for API responses
8. Implement proper timeout handling for all API calls
9. Use proper versioning for API integrations
10. Implement proper rate limiting to prevent API abuse
11. Use proper caching strategies to reduce API calls