Install
$ agentstack add mcp-nagstler-mcp-on-ruby β scanned Β· β verified, works with Claude Code, Cursor, and more.
Security review
β PassedNo issues found. Passed automated security review. Β· v0.1.0 How review works β
- β Prompt-injection patterns
- β Secret / credential exfiltration
- β Dangerous shell & filesystem operations
- β Untrusted network calls
- β Known-malicious package signatures
What it can access
- β Network access No
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets No
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work βAbout
MCP on Ruby
[](https://badge.fury.io/rb/mcponruby) [](https://opensource.org/licenses/MIT) [](https://www.ruby-lang.org/)
Model Context Protocol (MCP) server for Rails applications
Expose your Rails app as an AI accessible interface β define tools and resources the Rails way.
Features
π Production-Ready - Authentication, rate limiting, error handling, security π§ Rails Integration - Generators, autoloading, middleware, Railtie π οΈ Tools System - Callable functions with JSON Schema validation π Resources System - Data exposure with URI templating π Security - DNS rebinding protection, CORS, token authentication β‘ Real-time - Server Events (SSE) foundation (full implementation coming soon) π― Developer-Friendly - Clean DSL, generators, testing support
Installation
Add to your Gemfile:
gem 'mcp_on_ruby'
Then run:
bundle install
rails generate mcp_on_ruby:install
Quick Start
1. Install and Configure
# Generate MCP server files
rails generate mcp_on_ruby:install
# Create a tool
rails generate mcp_on_ruby:tool UserManager --description "Manage application users"
# Create a resource
rails generate mcp_on_ruby:resource UserStats --uri "users/{id}/stats" --template
2. Configure MCP Server
# config/initializers/mcp_on_ruby.rb
McpOnRuby.configure do |config|
config.authentication_required = true
config.authentication_token = ENV['MCP_AUTH_TOKEN']
config.rate_limit_per_minute = 60
config.allowed_origins = [/\.yourdomain\.com$/]
end
Rails.application.configure do
config.mcp.enabled = true
config.mcp.auto_register_tools = true
config.mcp.auto_register_resources = true
end
3. Create Tools
# app/tools/user_manager_tool.rb
class UserManagerTool 3.0) - JSON Schema validation
- `rack` (~> 2.2) - HTTP transport layer
- `webrick` (~> 1.7) - HTTP server
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write tests for your changes
4. Ensure all tests pass (`bundle exec rspec`)
5. Commit your changes (`git commit -am 'Add some feature'`)
6. Push to the branch (`git push origin my-new-feature`)
7. Create a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details.
## π Acknowledgments
- The [Model Context Protocol](https://modelcontextprotocol.io) team at Anthropic for creating the specification
- The Ruby on Rails community for inspiration and conventions
---
Made with β€οΈ for the Ruby community
## Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- **Author:** [nagstler](https://github.com/nagstler)
- **Source:** [nagstler/mcp_on_ruby](https://github.com/nagstler/mcp_on_ruby)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.