Modes MCP Server

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.

ccc0168

Developer Tools
OS Automation
Visit Server

Tools

list_modes

List all custom modes

get_mode

Get details of a specific mode

create_mode

Create a new custom mode

update_mode

Update an existing custom mode

delete_mode

Delete a custom mode

validate_mode

Validate a mode configuration without saving it

README

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

  1. Planning Mode 🎯

    • Strategic Planning Specialist
    • System design and resource allocation
    • Project roadmap development
  2. Analytics Mode 📊

    • Data Analysis Expert
    • Metrics tracking and analysis
    • Performance monitoring
  3. Research Mode 🔍

    • System Research Specialist
    • Best practices research
    • Solution exploration
  4. Implementation Mode ⚙️

    • Operations Implementation Expert
    • System deployment
    • Process execution
  5. Troubleshooting Mode 🔧

    • System Resolution Specialist
    • Problem identification
    • Issue resolution
  6. Quality Control Mode

    • Quality Assurance Expert
    • System validation
    • Performance verification
  7. Integration Mode 🔄

    • Systems Integration Specialist
    • Cross-system coordination
    • Workflow optimization
  8. Documentation Mode 📝

    • Knowledge Management Specialist
    • Process documentation
    • Standard maintenance
  9. 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 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

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

  1. Make changes to the source code in src/
  2. Build the project:
npm run build
  1. Start the server:
npm start

Best Practices

  1. Mode Selection

    • Choose appropriate mode for task
    • Follow mode-specific workflows
    • Use designated tool groups
  2. Mode Transitions

    • Follow natural transition flow
    • Complete current mode tasks
    • Preserve context between modes
  3. 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 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
  2. Create feature branch
  3. Submit pull request
  4. Follow coding standards

License

MIT License - see LICENSE for details

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python