Skip to content

test: MCP verification harness + bump SDK floor to ^1.29.0 (#202) - #205

Merged
wpak-ai merged 4 commits into
cppalliance:mainfrom
timon0305:feat/mcp-rc-readiness-202
Jul 10, 2026
Merged

test: MCP verification harness + bump SDK floor to ^1.29.0 (#202)#205
wpak-ai merged 4 commits into
cppalliance:mainfrom
timon0305:feat/mcp-rc-readiness-202

Conversation

@timon0305

@timon0305 timon0305 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Readies the server for the upcoming MCP 2026-07-28 RC protocol revision. The RC SDK is not published yet (latest is 1.29.0, no rc/next tag), so this takes the fallback path from the issue: move to the newest stable and land a harness that re-verifies the moment an RC SDK is pinned.

  • Bumped the declared @modelcontextprotocol/sdk floor from ^1.25.3 to ^1.29.0 to match what the lockfile already resolved. McpServer construction, tool registration, and the stdio transport use current SDK APIs and needed no changes.
  • Added an end-to-end verification harness (src/tests/mcp-rc-readiness.test.ts) that drives the real server over the SDK's in-memory transport with the SDK client: the initialize handshake and protocol negotiation, the full registered tool surface (eight core tools plus the Alliance suggest_query_params), and a round-trip tool call that asserts seeded data comes back. A raw initialize also checks the server negotiates LATEST_PROTOCOL_VERSION and falls back for an unknown version.
  • Every protocol assertion keys off the SDK's LATEST_PROTOCOL_VERSION, so pinning the RC SDK re-runs the check with no test edits.
  • Synced the SDK version references in the README, the package-split eval doc, and the CHANGELOG.

Verified locally: typecheck and eslint src/ clean, full suite green (344 tests including the five new), build passes.

Closes #202.

Summary by CodeRabbit

  • New Features
    • Raised the minimum supported MCP SDK version to v1.29+ with aligned guidance across the project.
    • Added an end-to-end MCP readiness harness covering initialization, tool discovery, and protocol negotiation.
  • Tests
    • Verifies core/Alliance tool surfaces, tools/list responses, and round-trip tool calls via in-memory transport.
  • Documentation
    • Updated README and docs for the new SDK baseline, trimmed instruction guidance, and noted breaking response-shape changes.
  • Chores
    • Reduced per-session instruction token usage and simplified the manual Alliance flow with a Pinecone disable escape clause.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee0595e7-90d7-41bc-9125-dea23ea507cf

📥 Commits

Reviewing files that changed from the base of the PR and between 2a7ecbe and 369147c.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/__tests__/mcp-rc-readiness.test.ts
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/tests/mcp-rc-readiness.test.ts

📝 Walkthrough

Walkthrough

Bumps @modelcontextprotocol/sdk to ^1.29.0, updates related documentation and changelog notes, and adds an in-memory Vitest harness that checks server initialization, tool registration, tool calls, and protocol negotiation.

Changes

SDK bump and RC-readiness verification

Layer / File(s) Summary
SDK dependency bump and documentation
package.json, README.md, docs/PACKAGE_SPLIT_EVAL.md, CHANGELOG.md
Bumps @modelcontextprotocol/sdk from ^1.25.3 to ^1.29.0 and updates version guidance, changelog entries, response-shape notes, and instruction text.
Harness setup and connection helpers
src/__tests__/mcp-rc-readiness.test.ts
Defines CORE_TOOLS, isolated server setup, in-memory client connections, raw initialization, and cleanup.
Server and protocol readiness checks
src/__tests__/mcp-rc-readiness.test.ts
Tests initialization metadata, core and Alliance tool lists, list_namespaces round-tripping, and LATEST_PROTOCOL_VERSION negotiation fallback.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: wpak-ai, leostar0412

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR uses stable SDK 1.29.0 instead of the required RC or pinned pre-release, so the issue's readiness target is not fully met. Retarget the dependency to the RC or a pinned pre-release, then rerun the harness and verify protocol negotiation against that version.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: MCP verification harness plus SDK floor bump.
Out of Scope Changes check ✅ Passed The changes stay focused on the SDK bump, MCP harness, and related documentation updates, with no clear unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

…ce#202)

Bump the declared @modelcontextprotocol/sdk floor from ^1.25.3 to ^1.29.0 to
match the version the lockfile already resolved, readying the server for the
upcoming MCP RC protocol revision. McpServer construction, tool registration,
and the stdio transport use current SDK APIs and are unchanged.

Add an end-to-end verification harness that drives the real server over an
in-memory transport with the SDK client: initialize + protocol negotiation, the
full registered tool surface (core + Alliance), and a round-trip tool call. The
protocol assertions key off the SDK's LATEST_PROTOCOL_VERSION, so pinning the RC
SDK re-runs the check with no test edits.

Sync the SDK version references in README, PACKAGE_SPLIT_EVAL, and CHANGELOG.
@timon0305
timon0305 force-pushed the feat/mcp-rc-readiness-202 branch from 6b1e5b1 to 6672e8e Compare July 9, 2026 02:22

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
src/__tests__/mcp-rc-readiness.test.ts (1)

62-71: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider typing the raw message instead of any.

The SDK already exports JSON-RPC message types from @modelcontextprotocol/sdk/types.js (already imported for LATEST_PROTOCOL_VERSION on line 4). Typing message there would let TypeScript check the .id/.error/.result access instead of suppressing the rule.

Optional typing tweak
-    // eslint-disable-next-line `@typescript-eslint/no-explicit-any`
-    clientTransport.onmessage = (message: any) => {
+    clientTransport.onmessage = (message: JSONRPCMessage) => {
+      if (!('id' in message) || message.id !== 1) return;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/__tests__/mcp-rc-readiness.test.ts` around lines 62 - 71, The test
callback in mcp-rc-readiness.test.ts is using an explicit any for the raw
JSON-RPC message, which bypasses type checking. Replace the any on
clientTransport.onmessage with the exported JSON-RPC message type from
`@modelcontextprotocol/sdk/types.js`, using the existing import pattern already
used for LATEST_PROTOCOL_VERSION, so TypeScript can validate the .id, .error,
and .result access. Keep the Promise handling in the test the same, just tighten
the message typing in the onmessage handler.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/__tests__/mcp-rc-readiness.test.ts`:
- Around line 62-71: The test callback in mcp-rc-readiness.test.ts is using an
explicit any for the raw JSON-RPC message, which bypasses type checking. Replace
the any on clientTransport.onmessage with the exported JSON-RPC message type
from `@modelcontextprotocol/sdk/types.js`, using the existing import pattern
already used for LATEST_PROTOCOL_VERSION, so TypeScript can validate the .id,
.error, and .result access. Keep the Promise handling in the test the same, just
tighten the message typing in the onmessage handler.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2cfa7973-9ed6-43d6-971b-20a877b7ee4e

📥 Commits

Reviewing files that changed from the base of the PR and between d087a5e and 6b1e5b1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • docs/PACKAGE_SPLIT_EVAL.md
  • package.json
  • src/__tests__/mcp-rc-readiness.test.ts

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@91ff308). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #205   +/-   ##
=======================================
  Coverage        ?   85.07%           
=======================================
  Files           ?       46           
  Lines           ?     2399           
  Branches        ?      826           
=======================================
  Hits            ?     2041           
  Misses          ?      357           
  Partials        ?        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread CHANGELOG.md Outdated
Comment thread src/__tests__/mcp-rc-readiness.test.ts Outdated
…n raw probe

- CHANGELOG: the harness verifies McpServer construction and tool
  registration via server.connect() over the in-memory transport; the
  production StdioServerTransport wiring is unchanged and reviewed, not
  exercised (drop the overclaim that stdio is re-verified).
- Raw initialize probe closes its client transport in a finally, and its
  onmessage handler is typed with the SDK JSONRPCMessage instead of any.
The raw-probe rework tripped the format:check gate; apply prettier --write.
@wpak-ai
wpak-ai merged commit 02014e0 into cppalliance:main Jul 10, 2026
12 checks passed
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.

Ready the server for the MCP 2026-07-28 RC protocol revision

3 participants