yjacquin/fast-mcp
Fast MCP is a Ruby implementation of the Model Context Protocol that simplifies and secures AI model integration with Ruby applications through tools and resources APIs, multiple transport options, and seamless framework support.
MCP on Ruby is a Ruby gem, published as mcp_on_ruby, that adds a Model Context Protocol server to a Rails application so AI clients can call application code as tools and read application data as resources. It is installed through the Gemfile and a generator, rails generate mcp_on_ruby:install, which creates the server files; further generators scaffold individual tools and resources, including resources with URI templates. Configuration lives in an initializer and in the Rails configuration object, covering token authentication, a per-minute rate limit, allowed origins and automatic registration of tools and resources. Tools are classes under app/tools that inherit from ApplicationTool. Each declares a name, a description and a JSON Schema input schema, implements an execute method receiving the parsed arguments and a context hash, and can implement an authorize method deciding whether the caller may run it. Resources are classes under app/resources that inherit from ApplicationResource, declare a URI template, a name, a description and a MIME type, and implement fetch_content to build the payload from request parameters, again with an authorize hook. Once the Rails server is running the MCP endpoint is served at /mcp on the application host, speaking JSON-RPC. The gem integrates through a Railtie with autoloading and middleware, and its security features include DNS rebinding protection, CORS handling and token authentication. Server-sent events are described as a foundation with the full implementation still to come. It requires Ruby 2.7 or newer and Rails 6.0 or higher for the full integration, with json-schema as its main production dependency, and it is MIT licensed. The repository documents advanced usage, RSpec testing patterns and an API reference, includes an example of connecting Claude Desktop through a bridge script, and describes registering the Rails endpoint with an MCP registry or gateway for central discovery and access control. It suits Rails teams wanting to expose existing application logic to MCP clients.
https://github.com/nagstler/mcp_on_ruby
Fast MCP is a Ruby implementation of the Model Context Protocol that simplifies and secures AI model integration with Ruby applications through tools and resources APIs, multiple transport options, and seamless framework support.
Official Ruby SDK for implementing Model Context Protocol (MCP) servers and clients with support for JSON-RPC 2.0, tools, prompts, resources, and multiple transport options including Rails and command-line environments.
Ruby MCP client gem that plugs MCP tools, resources and prompts into RubyLLM chats over stdio, streamable HTTP and SSE, with OAuth 2.1 support and Rails generators.