Allows AI assistants to eval and verify rails/ruby code changes at lighting-speed access without the need restart server.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"rails-mcp": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Allows AI assistants to eval and verify rails/ruby code changes at lighting-speed access without the need restart server.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationBe the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Dynamic problem-solving through sequential thought chains
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
An open-source AI agent that brings the power of Gemini directly into your terminal.
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Rails Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Setting this up? Point your coding agent (Cursor, Claude Code, etc.) at
llms.txtand ask it to self-configure rails-mcp in your project.
A Ruby gem that provides AI assistants with ruby code execution capabilities within the context of existing running application server. Think of it giving AI assistant lighting-speed access to ruby console without the need to write script, reload or restart.
Works with Rails, Sinatra, Hanami, Roda, and any other Rack-based framework. The code is executed in your application's context for debugging and investigation.
Used at Apollo.io against a Rails codebase with 20k+ Ruby files.
Add this line to your application's Gemfile:
gem "rails-mcp"
Or install locally for development:
bundle install
Rails (config/routes.rb):
require "rails_mcp/mcp/server"
Rails.application.routes.draw do
mount RailsMcp::MCP::Server.new => "/mcp"
end
Rack (config.ru):
require "rails_mcp"
require "rails_mcp/mcp/server"
map "/mcp" do
run RailsMcp::MCP::Server.new
end
Sinatra:
require "rails_mcp/mcp/server"
mount RailsMcp::MCP::Server.new, at: "/mcp"
# Standalone with Rackup
bundle exec rackup -p 9292
# With Rails
bundle exec rails server
This gem ships without authentication — the MCP endpoint will accept any request that reaches it. You are responsible for ensuring it is only mounted where appropriate. A typical Rails setup gates it on environment:
Rails.application.routes.draw do
mount RailsMcp::MCP::Server.new => "/mcp" if Rails.env.development?
end
For staging or production access, combine that with network-level restrictions (firewall, VPC, SSH port-forward, VPN) so the endpoint is never reachable from the open internet.
The MCP server exposes a single JSON-RPC endpoint:
evaluate_ruby_code
code (string, required): Ruby code to executeAdd to your MCP client configuration (.cursor/mcp.json for Cursor or claude_desktop_config.json for Claude Desktop):
{
"mcpServers": {
"rails-mcp": {
"url": "http://localhost:3001/mcp/rpc"
}
}
}
For Claude Code, add it from the command line:
claude mcp add rails-mcp --transport http http://localhost:3001/mcp/rpc

Any MCP-compatible client can connect to the server by making JSON-RPC requests to the /mcp/rpc endpoint.
Example with curl:
curl -X POST "http:
... [View full README on GitHub](https://github.com/raja-jamwal/rails-mcp#readme)