Rails Guides MCP Server
Provides access to official Ruby on Rails Guides, including categorized guide lists, versioned registry metadata, and full HTML content for individual guides.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Rails Guides MCP Server show me the Active Record associations guide for Rails 7.1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rails Guides MCP Server
A Model Context Protocol (MCP) server that provides access to Ruby on Rails documentation and guides. This server allows AI assistants like Claude to access, search, and reference Rails Guides content programmatically, making it easier to get Rails development help and documentation.
š Features
Complete Rails Guides access - All official Rails documentation categories
Version support - Support for multiple Rails versions (8.0, 7.1, 4.2, etc.)
Categorized organization - Guides organized by topic (Models, Views, Controllers, etc.)
Dynamic version switching - Environment variable support for different Rails versions
TypeScript implementation with Zod schema validation
Development tools including hot reload and inspector
Ready for Claude integration with simple setup commands
Related MCP server: AutoGen Documentation MCP Server
š Prerequisites
Node.js 18 or higher
npm, yarn, or pnpm
Claude desktop app (for integration)
š¤ Intended Use Cases
This MCP server is perfect for:
Rails developers seeking quick access to official documentation
AI-assisted Rails development with Claude or other MCP-compatible tools
Learning Rails with contextual documentation access
Code review and debugging with instant access to Rails conventions
Teams wanting consistent Rails documentation access across projects
š Quick Start with Claude
Option 1: Add to Claude Project (Recommended)
# Navigate to your Rails project directory
cd your-rails-project
# Add the Rails Guides MCP server to your project
claude mcp add rails-guides npx rails-mcp-server
# For specific Rails version
claude mcp add rails-guides npx rails-mcp-server -e RAILS_VERSION=7.1Option 2: Add Globally
# Add globally for all Claude sessions
claude mcp add rails-guides npx rails-mcp-server --scope user
# With specific Rails version
claude mcp add rails-guides npx rails-mcp-server --scope user -e RAILS_VERSION=7.1Option 3: Add Locally
# Add for local Claude sessions only
claude mcp add rails-guides npx rails-mcp-server --scope localš§ Rails Version Support
The server defaults to Rails 8.0 documentation but supports multiple versions:
Supported Versions
Rails 8.0 (default) -
https://guides.rubyonrails.orgRails 7.1 -
https://guides.rubyonrails.org/v7.1Rails 4.2 -
https://guides.rubyonrails.org/v4.2Other versions - Follow the pattern
v{major}.{minor}
Setting Rails Version
Use the RAILS_VERSION environment variable:
# Default (Rails 8.0)
claude mcp add rails-guides npx rails-mcp-server
# Rails 7.1
claude mcp add rails-guides npx rails-mcp-server -e RAILS_VERSION=7.1
# Rails 4.2
claude mcp add rails-guides npx rails-mcp-server -e RAILS_VERSION=4.2
# Rails 6.0
claude mcp add rails-guides npx rails-mcp-server -e RAILS_VERSION=6.0Alternative Environment Variable
You can also use RAILS_GUIDES_VERSION:
claude mcp add rails-guides npx rails-mcp-server -e RAILS_GUIDES_VERSION=7.1š ļø Manual Installation (Development)
If you want to modify or contribute to this server:
Clone the repository:
git clone https://github.com/your-username/rails-mcp-server.git
cd rails-mcp-serverInstall dependencies:
npm installBuild the project:
npm run buildTest locally:
node dist/server.jsšāāļø Development
Start Development Server
npm run devBuild for Production
npm run buildInspect MCP Server
npm run inspectThis opens the MCP Inspector to test your server tools interactively.
š Available Tools
The Rails Guides MCP server provides the following tools:
Core Tools
getRailsGuides- Returns a comprehensive list of all Rails Guides with categories and metadatagetGuideRegistry- Complete registry with all guides, categories, and version infogetGuideContent- Fetches the full HTML content of a specific Rails Guide
Category-specific Tools
Dynamic tools are created for each Rails Guide category:
getStartHereGuides- Getting Started, Installation guidesgetModelsGuides- Active Record, Migrations, Validations, Associations, etc.getViewsGuides- Action View, Layouts, Helpers, Form HelpersgetControllersGuides- Action Controller, Routing, Advanced TopicsgetOtherComponentsGuides- Active Support, Action Mailer, Active Job, etc.getDiggingDeeperGuides- I18n, Testing, Debugging, Configuration, etc.getGoingToProductionGuides- Caching, Security, PerformancegetAdvancedActiveRecordGuides- PostgreSQL, Multiple DBs, EncryptiongetExtendingRailsGuides- Plugins, Rack, Generators, EnginesgetContributingGuides- Contributing, API docs, Development setup
Example Usage
Once added to Claude, you can ask questions like:
"Show me the Rails guides for Models"
"Get the Getting Started guide content"
"What Rails guides are available for testing?"
"Fetch the Active Record associations guide"
šļø Project Structure
rails-mcp-server/
āāā src/
ā āāā server.ts # Main Rails Guides MCP server
ā āāā lib/
ā ā āāā config.ts # Configuration with version support
ā ā āāā categories.ts # Rails Guides categories
ā āāā utils/
ā āāā api.ts # Rails Guides fetching utilities
ā āāā formatters.ts # Data formatting helpers
ā āāā schemas.ts # Zod validation schemas
ā āāā index.ts # Utility exports
āāā dist/ # Built files
āāā package.json
āāā README.mdš§ Customization
Adding New Rails Guide Categories
To add new guide categories, update src/lib/categories.ts:
export const guideCategories = {
// Existing categories...
"Custom Category": [
"custom_guide_1",
"custom_guide_2",
],
};The server will automatically create category-specific tools.
Supporting Different Rails Versions
The server automatically handles different Rails versions through URL patterns:
Rails 8.0+:
https://guides.rubyonrails.org/{guide}.htmlOlder versions:
https://guides.rubyonrails.org/v{version}/{guide}.html
Customizing Guide Processing
Modify src/utils/api.ts to customize how guides are processed:
export async function fetchGuideDetails(guideName: string) {
// Add custom processing logic
// Parse HTML sections, extract code examples, etc.
}š Deployment
Publishing as NPM Package
To make this server available via npx, publish it to npm:
Update
package.jsonwith your details:
{
"name": "rails-mcp-server",
"version": "1.0.0",
"description": "MCP server for Rails Guides documentation",
"bin": {
"rails-mcp-server": "./dist/server.js"
}
}Build and publish:
npm run build
npm publishThen users can add it with:
claude mcp add rails-guides npx rails-mcp-serverManual Installation
For development or custom deployments:
# Clone and build
git clone https://github.com/your-username/rails-mcp-server.git
cd rails-mcp-server
npm install && npm run build
# Add to Claude with local path
claude mcp add rails-guides node /path/to/rails-mcp-server/dist/server.jsš¤ Contributing
Contributions are welcome! Here's how you can help:
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureMake your changes and add tests if applicable
Commit your changes:
git commit -m 'feat: add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š Acknowledgments
Built with Model Context Protocol SDK
Rails Guides content from Ruby on Rails
Inspired by the need for better AI-assisted Rails development
Thanks to the MCP and Rails communities
š Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Rails Guides: Official Rails Guides
⨠Happy Rails development with AI assistance!
Available Tools
13 toolsgetAdvancedActiveRecordGuidesB
Provides Rails 8.0 Guides for the Advanced Active Record category: active_record_postgresql, active_record_multiple_databases, active_record_encryption, active_record_composite_primary_keys
Inputs: no named parameters.
getContributingGuidesA
Provides Rails 8.0 Guides for the Contributing category: contributing_to_ruby_on_rails, api_documentation_guidelines, ruby_on_rails_guides_guidelines, development_dependencies_install
Inputs: no named parameters.
getControllersGuidesB
Provides Rails 8.0 Guides for the Controllers category: action_controller_overview, routing, action_controller_advanced
Inputs: no named parameters.
getDiggingDeeperGuidesA
Provides Rails 8.0 Guides for the Digging Deeper category: i18n, testing, debugging_rails_applications, configuring, command_line, asset_pipeline, working_with_javascript_in_rails, autoloading_and_reloading_constants
Inputs: no named parameters.
getExtendingRailsGuidesA
Provides Rails 8.0 Guides for the Extending Rails category: plugins, rails_on_rack, creating_and_customizing_rails_generators, engines, rails_application_templates
Inputs: no named parameters.
getGoingtoProductionGuidesA
Provides Rails 8.0 Guides for the Going to Production category: rails_application_templates, caching_with_rails, security, error_reporting
Inputs: no named parameters.
getGuideContentC
Fetches the complete content of a specific Rails 8.0 Guide.
getGuideRegistryA
Provides the complete Rails 8.0 Guides registry with categories and metadata.
Inputs: no named parameters.
getModelsGuidesB
Provides Rails 8.0 Guides for the Models category: active_record_basics, active_record_migrations, active_record_validations, active_record_callbacks, association_basics, active_record_querying, active_model_basics
Inputs: no named parameters.
getOtherComponentsGuidesB
Provides Rails 8.0 Guides for the Other Components category: active_support_core_extensions, action_mailer_basics, action_mailbox_basics, action_text_overview, active_job_basics, active_storage_overview, action_cable_overview
Inputs: no named parameters.
getRailsGuidesA
Provides a comprehensive list of all Rails 8.0 Guides with their categories and basic information.
Inputs: no named parameters.
getStartHereGuidesB
Provides Rails 8.0 Guides for the Start Here category: getting_started, install_ruby_on_rails
Inputs: no named parameters.
getViewsGuidesB
Provides Rails 8.0 Guides for the Views category: action_view_overview, layouts_and_rendering, action_view_helpers, form_helpers
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 13 tools
The ten category getters (Models, Views, Controllers, etc.) are clearly distinct, and getGuideContent is obviously different. However, getRailsGuides and getGuideRegistry both claim to return 'all Rails 8.0 Guides with their categories and metadata,' making them nearly indistinguishable from the description alone. Category getters also partly overlap with the full listing, so an agent must guess which of the two registry-style tools to call.
Names are uniformly camelCase with a get_ prefix pattern (getXGuides, getGuideContent, getGuideRegistry), which is easy to predict. Minor deviations exist: the category getters are named after categories rather than a verb_noun form, and 'getGoingtoProductionGuides' has awkward casing compared with the rest.
Thirteen tools is a sensible scope for browsing a documentation corpus. The ten one-per-category getters could arguably be collapsed into a single getGuides(category) tool, and the two overlapping registry tools are redundant, but nothing is wildly out of proportion.
The full Rails Guides taxonomy plus a content-fetch tool gives end-to-end coverage from discovery to reading a guide. The notable gap is search: there is no keyword/lookup tool, so an agent must already know which category or guide ID to request, and no per-section or per-chapter retrieval exists.
Maintenance
Related MCP Connectors
Tailor Platform for AI assistants: search, list and read the platform documentation.
Versioned documentation registry and semantic search for AI tools and coding assistants.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with access to RubyUI component library documentation, including listing components, fetching docs, searching, and getting installation/theming guides.GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve Microsoft AutoGen documentation across versions with smart search and fallback.1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to search API documentation, retrieve endpoint details, get SDK snippets, and check changelogs from an OpenAPI spec.7112 npm4MIT
- FlicenseNot gradedqualityAmaintenanceEnables natural-language search of 378 curated AI agent frameworks, developer tools, and automation repositories from inside Claude Code, Cursor, Codex, or any MCP-compatible client, returning matching repos with descriptions instead of manual GitHub browsing. Also exposes category listing, stats, and single-repo lookup.-