Ruby MCP Client is an MCP client implementation that connects Ruby applications to external tools, resources, and services using the Model Context Protocol. Software engineers and Ruby developers use it to interface AI models with MCP-compatible servers across local processes and network endpoints. The client supports stdio, HTTP, and Streamable HTTP transports, as well as the legacy HTTP+SSE transport. By adhering to the MCP 2026-07-28 specification and earlier protocol revisions, it enables automated protocol negotiation between stateless modern requests and legacy initialize handshakes. The gem provides full lifecycle handling for listing and calling tools, reading and subscribing to resources, executing prompts, and handling task-augmented operations. It also includes native conversion helpers for external API tool formats, including OpenAI, Anthropic, and Google, while implementing strict security validations for untrusted peer servers, payload memory bounds, and OAuth 2.1 authentication with PKCE.
Category: AI & LLM Tooling
Tags: client, integration, ruby, sdk
Follow these steps to install and use the Ruby MCP Client in your Ruby environment: 1. Add the gem to your application Gemfile: ruby gem 'ruby-mcp-client' 2. Install the gem using Bundler or rubygems directly: bash bundle install # or gem install ruby-mcp-client 3. In your Ruby code, require the library and connect to your desired MCP server over Streamable HTTP, SSE, or stdio: ruby require 'mcp_client' client = MCPClient.connect('http://localhost:8931/mcp') 4. For additional configuration options and transport details, consult the repository README at https://github.com/simonx1/ruby-mcp-client.
Part of MCP Servers
You can install the Ruby MCP Client by adding gem 'ruby-mcp-client' to your Gemfile and running bundle install. Alternatively, install it globally or inside your Ruby environment using the gem install ruby-mcp-client command in your terminal.
Ruby MCP Client enables Ruby applications to discover, call, and stream tools from MCP servers, read resources, subscribe to resource updates, and fetch prompt templates. It also supports converting MCP tools into OpenAI, Anthropic, and Google tool formats.
The client supports stdio for executing local subcommands, Streamable HTTP for modern streaming responses, standard HTTP request-response, and the legacy HTTP+SSE transport. It automatically detects transports based on standard URL paths and patterns.
Ruby MCP Client implements the MCP 2026-07-28 specification while maintaining backwards compatibility with earlier revisions including 2025-11-25, 2025-06-18, 2025-03-26, and 2024-11-05 via automated dual-era transport negotiation.
Yes, Ruby MCP Client is open-source software. You can review the source code, inspect updates, and report issues directly on its official GitHub repository at https://github.com/simonx1/ruby-mcp-client.