An MCP server for Rails projects, allowing LLMs to interact with your application.
Connect Rails to Claude, Cursor or any other MCP client and it stops being a tab you switch to. An MCP server for Rails projects, allowing LLMs to interact with your application. The rails mcp server is what makes that connection.
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.
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
query — (String, optional) Search term (e.g., 'routes', 'model', 'schema')category — (String, optional) Filter by category: models, database, routing, controllers, files, project, guidesdetail_level — (String, optional) Output detail: 'names', 'summary', or 'full' (default: 'summary')Limitations — For detailed instructions, see docs/COPILOT_AGENT.mdproject_info — Retrieve comprehensive project information including Rails version, directory structure, and organizationlist_files — The list_files tool exposed by this serverget_file — The get_file tool exposed by this serverget_routes — The get_routes tool exposed by this serveranalyze_models — Analyze Active Record models with associations, validations, and optional Prism static analysisget_schema — The get_schema tool exposed by this serveranalyze_controller_views — Analyze controller-view relationships with optional Prism static analysisanalyze_environment_config — Analyze environment configurations for inconsistencies and security issuesConfiguration is passed through the environment: RAILS_MCP_PROJECT_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Installation goes through your MCP client rather than a global install: point it at mcp-remote on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Rails's toolset — query, category, detail_level and 10 more — is a fair guide to whether it matches your workflow.
This entry was verified against Rails's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| query | (String, optional) Search term (e.g., 'routes', 'model', 'schema') |
| category | (String, optional) Filter by category: models, database, routing, controllers, files, project, guides |
| detail_level | (String, optional) Output detail: 'names', 'summary', or 'full' (default: 'summary') |
| Limitations | For detailed instructions, see [docs/COPILOT_AGENT.md](docs/COPILOT_AGENT.md). |
| project_info | Retrieve comprehensive project information including Rails version, directory structure, and organization. |
| list_files | The list_files tool exposed by this server. |
| get_file | The get_file tool exposed by this server. |
| get_routes | The get_routes tool exposed by this server. |
| analyze_models | Analyze Active Record models with associations, validations, and optional Prism static analysis. |
| get_schema | The get_schema tool exposed by this server. |
| analyze_controller_views | Analyze controller-view relationships with optional Prism static analysis. |
| analyze_environment_config | Analyze environment configurations for inconsistencies and security issues. |
| load_guide | Load documentation guides from Rails, Turbo, Stimulus, Kamal, or Custom. |
{
"mcpServers": {
"github-com-maquina-app-rails": {
"command": "npx",
"args": ["-y", "mcp-remote"],
"env": {
"RAILS_MCP_PROJECT_PATH": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| RAILS_MCP_PROJECT_PATH | Filesystem location the server is allowed to use. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.