Modes MCP Server
An MCP server for programmatically managing Roo's custom operational modes.
Modes MCP Server
An MCP server for managing Roo's custom operational modes, providing programmatic control over mode configuration and management.
Features
- Full CRUD operations for custom modes
- Schema validation with Zod
- File system watching for config changes
- Error handling with standard MCP error codes
- Atomic file operations
Installation
# Clone the repository
git clone https://github.com/mkc909/modes-mcp-server.git
cd modes-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Configuration
1. Environment Variables
Copy .env.example to .env and adjust as needed:
cp .env.example .env
Available environment variables:
MODES_CONFIG_PATH: Path to custom modes configuration file (default:%APPDATA%/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_custom_modes.json)
2. Custom Modes Configuration
Create a JSON file for your custom modes configuration. See examples/modes.example.json for the format:
{
"customModes": [
{
"slug": "example-mode",
"name": "Example Mode",
"roleDefinition": "Example role definition describing the mode's capabilities and responsibilities.",
"groups": [
"read",
["edit", {
"fileRegex": "\\.md$",
"description": "Can edit markdown files only"
}],
"command",
"mcp"
],
"customInstructions": "Example custom instructions for the mode."
}
]
}
3. MCP Settings
Add the server configuration to your MCP settings file (typically at %APPDATA%/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json). See examples/mcp-settings.example.json for the format:
{
"mcpServers": {
"modes": {
"command": "node",
"args": ["/path/to/modes-mcp-server/build/index.js"],
"env": {
"MODES_CONFIG_PATH": "/path/to/custom/modes.json"
},
"disabled": false,
"alwaysAllow": []
}
}
}
Operational Modes Framework
The server manages a comprehensive set of operational modes:
Core System Modes
-
Planning Mode 🎯
- Strategic Planning Specialist
- System design and resource allocation
- Project roadmap development
-
Analytics Mode 📊
- Data Analysis Expert
- Metrics tracking and analysis
- Performance monitoring
-
Research Mode 🔍
- System Research Specialist
- Best practices research
- Solution exploration
-
Implementation Mode ⚙️
- Operations Implementation Expert
- System deployment
- Process execution
-
Troubleshooting Mode 🔧
- System Resolution Specialist
- Problem identification
- Issue resolution
-
Quality Control Mode ✅
- Quality Assurance Expert
- System validation
- Performance verification
-
Integration Mode 🔄
- Systems Integration Specialist
- Cross-system coordination
- Workflow optimization
-
Documentation Mode 📝
- Knowledge Management Specialist
- Process documentation
- Standard maintenance
-
Session Management Mode ⚡
- Session Management Specialist
- Daily workflow orchestration
- State management
Specialized Modes
- Trade Ops Manager
- Systematic trading and risk management
- Trade documentation and analysis
- Market analysis and strategy optimization
Mode Transition Flow
graph TD
A[Planning] --> B[Research]
B --> C[Implementation]
C --> D[Integration]
D --> E[Quality Control]
E --> F[Analytics]
F --> G[Troubleshooting]
G --> H[Documentation]
H --> A
Available Tools
list_modes
Lists all custom modes currently configured.
get_mode
Get details of a specific mode by its slug.
Parameters:
slug: The unique identifier of the mode
create_mode
Create a new custom mode.
Parameters:
slug: Unique identifier (lowercase letters, numbers, and hyphens)name: Display name for the moderoleDefinition: Detailed description of the mode's role and capabilitiesgroups: Array of allowed tool groupscustomInstructions: (optional) Additional instructions for the mode
update_mode
Update an existing custom mode.
Parameters:
slug: The unique identifier of the mode to updateupdates: Object containing the fields to update (name, roleDefinition, groups, customInstructions)
delete_mode
Delete a custom mode.
Parameters:
slug: The unique identifier of the mode to delete
validate_mode
Validate a mode configuration without saving it.
Parameters:
mode: Complete mode configuration object to validate
Mode Configuration Schema
interface CustomMode {
slug: string; // Lowercase letters, numbers, and hyphens only
name: string; // Display name
roleDefinition: string; // Detailed description
groups: (string | [string, { fileRegex: string, description: string }])[];
customInstructions?: string; // Optional additional instructions
}
Development
- Make changes to the source code in
src/ - Build the project:
npm run build
- Start the server:
npm start
Best Practices
-
Mode Selection
- Choose appropriate mode for task
- Follow mode-specific workflows
- Use designated tool groups
-
Mode Transitions
- Follow natural transition flow
- Complete current mode tasks
- Preserve context between modes
-
Configuration Management
- Validate changes before saving
- Maintain clear role definitions
- Document mode capabilities
Error Handling
The server uses standard MCP error codes:
InvalidParams: Invalid input parameters or mode not foundMethodNotFound: Unknown tool requestedInternalError: File system errors or other internal issues
Testing
See TESTING.md for comprehensive test cases and validation procedures.
Contributing
- Fork repository
- Create feature branch
- Submit pull request
- Follow coding standards
License
MIT License - see LICENSE for details
İlgili Sunucular
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Ultra Context
The context API for AI agents
Gwirian
Modern Open source Test Management with MCP Server integration
GhostQA
GhostQA sends AI personas through your application — they look at the screen, decide what to do, and interact like real humans. No test scripts. No selectors. You describe personas and journeys in YAML, and GhostQA handles the rest.
AiDex
Persistent code index using Tree-sitter for fast, precise code search. Replaces grep with ~50 token responses instead of 2000+.
Headless Terminal (ht) MCP
A high-performance MCP server for the headless terminal (ht), implemented in Rust.
Chronos Protocol
A robust MCP server that eliminates temporal blindness in AI coding agents through intelligent time tracking, persistent memory, and complete session traceability.
302AI Custom MCP Server
A customizable MCP service with flexible tool selection and configuration. Requires a 302AI API key.
Crates MCP Server
Query Rust crates from crates.io and docs.rs. Search for crates, get info, versions, dependencies, and documentation.
Vibetest Use
Automated QA testing for websites to find UI bugs, broken links, and accessibility issues.
seite
AI-native static site generator with built-in MCP server. Build sites, create content, apply themes, search docs, and deploy via Claude Code or any MCP client.