Skip to content
Dick Davis edited this page Jan 27, 2026 · 3 revisions

model-context-protocol-rb

An implementation of the Model Context Protocol (MCP) in Ruby.

Provides simple abstractions that allow you to serve prompts, resources, resource templates, and tools via MCP locally (stdio) or in production (streamable HTTP backed by Redis) with minimal effort.

Getting Started

  1. Installation - Add the gem to your project
  2. Building an MCP Server - Configure and run your MCP server
  3. Quick Start with Rails - Full Rails integration example

Documentation

Server Handlers

  • Prompts - Define prompts that MCP clients can use to generate contextual messages
  • Resources - Expose data and content to MCP clients
  • Resource Templates - Define parameterized resources with URI templates
  • Tools - Create callable functions that MCP clients can invoke
  • Completions - Provide argument completion hints for prompts and resources

Testing

Feature Support

Status Feature
Prompts
Resources
Resource Templates
Tools
Completion
Logging
Pagination
Environment Variables
STDIO Transport
Streamable HTTP Transport
Cancellation
Ping
Progress
List Changed Notification (Prompts)
List Changed Notification (Resources)
Subscriptions (Resources)
List Changed Notification (Tools)

Links

Clone this wiki locally