MCP protocol server for Rails projects that provides tools to analyze and interact with Rails applications including models, routes, controllers, views, schema, and environment configuration.
Rails MCP server has 9 tools with clear naming (verb_noun pattern: switch_project, get_file, list_files, etc.) and reasonable descriptions (avg ~150 chars). All tools are READ_ONLY, reducing risk. However, input schemas are present but lack depth: most parameters have descriptions but no explicit type constraints, enums, or validation rules. Output schemas are not documented, LLMs cannot predict response structure. Error handling is minimal; no recovery guidance visible. Tool composition is sound (each does one thing), but parameter descriptions could be more prescriptive about formats and constraints.
Retrieve detailed information about Active Record models in the project. When called without parameters, lists all model files. When a specific model is specified, returns its schema, associations (has_many, belongs_to, has_one), and complete source code.
Analyze the relationships between controllers, their actions, and corresponding views to understand the application's UI flow.
Analyze environment configurations to identify inconsistencies, security issues, and missing variables across environments.
Retrieve the complete content of a specific file with syntax highlighting. Use this to examine implementation details, configurations, or any text file in the project.
Retrieve all HTTP routes defined in the Rails application with their associated controllers and actions. Equivalent to running 'rails routes' command. This helps understand the API endpoints or page URLs available in the application.
Output schemas not documented. LLMs cannot predict response structure, field names, or types. Tools return unstructured results (e.g., get_routes returns 'all HTTP routes' but no schema for route objects).
Parameter descriptions lack format constraints. 'directory' in list_files says 'relative to project root' but no validation rules (allowed chars, max length, forbidden paths). 'pattern' accepts glob syntax but no examples or constraints.
No error handling guidance. Tools return raw errors (e.g., 'file not found') with no recovery hints. LLMs cannot determine if error is retryable, user-fixable, or fatal.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | <=2025-11-25 | v2 |
Retrieve database schema information for the Rails application. Without parameters, returns all tables and the complete schema.rb. With a table name, returns detailed column information including data types, constraints, and foreign keys for that specific table.
List files in the Rails project matching specific criteria. Use this to explore project directories or locate specific file types. If no parameters are provided, lists files in the project root.
Retrieve comprehensive information about the current Rails project, including Rails version, directory structure, API-only status, and overall project organization. Useful for initial project exploration and understanding the codebase structure.
Change the active Rails project to interact with a different codebase. Must be called before using other tools. Available projects are defined in the projects.yml configuration file.
Typo in tool name: 'analize_models' should be 'analyze_models' (missing 'y'). This breaks discoverability and looks unprofessional.
No pagination support. Tools like get_routes, get_schema, and analize_models can return large result sets (all routes, all tables, all models) with no limit or offset parameters. Large responses blow context windows.