Skip to content

Cover the Ruby MCP client in the smoke tests - #183

Draft
olaservo wants to merge 1 commit into
modelcontextprotocol:mainfrom
olaservo:ruby-smoke-tests
Draft

Cover the Ruby MCP client in the smoke tests#183
olaservo wants to merge 1 commit into
modelcontextprotocol:mainfrom
olaservo:ruby-smoke-tests

Conversation

@olaservo

Copy link
Copy Markdown
Member

CI installed no Ruby toolchain and the suite ran no Ruby example, so nothing under mcp-client-ruby was exercised by a green build — including #177, which changes its Gemfile.

Adds ruby/setup-ruby (3.4 — 3.2 reached EOL in March 2026, so the anthropic gem's >= 3.2.0 floor says what it tolerates, not what to install here) and an mcp-client-ruby test. The client connects before it checks ANTHROPIC_API_KEY and exits 0 without one, so it runs credential-free like the Python and TypeScript clients.

The Ruby weather server stays uncovered: the mcp gem's server omits the resultType field that 2026-07-28 requires, so the test client rejects its responses. The README claimed the gem could not negotiate that revision — untrue since 1.1.0, it negotiates and then answers incompletely. Corrected.

Verified in a fork with #177 cherry-picked on top: 7/7 pass. On Ruby 3.4 base64 is no longer a default gem, so that run doubles as confirmation of #177 — without the transitive dependency the client would fail to load.

CI installed no Ruby toolchain and the suite ran no Ruby example, so
nothing under mcp-client-ruby or weather-server-ruby was exercised by a
green build. A dependency change there -- modelcontextprotocol#177 removes the base64 gem
now that the anthropic gem declares it -- merges on the strength of a
check that never resolved its Gemfile.

The client is drivable without credentials: it connects before it looks
for ANTHROPIC_API_KEY and exits 0 when there is none, the same shape the
Python and TypeScript clients already rely on for their coverage.

The Ruby weather server stays uncovered. The mcp gem's server does not
emit the resultType field that protocol revision 2026-07-28 makes
mandatory, so the test client rejects its responses; that is a fix for
the gem rather than something an example can work around. The README
said the gem could not negotiate the revision at all, which stopped
being true at 1.1.0 -- it negotiates, then answers incompletely.

Ruby 3.4 rather than the 3.2.0 floor the anthropic gem declares: 3.2
reached end of life in March 2026, and a gem's floor says what it
tolerates, not what an example should tell people to run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Ruby MCP client coverage to the smoke-test suite and CI.

Changes:

  • Installs Ruby 3.4 in CI.
  • Adds Bundler preparation and Ruby client smoke testing.
  • Updates smoke-test documentation and Ruby server limitations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml Configures Ruby for CI.
tests/utils.sh Adds Bundler dependency setup.
tests/smoke-test.sh Runs the Ruby client smoke test.
tests/README.md Documents Ruby coverage and requirements.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/smoke-test.sh
check_dependency bundle || return 1
local client_dir="${PROJECT_ROOT}/mcp-client-ruby"
ensure_bundled "${client_dir}" || return 1
(cd "${client_dir}" && bundle exec ruby client.rb "${MOCK_SERVER}") >/dev/null 2>&1
Comment thread .github/workflows/ci.yml
Comment on lines +44 to +45
# 3.4 is the oldest series still supported; 3.2 reached end of life in
# March 2026.
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