A Ruby implementation of a Model Context Protocol (MCP) server for Rails projects. This server allows LLMs (Large Language Models) to interact with Rails projects through the Model Context Protocol, providing capabilities for code analysis, exploration, and development assistance.
The Model Context Protocol (MCP) is a standardized way for AI models to interact with their environment. It defines a structured method for models to request and use tools, access resources, and maintain context during interactions.
This Rails MCP Server implements the MCP specification to give AI models access to Rails projects for code analysis, exploration, and assistance.
- Manage multiple Rails projects
- Browse project files and structures
- View Rails routes with filtering options
- Inspect model information and relationships (with Prism static analysis)
- Get database schema information
- Analyze controller-view relationships
- Analyze environment configurations
- Access comprehensive Rails, Turbo, Stimulus, and Kamal documentation
- Context-efficient architecture with progressive tool discovery
- Seamless integration with LLM clients
Install the gem:
gem install rails-mcp-serverAfter installation, the following executables will be available in your PATH:
rails-mcp-server- The MCP server itselfrails-mcp-config- Interactive configuration tool (recommended)rails-mcp-setup-claude- Legacy Claude Desktop setup scriptrails-mcp-server-download-resources- Legacy resource download script
The easiest way to configure the Rails MCP Server is using the interactive configuration tool:
rails-mcp-configThis provides a user-friendly TUI (Terminal User Interface) for: