Add MCP::Client::Stdio transport
## Motivation and Context The `MCP::Client` currently only supports HTTP transport (`MCP::Client::HTTP`). To achieve parity with other MCP SDKs (Python, TypeScript, C#) which provide stdio client transports for spawning and communicating with server subprocesses, the Ruby SDK needs a stdio client transport. https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#stdio This enables building MCP clients that launch server processes and communicate via stdin/stdout using newline-delimited JSON-RPC 2.0 messages. ## How Has This Been Tested? Added tests for process spawning, protocol initialization handshake, notification handling, error handling, and transport close lifecycle. ## Additional context Enabled the `Lint/IncompatibleIoSelectWithFiberScheduler` cop in `.rubocop.yml` to detect accidental use of `IO.select` instead of `IO#wait_readable`.
This commit is contained in:
parent
8823bd34ef
commit
21eef8df9a
1 changed files with 1079 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative "client/stdio"
|
||||
require_relative "client/http"
|
||||
require_relative "client/tool"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue