rubocop-mcp-server

ishtiaque05/rubocop-mcp-server

3.2

If you are the rightful owner of rubocop-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The RuboCop MCP Server provides RuboCop Rails linting capabilities to AI assistants like Claude.

Tools
4
Resources
0
Prompts
0

RuboCop MCP Server

A Model Context Protocol (MCP) server that provides RuboCop and Rails linting capabilities to AI assistants like Claude and Cursor.

License: MIT

Features

  • RuboCop Integration: Run RuboCop linting with Rails-specific cops
  • Auto-correction: Automatically fix style violations
  • Smart Pagination: Handle large cop lists efficiently
  • Auto-lint Mode: Automatic linting reminders for AI assistants
  • Flexible Filtering: Run specific cops or departments
  • Gradual Adoption: Generate .rubocop_todo.yml for existing projects

Quick Start

Prerequisites

# Install RuboCop
gem install rubocop rubocop-rails

# Or add to your Rails Gemfile
# gem 'rubocop', require: false
# gem 'rubocop-rails', require: false

Installation

# 1. Clone and build
git clone https://github.com/yourusername/rubocop-mcp.git
cd rubocop-mcp
yarn install && yarn build

# 2. Add to Claude CLI
claude mcp add --transport stdio rubocop -- node $(pwd)/build/index.js

# 3. Verify
claude mcp list

Usage

Start Claude in your Rails project and ask:

Lint app/models/user.rb
Check app/controllers for Rails violations and auto-fix them
List all available Rails cops

That's it! See for detailed setup instructions.

Available Tools

ToolDescription
rubocop_lintRun RuboCop on files with auto-correction support
rubocop_list_copsList available cops with pagination
rubocop_show_copShow detailed cop information
rubocop_auto_gen_configGenerate .rubocop_todo.yml for gradual adoption
rubocop_set_auto_lintEnable/disable automatic linting reminders
rubocop_get_auto_lint_statusCheck auto-lint configuration

See for complete documentation.

Documentation

  • - Complete installation instructions
  • - Configure for different environments
  • - Examples and workflows
  • - Complete tool reference
  • - Automatic linting reminders
  • - Handle large result sets
  • - Contributing and testing
  • - Common issues and solutions

Project Structure

rubocop-mcp/
├── src/              # TypeScript source code
├── build/            # Compiled JavaScript
├── docs/             # Documentation
├── examples/         # Configuration examples
├── test/             # Test files
└── package.json      # Project configuration

Contributing

Contributions are welcome! Please see for guidelines.

License

MIT

Support