@@ -75,6 +75,38 @@ RubyLLM::MCP.configure do |config|
7575end
7676```
7777
78+ ## Adapter Selection
79+
80+ {: .label .label-green }
81+ 0.8+
82+
83+ RubyLLM MCP supports multiple SDK adapters. Choose between the native full-featured implementation or the official MCP SDK.
84+
85+ ### Default Adapter
86+
87+ Set the default adapter for all clients:
88+
89+ ``` ruby
90+ RubyLLM ::MCP .configure do |config |
91+ # Options: :ruby_llm (default), :mcp_sdk
92+ config.default_adapter = :ruby_llm
93+ end
94+ ```
95+
96+ ### Adapter Options
97+
98+ ** ` :ruby_llm ` ** (default)
99+ - Full MCP protocol implementation
100+ - All transport types (stdio, SSE, HTTP)
101+ - Advanced features (sampling, roots, progress tracking, etc.)
102+
103+ ** ` :mcp_sdk ` **
104+ - Official Anthropic-maintained SDK
105+ - Core features only (tools, resources, prompts)
106+ - Limited transport support (stdio, HTTP - no SSE)
107+
108+ See the [ Adapters Guide] ({% link guides/adapters.md %}) for detailed feature comparison and usage examples.
109+
78110## Client Configuration
79111
80112### Basic Client Options
@@ -85,6 +117,7 @@ All MCP clients support these common options:
85117client = RubyLLM ::MCP .client(
86118 name: " unique-client-name" , # Required: unique identifier
87119 transport_type: :stdio , # Required: :stdio, :sse, or :streamable
120+ adapter: :ruby_llm , # Optional: :ruby_llm (default) or :mcp_sdk
88121 start: true , # Optional: auto-start connection (default: true)
89122 request_timeout: 8000 , # Optional: timeout in milliseconds (default: 8000)
90123 config: { # Required: transport-specific configuration
@@ -142,9 +175,13 @@ config: {
142175
143176Best for web-based MCP servers using Server-Sent Events:
144177
178+ {: .warning }
179+ > SSE transport is only supported with ` adapter: :ruby_llm ` . The ` :mcp_sdk ` adapter does not support SSE.
180+
145181``` ruby
146182client = RubyLLM ::MCP .client(
147183 name: " web-server" ,
184+ adapter: :ruby_llm , # Required for SSE
148185 transport_type: :sse ,
149186 config: {
150187 url: " https://api.example.com/mcp/sse" , # Required: SSE endpoint
@@ -371,19 +408,19 @@ The RubyLLM MCP client supports multiple protocol versions. You can access these
371408
372409``` ruby
373410# Latest supported protocol version
374- puts RubyLLM ::MCP ::Protocol .latest_version
411+ puts RubyLLM ::MCP ::Native :: Protocol .latest_version
375412# => "2025-06-18"
376413
377414# Default version used for negotiation
378- puts RubyLLM ::MCP ::Protocol .default_negotiated_version
415+ puts RubyLLM ::MCP ::Native :: Protocol .default_negotiated_version
379416# => "2025-03-26"
380417
381418# All supported versions
382- puts RubyLLM ::MCP ::Protocol .supported_versions
419+ puts RubyLLM ::MCP ::Native :: Protocol .supported_versions
383420# => ["2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"]
384421
385422# Check if a version is supported
386- RubyLLM ::MCP ::Protocol .supported_version?(" 2025-06-18" )
423+ RubyLLM ::MCP ::Native :: Protocol .supported_version?(" 2025-06-18" )
387424# => true
388425```
389426
0 commit comments