modes mcp server
The Modes MCP Server allows for comprehensive management and control over custom operational modes, supporting full CRUD operations, schema validation, and real-time configuration changes for enhanced mode management.
The Modes MCP Server allows for comprehensive management and control over custom operational modes, supporting full CRUD operations, schema validation, and real-time configuration changes for enhanced mode management.
An MCP server for managing Roo's custom operational modes, providing programmatic control over mode configuration and management.
# 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
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
)
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."
}
]
}
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": []
}
}
}
The server manages a comprehensive set of operational modes:
Project roadmap development
Analytics Mode ?
Performance monitoring
Research Mode ?
Solution exploration
Implementation Mode ⚙️
Process execution
Troubleshooting Mode ?
Issue resolution
Quality Control Mode ✅
Performance verification
Integration Mode ?
Workflow optimization
Documentation Mode ?
Standard maintenance
Session Management Mode ⚡
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
Lists all custom modes currently configured.
Get details of a specific mode by its slug.
Parameters:
- slug
: The unique identifier of the mode
Create a new custom mode.
Parameters:
- slug
: Unique identifier (lowercase letters, numbers, and hyphens)
- name
: Display name for the mode
- roleDefinition
: Detailed description of the mode's role and capabilities
- groups
: Array of allowed tool groups
- customInstructions
: (optional) Additional instructions for the mode
Update an existing custom mode.
Parameters:
- slug
: The unique identifier of the mode to update
- updates
: Object containing the fields to update (name, roleDefinition, groups, customInstructions)
Delete a custom mode.
Parameters:
- slug
: The unique identifier of the mode to delete
Validate a mode configuration without saving it.
Parameters:
- mode
: Complete mode configuration object to validate
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
}
src/
npm run build
npm start
Use designated tool groups
Mode Transitions
Preserve context between modes
Configuration Management
The server uses standard MCP error codes:
- InvalidParams
: Invalid input parameters or mode not found
- MethodNotFound
: Unknown tool requested
- InternalError
: File system errors or other internal issues
See TESTING.md for comprehensive test cases and validation procedures.
MIT License - see LICENSE for details