Releases: simonx1/ruby-mcp-client
Releases · simonx1/ruby-mcp-client
MCP 2025-11-25 specification full support
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
lastModifiedfield 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
modelPreferencessupport 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
titlefield for tools, separate from the programmaticname(by @conr) (#72)
Protocol Compliance
Mcp-Protocol-VersionHeader: 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
initializeresponse and used in all subsequent requests
Bug Fixes
- Parameter Validation:
validate_params!now skips required parameters that have adefaultvalue in the schema, fixing compatibility with Playwright MCP and other Zod-based servers - Anthropic Tool Schema Cleaning:
to_anthropic_toolnow strips$schemakeys 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
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 transportMCPClient.connect('http://localhost:8931/mcp')→ Streamable HTTP transportMCPClient.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_changedto servers - Handles
roots/listrequests from servers
-
Sampling Support: Server-initiated LLM completions
sampling_handler:parameter forMCPClient.connect()andClient.new- Handles
sampling/createMessagerequests 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/messagefrom 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
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-26to2025-06-18 - All documentation and code comments updated to reference 2025-06-18
- Maintains full backward compatibility with previous versions
- Protocol version constant updated from
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_handlerparameter - Automatic decline when no handler registered
- Thread-safe response delivery for HTTP-based transports
- Proper handling of
elicitation/createrequests - 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 toolstest_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 HTTPtest_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 propagationlib/mcp_client/server_streamable_http.rb- Added elicitation support for Streamable HTTPon_elicitation_request- Register callbackhandle_elicitation_create- Process elicitation requestssend_elicitation_response- Send responses via HTTP POSTpost_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 detectionlib/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
0.8.1 (2025-09-17)
Breaking Changes
- Resources API: Updated resources implementation to fully comply with MCP specification
list_resourcesnow returns{ 'resources' => [...], 'nextCursor' => ... }hash format on both client and server levelsread_resourcenow returns array ofResourceContentobjects instead of hash with 'contents' key
New Features
- Full MCP Resources Specification Compliance:
- Added
ResourceContentclass for structured content handling withtext?andbinary?methods - Added
ResourceTemplateclass for URI templates following RFC 6570 - Implemented cursor-based pagination for
list_resourcesandlist_resource_templates - Added
subscribe_resourceandunsubscribe_resourcemethods 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
- Added
Improvements
- Code Quality: Refactored
Client#read_resourceto reduce cyclomatic complexity- Extracted helper methods:
find_resource_on_server,find_resource_across_servers,execute_resource_read
- Extracted helper methods:
- ServerHTTP: Added complete resource methods that were previously missing
- ServerHTTP: Added prompts support (
list_promptsandget_prompt) - Examples: Updated echo_server_client.rb to use new ResourceContent API
- Examples: Enhanced echo_server_streamable.py with full resource features
Prompts & Resources
0.8.0 (2025-09-16)
New Features
- MCP Prompts and Resources Support: Added full support for MCP prompts and resources (#31)
- Implemented
list_promptsandget_promptmethods for prompt management - Implemented
list_resourcesandread_resourcemethods for resource access - Added support for both text and blob resource types
- Implemented
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
9e5d91eto003ab1d(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
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
Bug Fixes
- JSON-RPC Parameter Handling: Fixed SSE transport compatibility with Playwright MCP servers by reverting JSON-RPC parameter handling to not send
nullfor 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
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-knownendpoints - 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::OAuthClientutility 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
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.
Ping reliability and testing improvements
0.6.2 (2025-05-20)
- Fixed reconnect attempts not being reset after successful ping
- Added test verification for nested array $schema removal
- Improved integration tests with Ruby-based test server instead of Node.js dependencies