Skip to content

Support running MCP client conformance tests against the Ruby SDK#293

Open
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:conformance_client
Open

Support running MCP client conformance tests against the Ruby SDK#293
koic wants to merge 1 commit intomodelcontextprotocol:mainfrom
koic:conformance_client

Conversation

@koic
Copy link
Copy Markdown
Member

@koic koic commented Apr 4, 2026

Motivation and Context

PR #248 introduced server conformance testing using @modelcontextprotocol/conformance. This extends coverage to the client side so that MCP::Client behavior can also be validated against the MCP specification.

Scope

Client conformance is driven by the conformance runner, which spawns test servers for each scenario and invokes conformance/client.rb against them. The client script performs the MCP initialize handshake and executes scenario-specific operations (for example listing tools or calling a tool).

Because MCP::Client does not yet support the full initialize handshake natively (pending #210), the client uses a lightweight ConformanceTransport that handles both JSON and SSE responses and performs the handshake manually.

Usage

Run all conformance tests (server + client):

bundle exec rake conformance

Run a single client scenario:

bundle exec rake conformance SCENARIO=initialize

List available scenarios:

bundle exec rake conformance_list

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

## Motivation and Context

PR modelcontextprotocol#248 introduced server conformance testing using `@modelcontextprotocol/conformance`.
This extends coverage to the client side so that `MCP::Client` behavior can also be validated against
the MCP specification.

### Scope

Client conformance is driven by the conformance runner, which spawns test servers for each scenario
and invokes `conformance/client.rb` against them. The client script performs the MCP initialize handshake
and executes scenario-specific operations (for example listing tools or calling a tool).

Because `MCP::Client` does not yet support the full initialize handshake natively (pending modelcontextprotocol#210),
the client uses a lightweight `ConformanceTransport` that handles both JSON and SSE responses
and performs the handshake manually.

### Usage

Run all conformance tests (server + client):

```console
bundle exec rake conformance
```

Run a single client scenario:

```console
bundle exec rake conformance SCENARIO=initialize
```

List available scenarios:

```console
bundle exec rake conformance_list
```
@koic koic force-pushed the conformance_client branch from bbe51b4 to 0cffc60 Compare April 4, 2026 08:19
@koic koic mentioned this pull request Apr 4, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants