Pin the suite, baseline what you don't ship, and make the baseline fail when it goes stale
A server can say "MCP 2026-07-28" in its README, pass every one of its own tests, and still get the protocol wrong. Its own tests check what its author thought the spec said.
The MCP project publishes a test suite for exactly this: @modelcontextprotocol/conformance. It connects to a running server, runs scenarios written against the spec, and reports each check as passed, failed or warned. This tutorial wires it into CI for a real server, mcp-better (Rust, rmcp 3.10), so that every pull request runs it.
Everything below is in that repo: scripts/conformance.sh, conformance-baseline.yml, the conformance/ folder and .github/workflows/ci.yml.
What the suite runs
npx --yes @modelcontextprotocol/conformance@0.2.0-alpha.12 \
server --url http://127.0.0.1:8799/mcp --requirements 2026-07-28
-
--requirements 2026-07-28runs 50 scenarios. The suite scores 37 of them; the other 13 (the Tasks extension and three pending scenarios) run but don't count toward its exit code. - Extensions outside that set run by name, for example the Skills extension (SEP-2640):
--scenario sep-2640-skills-enumerationand--scenario sep-2640-skills-manifest. - It talks to the server over Streamable HTTP, so a stdio-first server needs an HTTP mode for the run.
Step 1: Pin the suite and start the server
Pin an exact version. The suite is in alpha and its checks change between releases; an unpinned run can go red on a day nothing in your server changed.
SUITE="@modelcontextprotocol/conformance@0.2.0-alpha.12"
PORT=8799
MCP_BETTER_HTTP_ADDR="127.0.0.1:$PORT" target/debug/mcp-better --http &
scripts/conformance.sh also refuses to start when something already listens on the port. Without that check, a server left over from an earlier run gets tested instead of the one just built.
Step 2: The first run, and why most of it fails
The first run against a real server is mostly red:
✗ tools-call-simple-text: 1 passed, 1 failed
✗ tools-call-image: 1 passed, 1 failed
✗ prompts-get-simple: 1 passed, 1 failed
✗ resources-read-text: 1 passed, 1 failed
✓ tools-list: 4 passed, 0 failed
✓ sep-2164-resource-not-found: 4 passed, 0 failed
✗ caching: 7 passed, 1 failed
That run exits 1: 102 checks pass and 67 fail, 31 of them in scored scenarios.
Most of those failures don't mean the server is wrong. Many checks call fixtures: tools, prompts and resources that exist only in the suite's reference server (test_simple_text, test://…). A server that doesn't ship test_image_content can't pass a check that calls it.
So the result needs sorting into three groups: checks the server passes, checks that need a fixture, and real failures.
Step 3: A baseline file with two kinds of entry
The suite takes a list of expected failures with --expected-failures. mcp-better's is conformance-baseline.yml, one line per check:
server:
- tools-call-simple-text:tools-call-simple-text # fixture
- resources-read-text:resources-read-text # fixture
- server-stateless:sep-2575-server-rejects-undeclared-capability # fixture
- prompts-list:prompts-list # not declared
- caching:sep-2549-prompts-list-caching-hints # not declared
Every entry is one of two kinds, and the file's header says so:
- fixture: the check calls something from the suite's reference server.
-
not declared: the server doesn't declare that capability. mcp-better doesn't declare prompts or completions, so
prompts/listandcompletion/completeanswer method-not-found, and the checks that assume both are served fail.
Anything else is a real failure, and it stays red.
The suite enforces the file in both directions. In 0.2.0-alpha.12, the run's exit code is 1 when a check fails that isn't listed, and when a listed check starts passing:
Stale baseline entries (now passing - remove from baseline):
So the file can't silently grow, and it can't keep an entry the server has outgrown. mcp-better's textbook binary runs with 33 entries: 74 scored checks pass, and the 33 listed ones fail or warn by design (31 fail, 2 end as WARNING). The run ends with:
Baseline check passed: all failures are expected.
Step 4: Check the warnings too
A check can also end as a WARNING (a SHOULD the server doesn't meet). With --expected-failures, the suite counts a warning in a scored scenario like a failure: an unlisted one exits 1. Without a baseline the exit code ignores warnings. The Skills scenarios run that way: by name with --scenario, outside the scored set and with no baseline.
scripts/conformance.sh adds a strict pass for those runs: a short Node script walks every checks.json the suite wrote and fails on any FAILURE or WARNING. It runs on the Skills scenarios for every binary:
== Skills (SEP-2640): enumeration and manifest
strict: every check passed (no FAILURE, no WARNING)
mcp-better passes 38 of 38 Skills checks.
Step 5: A second binary that carries the fixtures
A baseline shows which checks a server skips. It can't show that the transport, the error shapes and the Tasks flows behind those skipped checks work. For that, mcp-better builds a second binary, mcp-better-conformance, from the conformance/ folder:
- mcp-better's own tools, skill resources and Skills come from the real server (
mcp_better::BetterServer). - The fixtures (
test_*,test://…, fixture prompts, completions, logging, subscriptions, Tasks) are adapted from the Rust MCP SDK's own conformance server, under Apache-2.0, with aNOTICEand the list of changes at the top ofsrc/main.rs. - It serves HTTP with the same transport settings as the real server (
mcp_better::http_config). -
publish = false: it never ships in the crate or the npm package.
This binary runs with no baseline. Every check of all 50 scenarios must pass, scored or not, with no warnings:
Total: 196 passed, 0 failed
strict: every check passed (no FAILURE, no WARNING)
The suite itself runs no checks in one scenario, tasks-status-notifications: its only check is skipped, and that check's description says it is pending a subscriptions/listen rewrite.
Be clear about what this 100% measures: mostly the fixtures and the shared transport. The textbook run and the Skills scenarios measure the server's own code.
Step 6: Wire it into CI
Both runs go in the same job as the build and the tests (from .github/workflows/ci.yml):
- uses: actions/setup-node@v6
with:
node-version: 22
- name: official MCP conformance suite, textbook binary
env:
MCP_CONFORMANCE_OUT: ${{ runner.temp }}/conformance-textbook
run: |
MCP_BETTER_BIN="${{ github.workspace }}/target/debug/mcp-better" \
bash scripts/conformance.sh
- name: conformance build (mcp-better + suite fixtures) fmt, clippy, build, test
working-directory: conformance
run: |
cargo fmt -- --check
cargo clippy --locked --all-targets -- -D warnings
cargo build --locked
cargo test --locked
- name: official MCP conformance suite, conformance build, no baseline (100%)
env:
MCP_CONFORMANCE_OUT: ${{ runner.temp }}/conformance-build
run: |
BIN="${{ github.workspace }}/conformance/target/debug"
MCP_BETTER_BIN="$BIN/mcp-better-conformance" \
MCP_CONFORMANCE_BASELINE='' bash scripts/conformance.sh
- name: keep conformance results when a run fails
if: failure()
uses: actions/upload-artifact@v6
with:
name: conformance-results
path: ${{ runner.temp }}/conformance-*
if-no-files-found: ignore
(The repo pins checkout, setup-node and this upload-artifact by commit; its other actions use a version tag or branch name.) The results folder is kept as a CI artifact when a run fails, so a red check can be read without re-running it.
The catch: a fixture entry can hide a bug in your own code
Three of the baselined checks are about declared client capabilities:
# fixture, all three
- server-stateless:sep-2575-server-rejects-undeclared-capability
- server-stateless:sep-2575-missing-capability-http-400
- input-required-result-capability-check:sep-2322-respect-client-capabilities
The first says a server must not rely on a capability the client didn't declare, and must return -32021 (missing required client capability) instead; the second checks the HTTP 400 that goes with that error; the third says a server only sends input requests for capabilities the client declared. The suite runs all three only against its own fixture tools, so for the textbook binary they were baselined as "fixture", correctly.
But mcp-better has its own tool that asks the client for input mid-call: confirm_echo (SEP-2322, multi round-trip requests) requests an elicitation. In 0.6.0 it asked every client, declared or not:
tools/call confirm_echo with clientCapabilities: {}
→ resultType: input_required, with an elicitation/create request
The suite couldn't see this: its checks never call confirm_echo. 0.7.0 fixed it, and added the test the baseline had stood in for: a handler test over a real client/server pair that sends confirm_echo from a client without elicitation and expects -32021, and from one with elicitation and expects input_required.
So, for every fixture entry, ask one more question: does my own code do what this check checks? If it does, write that test yourself. The baseline says the suite can't check it; it doesn't say nothing needs checking.
Try it
git clone https://github.com/Wolfe-Jam/mcp-better.git
cd mcp-better
cargo build --bins
# textbook binary + baseline
bash scripts/conformance.sh
# conformance build, strict
(cd conformance && cargo build) && \
MCP_BETTER_BIN="$(pwd)/conformance/target/debug/mcp-better-conformance" \
MCP_CONFORMANCE_BASELINE='' bash scripts/conformance.sh
You need Rust (1.88 or later for mcp-better itself; CI builds the conformance binary on stable), Node (for npx) and network access: the suite is fetched at its pinned version. The script uses bash's /dev/tcp and seq; CI runs it on Ubuntu.
To run it against another server: start the server over Streamable HTTP, run the suite with --requirements 2026-07-28, sort every failure into fixture, not declared or real, and put only the first two in a baseline.
Further reading: MCP conformance suite · mcp-better on GitHub · Conformance section of the README
Checked against mcp-better v0.9.0 and @modelcontextprotocol/conformance@0.2.0-alpha.12 on November 29, 2026.
— Drafted by Claude · Edited by James Wolfe
Top comments (1)
Pinning the suite version next to the protocol version the server claims seems worth it, otherwise a new spec revision can turn CI red overnight for a server that did not change.