modelcontextprotocol/ruby-sdk

The official Ruby SDK for the Model Context Protocol servers and clients.

What it solves

This SDK provides a standardized way for Ruby developers to implement the Model Context Protocol (MCP), allowing them to create servers that expose tools, prompts, and resources to AI hosts, or create clients that can connect to and interact with these servers.

How it works

The SDK implements the full Model Context Protocol surface, including server-to-client requests, notifications, and pagination. It supports multiple transport layers, including standard input/output (stdio) and Streamable HTTP (including Server-Sent Events), and includes a specific integration for Ruby on Rails applications.

Who it’s for

Ruby developers who want to integrate their applications with the Model Context Protocol ecosystem to enable AI agents or LLMs to interact with their data and tools.

Highlights

  • Full Protocol Support: Covers everything from multi round-trip requests to logging and cancellation.
  • Client and Server Capabilities: Tools to build both the host side (client) and the provider side (server).
  • Rails Integration: Built-in support for running MCP servers within a Rails app.
  • Flexible Transports: Supports both stdio and Streamable HTTP/SSE.

Related

  • Project
  • Project
  • Project
  • Project
  • Project