# ruby-mcp-client

A Ruby client for the Model Context Protocol that lets an application discover and call external tools over stdio, HTTP or Streamable HTTP, with built-in conversion to OpenAI, Anthropic and Google tool formats.

ruby-mcp-client is a Ruby implementation of a Model Context Protocol (MCP) client, letting a Ruby application discover and invoke external tools and services over the protocol's different transports: local stdio processes, HTTP request and response, and Streamable HTTP, which layers server-sent events on top of HTTP POST; the older HTTP plus SSE transport is supported but deprecated in favor of Streamable HTTP.

It implements the newest MCP specification while staying compatible with every earlier revision, probing each server to detect whether it speaks the newer stateless protocol or needs the classic initialization handshake, and disconnecting if a server claims a revision the client cannot speak. Supported capabilities include listing and calling tools with streaming and structured, schema-validated output, listing and fetching prompts, working with resources including templates, subscriptions and pagination, server-initiated user interactions, autocomplete for prompts and resources, and task-augmented tool calls that can be polled and updated asynchronously.

Built-in helper methods convert the client's tool list directly into the formats expected by OpenAI, Anthropic and Google's function-calling APIs. It installs as a Ruby gem.

Website: https://github.com/simonx1/ruby-mcp-client
