Curated library of AI agent skills for Ruby on Rails development. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and workflow automation.
98
99%
Does it follow best practices?
Impact
98%
1.38xAverage score across 26 eval scenarios
Passed
No known issues
This directory contains a minimalist Ruby-based server that implements the Model Context Protocol (MCP). Its purpose is to expose the SKILL.md files in the parent rails-agent-skills repository as queryable resources for AI agents.
This allows AI tools (like Gemini CLI, Cursor, Claude, Windsurf, etc.) to fetch specific skill documentation on demand, rather than needing to load the entire repository into context. This saves tokens, improves performance, and makes the skill library more flexible for various AI environments.
The server.rb script starts an MCP::Server instance, which listens for MCP requests on STDIN (Standard Input) and sends JSON responses back over STDOUT (Standard Output). It leverages a clean, object-oriented design:
MCP::Server: The main orchestrator, responsible for the input/output loop and error handling.MCP::RequestHandler: Parses incoming requests and dispatches them to the correct logic.MCP::ResourceLocator: Dedicated to finding and reading SKILL.md files.MCP::Response: Standardizes the format of all success and error responses.It supports two primary MCP methods:
ListResources: Returns a list of all SKILL.md files found in the parent repository, formatted as MCP resources (with a skill/ prefix for name).ReadResource: Reads and returns the content of a specific SKILL.md file based on its uri.Ensure Ruby is installed: This server requires a Ruby environment (version 2.7 or higher recommended). No special gems are needed beyond json and pathname, which are part of Ruby's standard library.
Navigate to the mcp_server directory:
cd rails-agent-skills/mcp_serverRun the server:
ruby server.rbThe server will start listening for requests.
To integrate this MCP server with your AI development environment, you'll need to configure your specific AI tool to launch and connect to this server via STDIO. Refer to your AI tool's documentation for how to configure custom MCP servers.
Example (conceptual for a CLI tool that supports --mcp-server):
# From your project root, or anywhere
# The command should start the server process and typically pipe its STDIN/STDOUT
AI_CLI_TOOL --mcp-server "ruby /path/to/rails-agent-skills/mcp_server/server.rb"To ensure the server is functioning correctly, unit tests are provided for the core components.
Install dependencies: Ensure you have minitest installed. You can use Bundler from within the mcp_server directory if you create a Gemfile (which we've done):
bundle installRun the tests:
bundle exec ruby -Ilib test/resource_locator_test.rb
bundle exec ruby -Ilib test/request_handler_test.rbNote: Fully testing the MCP::Server's STDIN/STDOUT loop in Minitest typically involves more advanced Ruby process management (Open3), which is outside the scope of basic unit tests and the README.md example. The provided tests focus on the core logic encapsulated in ResourceLocator and RequestHandler.
Feel free to contribute improvements to this MCP server. If adding new features, ensure they adhere to the MCP specification and are thoroughly tested.
api-rest-collection
create-prd
ddd-boundaries-review
ddd-rails-modeling
ddd-ubiquitous-language
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
scenario-17
scenario-18
scenario-19
scenario-20
scenario-21
scenario-22
scenario-23
scenario-24
scenario-25
scenario-26
generate-tasks
mcp_server
rails-architecture-review
rails-background-jobs
rails-bug-triage
rails-code-conventions
rails-code-review
rails-engine-compatibility
rails-engine-docs
rails-engine-extraction
rails-engine-installers
rails-engine-release
rails-engine-reviewer
rails-engine-testing
rails-graphql-best-practices
rails-migration-safety
rails-review-response
rails-security-review
rails-skills-orchestrator
rails-stack-conventions
rails-tdd-slices
refactor-safely
rspec-best-practices
rspec-service-testing
ruby-service-objects
strategy-factory-null-calculator
ticket-planning
yard-documentation