Fast
A Ruby Implementation of the Model Context Protocol
A Ruby Implementation of the Model Context Protocol
{
"mcpServers": {
"my-great-server": {
"command": "ruby",
"args": [
"/Users/path/to/your/awesome/fast-mcp/server.rb"
]
}
}
}
# Fast MCP 🚀 Connect AI models to your Ruby applications with ease No complex protocols, no integration headaches, no compatibility issues – just beautiful, expressive Ruby code. ## 🌟 Interface your Servers with LLMs in minutes AI models are powerful, but they need to interact with your applications to be truly useful. Traditional approaches mean wrestling with: - 🔄 Complex communication protocols and custom JSON formats - 🔌 Integration challenges with different model providers - 🧩 Compatibility issues between your app and AI tools - 🧠 Managing the state between AI interactions and your data Fast MCP solves all these problems by providing a clean, Ruby-focused implementation of the [Model Context Protocol](https://github.com/modelcontextprotocol), making AI integration a joy, not a chore. ## ✨ Features - 🛠️ **Tools API** - Let AI models call your Ruby functions securely, with in-depth argument validation through [Dry-Schema](https://github.com/dry-rb/dry-schema). - 📚 **Resources API** - Share data between your app and AI models - 🔄 **Multiple Transports** - Choose from STDIO, HTTP, or SSE based on your needs - 🧩 **Framework Integration** - Works seamlessly with Rails, Sinatra or any Rack app. - 🔒 **Authentication Support** - Secure your AI-powered endpoints with ease - 🚀 **Real-time Updates** - Subscribe to changes for interactive applications - 🎯 **Dynamic Filtering** - Control tool/resource access based on request context (permissions, API versions, etc.) ## 💎 What Makes FastMCP Great ```ruby # Define tools for AI models to use server = FastMcp::Server.new(name: 'popular-users', version: '1.0.0') # Define a tool by inheriting from FastMcp::Tool class CreateUserTool < FastMcp::Tool description "Create a user" # These arguments will generate the needed JSON to be presented to the MCP Client # And they will be validated at run time. # The validation is based off Dry-Schema, with the addition of the description. arguments do required(:first_name).filled(:string).description("First name of the user") optional(:age).filled(:integer).description("Age of the user") required(:address).description("The shipping address").hash do required(:street).filled(:string).description("Street address") optional(:city).filled(:string).description("City name") optional(:zipcode).maybe(:string).description("Postal code") end end def call(first_name:, age: nil, address: {}) User.create!(first_name:, age:, address:) end end # Register the tool with the server server.register_tool(CreateUserTool) # Share data resources with AI models by inheriting from FastMcp::Resource class PopularUsers < FastMcp::Resource uri "myapp:///users/popular" resource_name "Popular Users" mime_type "application/json" def content JSON.generate(User.popular.limit(5).as_json) end end class User < FastMcp::Resource uri "myapp:///users/{id}" # This is a resource template resource_name "user" mime_type "application/json" def content id = params[:id] # params are computed from the uri pattern JSON.generate(User.find(id).as_json) end end # Register the resource with the server server.register_resources(PopularUsers, User) # Accessing the resource through the server server.read_resource(PopularUsers.uri) # Notify the resource content has been updated to clients server.notify_resource_updated(PopularUsers.variabilized_uri) # Notifiy the content...
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Chrome MCP Server is a Chrome extension-based Model Context Protocol (MCP) server that exposes your Chrome browser funct...
Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via...
A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and exte...
Build effective agents using Model Context Protocol and simple workflow patterns
A community driven registry service for Model Context Protocol (MCP) servers.