ruby-sdk/lib/mcp/client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Koichi ITO 21eef8df9a 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`.
2026-03-19 12:41:27 +09:00
..
http.rb Add Accept header validation 2026-01-07 14:55:19 +09:00
stdio.rb Add MCP::Client::Stdio transport 2026-03-19 12:41:27 +09:00
tool.rb Add Tool output_schema support with comprehensive validation 2025-09-11 11:12:27 -04:00