mcp_on_ruby
by nagstler·★ 98·Score 44
A production-ready Ruby implementation of MCP for Rails applications with authentication and tool/resource exposure.
Overview
MCP on Ruby provides a robust implementation of the Model Context Protocol specifically designed for Rails applications. It offers a clean DSL for defining tools and resources, with full integration into the Rails ecosystem including generators, middleware, and Railtie. The server includes comprehensive security features like authentication, rate limiting, DNS rebinding protection, and CORS support. It supports both tools (callable functions) and resources (data exposure with URI templating) systems, with JSON Schema validation for input parameters.
Try asking AI
After installing, here are 6 things you can ask your AI assistant:
When to choose this
Choose this MCP server if you're building on Rails and want to expose your application's functionality and data to AI agents with proper security and authentication.
When NOT to choose this
Don't choose this if you're not using Ruby/Rails or need more advanced real-time features like Server-Sent Events (SSE) which are still in development.
Tools this server exposes
2 tools extracted from the READMEuser_managerManage application users (create, update, delete)
User_StatisticsGet detailed user statistics by user ID
Comparable tools
Installation
Installation steps:
- Add to Gemfile:
gem 'mcp_on_ruby'- Run bundle install:
bundle install- Generate MCP server files:
rails generate mcp_on_ruby:install- Configure MCP server in config/initializers/mcp_on_ruby.rb
- Start Rails server:
rails serverMCP server will be available at http://localhost:3000/mcp
For Claude Desktop integration, add to Claude config:
{
"mcpServers": {
"rails-mcp": {
"command": "rails",
"args": ["server"]
}
}
}FAQ
- What Ruby versions are supported?
- Ruby 2.7.0 or higher is required for MCP on Ruby.
- How do I create a new tool?
- Use the Rails generator: `rails generate mcp_on_ruby:tool <ToolName> --description "Description"`
- Is authentication supported?
- Yes, MCP on Ruby includes authentication via tokens and can be configured in the initializer.
On Hacker News
Recent discussion from the developer community.
- Story by NinjaGems · 2025-04-25
- Story by thunderbong · 2025-04-19
- Story by NinjaGems · 2025-04-30
Compare mcp_on_ruby with
Last updated · Auto-generated from public README + GitHub signals.