Skip to content

ci: run the official MCP conformance suite - #249

Merged
Gerardo Sabetta (gerardosabetta) merged 2 commits into
mainfrom
surf-2304-mcp-conformance-ci
Nov 30, 2026
Merged

Gerardo Sabetta (gerardosabetta) merged 2 commits into
mainfrom
surf-2304-mcp-conformance-ci

Conversation

@gerardosabetta

@gerardosabetta Gerardo Sabetta (gerardosabetta) commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a conformance job to ci-gates.yml that runs the official MCP conformance suite (@modelcontextprotocol/conformance 0.1.16, pinned through the pnpm catalog) against a locally built socket-mcp. Linear: SURF-2304.

  • scripts/conformance.mts (pnpm run conformance) starts dist/index.cjs in HTTP mode on a free localhost port with a dummy SOCKET_API_TOKEN (Socket, Sentry and MCP env vars are stripped from the server's environment), waits for /health, runs conformance server --spec-version 2025-11-25 --expected-failures .config/repo/conformance-baseline.yaml -o .cache/conformance, then stops the server.
  • .config/repo/conformance-baseline.yaml lists today's 24 known failures, each with a one-line reason. The CLI exits 1 on a failure not in the baseline and on a baseline entry that now passes.
  • CI uploads .cache/conformance as the mcp-conformance artifact, pass or fail. No secrets, no network beyond localhost.

Results (30 scenarios, spec 2025-11-25)

  • 6 pass: server-initialize, ping, tools-list, tools-call-simple-text, tools-call-error, dns-rebinding-protection.
  • 24 expected failures:
    • 11 resources-* / prompts-*, plus logging-set-level and completion-complete: the server advertises only tools, so these methods answer -32601 (correct per spec; the suite still runs them).
    • 10 tools-call-* / elicitation-*: they call fixture tools (test_image_content, test_sampling, ...) that only the suite's reference server defines.
    • server-sse-multiple-streams: stateless serving issues no Mcp-Session-Id by design. The scenario only warns, but baseline mode counts a warning as a failure.
  • 0 unexpected failures.

Heads-up for reviewers

  • Spec version: the issue asked for --spec-version 2026-07-28, but conformance 0.1.16 rejects it (Unknown spec version; valid values are 2025-03-26, 2025-06-18, 2025-11-25, draft, extension). I used 2025-11-25, the newest dated revision. Filtering is cumulative, so 2025-06-18 scenarios run too. Bump it when the package learns 2026-07-28.
  • Baseline, not fixes: no failure is a server bug. They're optional capabilities we don't offer or reference-only fixture tools. Adding placeholder resources or prompts just to pass would grow the public surface for no user benefit.
  • Two weak passes: tools-call-simple-text and tools-call-error pass on our Unknown tool error result. They check the error shape, not real tool output.
  • The issue's command used npx. The script runs the catalog-pinned dev dependency from node_modules instead, so CI doesn't fetch at run time.

Testing

  • pnpm run build && pnpm run conformance: exit 0 in about 1.6 s.
  • Protocol break: changed capabilities: { tools: {} } to capabilities: {} in lib/server.mts, rebuilt and reran. 6 unexpected failures (server-initialize, ping, tools-list, tools-call-simple-text, tools-call-error, dns-rebinding-protection), exit 1. Restored it and got exit 0 again.
  • pnpm run check is clean and pnpm test passes 693/693.
  • Not covered: stdio transport (the suite tests HTTP servers only), OAuth mode, and the 2026-07-28 spec revision.

Slides

cover

gap

flow

results

headsup

verify

🤖 Generated with Claude Code

Add a conformance job to ci-gates that builds the server, starts it in
HTTP mode on localhost with a dummy Socket API token, and runs
@modelcontextprotocol/conformance 0.1.16 (pinned through the pnpm
catalog) against it. A checked-in baseline of today's known failures,
each with a one-line reason, makes the job fail only on regressions or
stale entries. Results are uploaded as an artifact.

Refs SURF-2304
Gerardo Sabetta (gerardosabetta) added a commit that referenced this pull request Nov 30, 2026
@socket-security-staging

socket-security-staging Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​modelcontextprotocol/​conformance@​0.1.169910010093100

View full report

@socket-security-staging

socket-security-staging Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Publisher changed: npm range-parser is now published by blakeembrey

Author: blakeembrey

From: package.json → npm/mcp-tada@0.5.0 → npm/@modelcontextprotocol/conformance@0.1.16 → npm/range-parser@1.3.0

ℹ Read more on: This package | This alert | What is unstable ownership?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity-Staging ignore npm/range-parser@1.3.0. You can also ignore all packages with @SocketSecurity-Staging ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@socket-security

socket-security Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​modelcontextprotocol/​conformance@​0.1.167510010096100

View full report

@gerardosabetta
Gerardo Sabetta (gerardosabetta) marked this pull request as ready for review November 30, 2026 20:04
@cursor

cursor Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test and CI infrastructure only; no runtime server behavior changes. Risk is limited to CI reliability and lockfile growth from the conformance dependency tree.

Overview
Adds automated MCP protocol conformance in CI and locally via pnpm run conformance, using catalog-pinned @modelcontextprotocol/conformance (0.1.16).

scripts/conformance.mts builds on the existing dist/index.cjs binary: it starts the server in HTTP mode on a free localhost port with a dummy SOCKET_API_TOKEN and stripped SOCKET_* / SENTRY_* / MCP_* env, waits for /health, then runs the official suite at spec 2025-11-25 with --expected-failures pointing at .config/repo/conformance-baseline.yaml. Results go to .cache/conformance. The gate fails on new failures or stale baseline entries that now pass.

The baseline documents 24 intentional expected failures (tools-only server, missing optional capabilities, reference-only fixture tools, and server-sse-multiple-streams).

A new conformance job in ci-gates.yml runs after build, uploads artifacts on every run, and does not use secrets beyond localhost.

Reviewed by Cursor Bugbot for commit 0c3ee27. Configure here.

Comment thread scripts/conformance.mts Resolved
Comment thread scripts/conformance.mts Resolved
Bind the conformance server to 127.0.0.1 so a local run never listens
outside loopback, and cap each /health request by the remaining startup
budget so a stalled connection cannot outlast it. MCP_HOST is opt-in;
unset keeps listening on every interface for deployed servers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Confirmed the conformance child binds to loopback and health requests respect the startup deadline. The conformance job passed and uploaded results for all 30 scenarios.

@gerardosabetta
Gerardo Sabetta (gerardosabetta) merged commit 28f78e9 into main Nov 30, 2026
13 checks passed
@gerardosabetta
Gerardo Sabetta (gerardosabetta) deleted the surf-2304-mcp-conformance-ci branch November 30, 2026 21:53
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