# RuboCop

> A Ruby static code analyzer and formatter, based on the community Ruby style guide.

Source: https://talira.ai/catalog/rubocop-rxzhjmy8
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library, MCP server
- Categories: [developer tools / linting](https://talira.ai/categories/developer-tools/linting), [languages / ruby](https://talira.ai/categories/languages/ruby)
- Platforms: cli[^4]
- Licence: MIT[^2]
- Pricing: Free and open source[^2][^3]
- Free tier: yes[^2][^3]
- Self-hostable: yes[^3][^4]
- Plugins: yes[^5][^6]
- MCP server: yes[^7]
- Supports: [MCP](https://talira.ai/standards/mcp.md)[^7]
- Backed by: [RuboCop](https://talira.ai/orgs/rubocop.md)
- Creator: Bozhidar Batsov (bbatsov), also author of CIDER and Projectile
- Funding: funded by donations[^8][^9]

RuboCop is a Ruby linter and code formatter that enforces the community Ruby Style Guide out of the box and autocorrects many of the offenses it finds. Every check (a cop) can be turned on, off or tuned in a .rubocop.yml file, and teams write their own cops and formatters. Extension gems add cops for Rails, [RSpec](https://talira.ai/catalog/rspec-87n8pes2.md), Minitest, performance and more. It has a built-in language server for editors, a server mode for fast repeated runs, and since 1.85 an experimental built-in MCP server (`rubocop --mcp`) that lets AI agents inspect, autocorrect and explain cops.

## Links

- Website: https://rubocop.org
- GitHub: https://github.com/rubocop/rubocop
- Docs: https://docs.rubocop.org

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/rubocop>[^1]

## Problems it solves

- enforce a consistent Ruby style in CI
- code review keeps turning into arguments about quotes, spacing and method length
- automatically fix style problems across a whole Ruby codebase in one command
- catch likely bugs in Ruby code like unused variables and shadowed arguments before they ship
- write our own lint rule that bans a dangerous pattern in our Rails app
- show Ruby lint warnings and fixes in my editor as I type
- fail the build when someone adds a method that's too long or too complex
- adopt a linter on a legacy Ruby app without fixing thousands of existing offenses first
- let my AI coding agent check and autocorrect Ruby files it just wrote
- check our RSpec and Rails code against community best practices
- format Ruby code automatically on save

## Features

- configurable cops for style, layout, lint, metrics, naming and security
- autocorrection (safe and unsafe)
- per-project .rubocop.yml with inheritance
- todo file to adopt on existing code
- custom cops and formatters
- plugins: rubocop-rails, rubocop-rspec, rubocop-performance, rubocop-minitest and more
- built-in LSP server
- server mode
- experimental built-in MCP server (rubocop --mcp, 1.85+)

## Capabilities

- Has a command line tool: plan not known
- Has an MCP server: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.84 out of 1.
Signals: maintenance 1.00, adoption 0.82, momentum 0.57, community 1.00, backing 0.75, extensibility 0.60.

- last commit 9 days ago
- 1339 commits in the last 90 days
- latest release v1.92.2 26 days ago
- 12.9k GitHub stars
- 1150 contributors
- accepts sponsorship (Github, Github, Patreon)
- has a company behind it
- created by Bozhidar Batsov (bbatsov), also author of CIDER and Projectile
- funding: funded by donations
- has a plugin system
- has an MCP server for agents

## Alternatives

- [PHP_CodeSniffer](https://talira.ai/catalog/php-codesniffer-zrnhrrbz.md): Detect and fix coding standard violations in PHP

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://github.com/rubocop/rubocop/blob/master/LICENSE.txt (checked 17 Nov 2026)
[^3]: https://github.com/rubocop/rubocop (checked 17 Nov 2026)
[^4]: https://docs.rubocop.org/rubocop/latest/installation.html (checked 17 Nov 2026)
[^5]: https://docs.rubocop.org/rubocop/latest/plugin_migration_guide.html (checked 17 Nov 2026)
[^6]: https://docs.rubocop.org/rubocop/latest/development.html (checked 17 Nov 2026)
[^7]: https://docs.rubocop.org/rubocop/latest/usage/mcp.html (checked 17 Nov 2026)
[^8]: https://opencollective.com/rubocop (checked 20 Nov 2026)
[^9]: https://github.com/rubocop/rubocop (checked 20 Nov 2026)
