Skip to content

Releases: simonx1/ruby-mcp-client

OAuth 2.1 Enhancements and RubyLLM integration

22 Mar 18:48

Choose a tag to compare

1.0.1 (2026-03-22)

New Features

OAuth 2.1 Enhancements

  • Supported Scopes Discovery: New supported_scopes method on OAuthProvider and scope: :all shorthand to request all server-advertised scopes (#109)
  • Extra Client Metadata in DCR: Dynamic client registration now supports optional OIDC metadata fields (client_name, client_uri, logo_uri, tos_uri, policy_uri, contacts) (#110)
  • PKCE Serialization: PKCE#to_h and PKCE.from_h methods for persisting and restoring PKCE state (#100)

RubyLLM Integration Example

  • New examples/ruby_llm_mcp.rb: Demonstrates bridging MCP tools to RubyLLM using a minimal Class.new(RubyLLM::Tool) wrapper, with OpenAI as the LLM provider and Playwright MCP for browser automation. RubyLLM handles the tool call loop automatically.

MCP 2025-11-25 specification full support

15 Feb 15:51

Choose a tag to compare

1.0.0 (2026-02-15)

MCP 2025-11-25 Protocol Support

Full implementation of the MCP 2025-11-25 specification, upgrading from 2025-06-18.

New Protocol Features

  • Audio Content: Support for audio content type in tool results and messages (#82)
  • Resource Annotations: Added lastModified field to resource annotations (#83)
  • Enhanced Tool Annotations: Hint-style annotation API (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) alongside legacy annotations (#84)
  • Enhanced Elicitation: Improved server-initiated user interaction support for MCP 2025-11-25 (#85)
  • Enhanced Sampling: Added modelPreferences support for server-requested LLM completions (#86)
  • Completion Context: Completion requests now support context parameter for MCP 2025-11-25 (#87)
  • Structured Task Management: Server-driven task tracking with tasks/list, tasks/get, progress notifications, and cancellation (#88)
  • ResourceLink Content Type: New content type for linking to MCP resources from tool results (#89)
  • Tool Title: Optional human-readable title field for tools, separate from the programmatic name (by @conr) (#72)

Protocol Compliance

  • Mcp-Protocol-Version Header: All HTTP transports now send the negotiated protocol version header on post-initialization requests, as required by the MCP spec
  • Protocol version captured from server initialize response and used in all subsequent requests

Bug Fixes

  • Parameter Validation: validate_params! now skips required parameters that have a default value in the schema, fixing compatibility with Playwright MCP and other Zod-based servers
  • Anthropic Tool Schema Cleaning: to_anthropic_tool now strips $schema keys from tool schemas, preventing 400 errors from the Anthropic Messages API
  • Streamable HTTP Example: Updated to use environment variables for server URL and Bearer token authentication instead of hardcoded credentials
  • Anthropic Example: Fixed model name to use current claude-sonnet-4-5-20250929
  • Fixed JSON parsing edge cases

Universal Connect

10 Dec 17:39

Choose a tag to compare

New Features

Simplified API - MCPClient.connect(url)

  • New single entry point that auto-detects transport based on URL patterns (#62)
    • MCPClient.connect('http://localhost:8000/sse') → SSE transport
    • MCPClient.connect('http://localhost:8931/mcp') → Streamable HTTP transport
    • MCPClient.connect('npx -y @modelcontextprotocol/server-filesystem /home') → stdio transport
    • Supports options: headers, read_timeout, sampling_handler, etc.
    • Multiple servers: MCPClient.connect(['http://server1/mcp', 'http://server2/sse'])

MCP 2025-06-18 Protocol Compliance (#62)

  • Roots Support: Define filesystem scope boundaries

    • client.set_roots([{ uri: 'file:///path', name: 'Root' }])
    • Sends notifications/roots/list_changed to servers
    • Handles roots/list requests from servers
  • Sampling Support: Server-initiated LLM completions

    • sampling_handler: parameter for MCPClient.connect() and Client.new
    • Handles sampling/createMessage requests from servers
    • Supports variable arity handlers (1-4 args)
  • Completion Support: Autocomplete suggestions

    • client.complete(ref:, argument:) method
    • Works with prompts (ref/prompt) and resources (ref/resource)
    • Returns completion values with pagination info
  • Logging Support: Server log messages

    • client.set_log_level(level) method
    • Handles notifications/message from servers
    • Maps MCP levels to Ruby Logger levels

Faraday Connection Customization (by @conr) (#58)

  • Added ability to customize Faraday HTTP connections
  • Pass custom middleware, adapters, or configuration blocks

Documentation

  • Updated YARD documentation

MCP 2025-06-18 Support with Elicitation

05 Nov 22:37

Choose a tag to compare

0.9.0 (2025-11-05)

MCP Protocol Update

  • Updated to MCP 2025-06-18: Latest protocol specification
    • Protocol version constant updated from 2025-03-26 to 2025-06-18
    • All documentation and code comments updated to reference 2025-06-18
    • Maintains full backward compatibility with previous versions

New Features

Streamable HTTP Gzip Support

  • Added gzip compression support for streamable HTTP transport (by @purposemc) (#46)

Browser-based OAuth flow

  • Added support for browser-based OAuth authentication flow (#50)

Elicitation (Server-initiated User Interactions)

  • Full Elicitation Support: Servers can now request structured user input during tool execution
    • Implemented across all transports: stdio, SSE, and Streamable HTTP
    • Bidirectional JSON-RPC communication for interactive workflows
    • Support for all three response actions: accept, decline, cancel
    • Callback-based API with elicitation_handler parameter
    • Automatic decline when no handler registered
    • Thread-safe response delivery for HTTP-based transports
    • Proper handling of elicitation/create requests
    • Responses sent as JSON-RPC requests (method: elicitation/response)
    • Content field only included when present (not empty hash for decline/cancel)

Elicitation Examples

  • stdio Transport Example (examples/elicitation/)

    • elicitation_server.py - Python MCP server with elicitation tools
    • test_elicitation.rb - Interactive Ruby client with user input
    • Tools: create_document, send_notification
  • Streamable HTTP Transport Example (examples/elicitation/)

    • elicitation_streamable_server.py - Python server supporting both SSE and Streamable HTTP
    • test_elicitation_streamable.rb - Full-featured client with multi-step workflows
    • Tools: create_document, delete_files, deploy_application
  • SSE Transport Example (examples/elicitation/)

    • test_elicitation_sse_simple.rb - Minimal SSE example with auto-response
    • Uses traditional SSE transport (GET /sse for stream, POST /sse for RPC)

Implementation Details

Core Changes

  • lib/mcp_client/version.rb - Updated PROTOCOL_VERSION to '2025-06-18'
  • lib/mcp_client/client.rb - Added elicitation handler registration and propagation
  • lib/mcp_client/server_streamable_http.rb - Added elicitation support for Streamable HTTP
    • on_elicitation_request - Register callback
    • handle_elicitation_create - Process elicitation requests
    • send_elicitation_response - Send responses via HTTP POST
    • post_jsonrpc_response - Thread-safe response delivery
  • lib/mcp_client/server_sse.rb - Added elicitation support for SSE
    • Queue-based response delivery
    • Proper handling of JSON-RPC requests vs responses
  • lib/mcp_client/server_stdio.rb - Added elicitation support for stdio
    • Bidirectional JSON-RPC over stdin/stdout
  • lib/mcp_client/json_rpc_common.rb - Enhanced message type detection
  • lib/mcp_client/server_http.rb - Base class updates

Bug Fixes

  • Fixed elicitation ID extraction to correctly use JSON-RPC request ID
  • Fixed elicitation response format to only include content when present
  • Fixed response delivery mechanism for HTTP-based transports

Documentation

  • Consolidated feature list under "MCP 2025-06-18 (Latest)"

Dependencies

  • Updated faraday from 2.13.4 to 2.14.0
  • Updated faraday-follow_redirects from 0.3.0 to 0.4.0
  • Various dev dependency updates

Developer Experience

  • Enhanced CI configuration and workflows

Full MCP Resources Specification Compliance

17 Sep 15:50

Choose a tag to compare

0.8.1 (2025-09-17)

Breaking Changes

  • Resources API: Updated resources implementation to fully comply with MCP specification
    • list_resources now returns { 'resources' => [...], 'nextCursor' => ... } hash format on both client and server levels
    • read_resource now returns array of ResourceContent objects instead of hash with 'contents' key

New Features

  • Full MCP Resources Specification Compliance:
    • Added ResourceContent class for structured content handling with text? and binary? methods
    • Added ResourceTemplate class for URI templates following RFC 6570
    • Implemented cursor-based pagination for list_resources and list_resource_templates
    • Added subscribe_resource and unsubscribe_resource methods for real-time updates
    • Added support for resource annotations (audience, priority, lastModified)
    • Binary content properly handled with base64 encoding/decoding
    • All transport types (stdio, SSE, HTTP, streamable_http) now have consistent resource support

Improvements

  • Code Quality: Refactored Client#read_resource to reduce cyclomatic complexity
    • Extracted helper methods: find_resource_on_server, find_resource_across_servers, execute_resource_read
  • ServerHTTP: Added complete resource methods that were previously missing
  • ServerHTTP: Added prompts support (list_prompts and get_prompt)
  • Examples: Updated echo_server_client.rb to use new ResourceContent API
  • Examples: Enhanced echo_server_streamable.py with full resource features

Prompts & Resources

16 Sep 16:47

Choose a tag to compare

0.8.0 (2025-09-16)

New Features

  • MCP Prompts and Resources Support: Added full support for MCP prompts and resources (#31)
    • Implemented list_prompts and get_prompt methods for prompt management
    • Implemented list_resources and read_resource methods for resource access
    • Added support for both text and blob resource types

Bug Fixes

  • Tool Caching: Fixed issue with caching tools that have the same name from different servers (#342ff55)
    • Tools are now properly disambiguated by server when cached
    • Improved tool resolution to prevent conflicts between servers

Dependencies

  • Updated openai from 9e5d91e to 003ab1d (dev dependency) (#30)
  • Updated rubocop from 1.77.0 to 1.80.2 (dev dependency) (#28)
  • Updated gemini-ai from 4.2.0 to 4.3.0 (dev dependency) (#25)

Developer Experience

  • Updated examples with improved error handling
  • Enhanced CI workflow configuration

HTTP Streaming Improvements

01 Sep 20:59

Choose a tag to compare

0.7.3 (2025-09-01)

Bug Fixes

  • Streaming JSON Parsing: Fixed streaming JSON parsing improvements for better handling of partial data chunks
  • SSE Connection: Enhanced server-sent events connection reliability for real-time notifications (ty @dsablic )

Dependencies

  • Updated faraday from 2.13.1 to 2.13.4
  • Updated ruby-openai from 8.1.0 to 8.3.0 (dev dependency)
  • Updated openai gem to latest version (dev dependency)
  • Updated rdoc from 6.14.1 to 6.14.2 (dev dependency)

Developer Experience

  • Improved CI configuration and permissions
  • Enhanced examples with better cleanup and error handling

MCP Protocol Compatibility and Transport Improvements Release

14 Jul 16:00

Choose a tag to compare

Bug Fixes

  • JSON-RPC Parameter Handling: Fixed SSE transport compatibility with Playwright MCP servers by reverting JSON-RPC parameter handling to not send null for empty parameters
  • Logger Formatter Preservation: Fixed issue where custom logger formatters were being overridden in server implementations

Transport Improvements

  • HTTP Redirect Support: Added automatic redirect following (up to 3 hops) for both SSE and HTTP transports via faraday-follow_redirects gem

Examples and Testing

  • FastMCP Integration: Added complete FastMCP echo server example demonstrating Ruby-Python MCP interoperability
  • Comprehensive Logger Tests: Added 29 new test cases covering logger functionality across all server types

Developer Experience

  • Protocol Version Consistency: Updated all examples and configurations to use MCP protocol version 2025-03-26
  • Enhanced Documentation: Improved example scripts with better error handling and user guidance

OAuth 2.1 implementation

20 Jun 17:11

Choose a tag to compare

0.7.1 (2025-06-20)

OAuth 2.1 Authentication Framework

  • Added comprehensive OAuth 2.1 support with PKCE for secure authentication
  • Implemented automatic authorization server discovery via .well-known endpoints
  • Added dynamic client registration when supported by servers
  • Implemented token refresh and automatic token management
  • Added pluggable storage backends for tokens and client credentials
  • Created MCPClient::OAuthClient utility class for easy OAuth-enabled server creation
  • Added runtime configuration support via getter/setter methods in OAuthProvider
  • Included complete OAuth examples and documentation

HTTP Transport Improvements

  • Refactored HTTP transport layer using template method pattern for better code organization
  • Added proper session management and validation

Documentation and Examples

  • Added comprehensive OAuth documentation (OAUTH.md)
  • Updated README with OAuth usage examples and 2025 protocol features
  • Enhanced oauth_example.rb with practical implementation patterns

0.7.0

18 Jun 21:26

Choose a tag to compare

0.7.0 (2025-05-20)

What's New

  • StreamableHTTP transport type handling - Enhanced HTTP transport layer with improved streaming capabilities
  • Connection reliability improvements - Fixed reconnection attempt resets on successful connections
  • Test coverage enhancements - Added verification for nested array removal operations
  • Integration testing updates - Improved integration test specifications

Bug Fixes

  • Fixed reset reconnect attempts on success to ensure proper connection management
  • Improved stdio parameter handling for better server communication

Technical Improvements

  • Extracted JSON RPC common functionality for better code organization
  • Enhanced annotations and documentation
  • Improved server reconnection reliability

This release focuses on transport layer improvements and connection stability, making the MCP client more robust for production use.