Repository navigation
ci: run the official MCP conformance suite - #249
Conversation
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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
PR SummaryLow Risk Overview
The baseline documents 24 intentional expected failures (tools-only server, missing optional capabilities, reference-only fixture tools, and A new Reviewed by Cursor Bugbot for commit 0c3ee27. Configure here. |
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.
John-David Dalton (jdalton)
left a comment
There was a problem hiding this comment.
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.
Summary
Adds a
conformancejob toci-gates.ymlthat runs the official MCP conformance suite (@modelcontextprotocol/conformance0.1.16, pinned through the pnpm catalog) against a locally built socket-mcp. Linear: SURF-2304.scripts/conformance.mts(pnpm run conformance) startsdist/index.cjsin HTTP mode on a free localhost port with a dummySOCKET_API_TOKEN(Socket, Sentry and MCP env vars are stripped from the server's environment), waits for/health, runsconformance server --spec-version 2025-11-25 --expected-failures .config/repo/conformance-baseline.yaml -o .cache/conformance, then stops the server..config/repo/conformance-baseline.yamllists 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..cache/conformanceas themcp-conformanceartifact, pass or fail. No secrets, no network beyond localhost.Results (30 scenarios, spec 2025-11-25)
tools, so these methods answer -32601 (correct per spec; the suite still runs them).test_image_content,test_sampling, ...) that only the suite's reference server defines.Mcp-Session-Idby design. The scenario only warns, but baseline mode counts a warning as a failure.Heads-up for reviewers
--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.Unknown toolerror result. They check the error shape, not real tool output.npx. The script runs the catalog-pinned dev dependency fromnode_modulesinstead, so CI doesn't fetch at run time.Testing
pnpm run build && pnpm run conformance: exit 0 in about 1.6 s.capabilities: { tools: {} }tocapabilities: {}inlib/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 checkis clean andpnpm testpasses 693/693.Slides
🤖 Generated with Claude Code