custom modes (roo code).com
custom modes (roo code).com logo

Custom Modes (Roo Code)

Enables custom behavioral mode management for defining, loading, and applying tailored AI behaviors through configuratio...

Created byApr 22, 2025

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

Configuration

1. Environment Variables

Copy .env.example to .env and adjust as needed:
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:

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:

Operational Modes Framework

The server manages a comprehensive set of operational modes:

Core System Modes

  1. Planning Mode
  1. Analytics Mode
  1. Research Mode
  1. Implementation Mode
  1. Troubleshooting Mode
  1. Quality Control Mode
  1. Integration Mode
  1. Documentation Mode
  1. Session Management Mode

Specialized Modes

  • Trade Ops Manager

Mode Transition Flow

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 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_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_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

Development

  1. Make changes to the source code in src/
  1. Build the project:
  1. Start the server:

Best Practices

  1. Mode Selection
  1. Mode Transitions
  1. Configuration Management

Error Handling

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

Testing

See TESTING.md for comprehensive test cases and validation procedures.

Contributing

  1. Fork repository
  1. Create feature branch
  1. Submit pull request
  1. Follow coding standards

License

MIT License - see LICENSE for details

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

Configuration

1. Environment Variables

Copy .env.example to .env and adjust as needed:
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:

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:

Operational Modes Framework

The server manages a comprehensive set of operational modes:

Core System Modes

  1. Planning Mode
  1. Analytics Mode
  1. Research Mode
  1. Implementation Mode
  1. Troubleshooting Mode
  1. Quality Control Mode
  1. Integration Mode
  1. Documentation Mode
  1. Session Management Mode

Specialized Modes

  • Trade Ops Manager

Mode Transition Flow

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 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_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_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

Development

  1. Make changes to the source code in src/
  1. Build the project:
  1. Start the server:

Best Practices

  1. Mode Selection
  1. Mode Transitions
  1. Configuration Management

Error Handling

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

Testing

See TESTING.md for comprehensive test cases and validation procedures.

Contributing

  1. Fork repository
  1. Create feature branch
  1. Submit pull request
  1. Follow coding standards

License

MIT License - see LICENSE for details