Awesome MCPRuby

patvice/ruby_llm-mcp

⭐ 261 Ruby repository created 2025-05-22

RubyLLM::MCP is a Ruby client library for the Model Context Protocol designed to work with the RubyLLM gem, aiming for full specification compliance. It supports the stable MCP specification 2025-06-18 by default with the draft 2026-01-26 track available as an explicit opt-in. Server tools are converted into RubyLLM-compatible tools and attached to a chat with with_tools, server resources and resource templates can be added to the chat context with with_resource, and server prompts are executed with typed arguments through ask_prompt. Three transports are provided: stdio, streamable HTTP and SSE. On the client capability side the gem implements sampling, roots, progress tracking and elicitation, and offers built-in notification and response handlers, so callbacks such as on_progress and on_logging can drive real-time or interactive workflows while streaming chunks back to the caller. Authentication covers MCP OAuth 2.1 with PKCE, dynamic client registration, discovery and automatic token refresh. Two OAuth setup paths are documented: a Rails path where a generator creates per-user MCP connections reachable as current_user.mcp_client, and a browser-based flow for command line tools where the client authenticates before being started. Rails integration is installed with rails generate ruby_llm:mcp:install, with a separate oauth:install generator for per-user connections, and an establish_connection block gives jobs, controllers and services an explicit connection scope. Extensions can be negotiated globally or per client, including MCP Apps, and multiple MCP servers can be managed within one workflow. Two adapters are available: a native :ruby_llm adapter with the full feature set, and an optional :mcp_sdk adapter that requires the official mcp gem. The library is published on RubyGems as ruby_llm-mcp, released under the MIT licence, with documentation at rubyllm-mcp.com.

https://github.com/patvice/ruby_llm-mcp

mcp-clientrubyrubyllmrailsoauthsdkstdiosse

Also in Ruby

yjacquin/fast-mcp

Fast MCP is a Ruby implementation of the Model Context Protocol that simplifies and secures AI model integration with Ruby applications through tools and resources APIs, multiple transport options, and seamless framework support.

modelcontextprotocol/ruby-sdk

Official Ruby SDK for implementing Model Context Protocol (MCP) servers and clients with support for JSON-RPC 2.0, tools, prompts, resources, and multiple transport options including Rails and command-line environments.

nagstler/mcp_on_ruby

A Ruby gem that adds an MCP server to a Rails application at /mcp, with generators for tools and resources, JSON Schema validation, per-call authorization, token authentication and rate limiting.