Skip to content

Add conformance-server: host conformance test harness (addresses #674)#693

Open
qchuchu wants to merge 1 commit into
modelcontextprotocol:mainfrom
qchuchu:conformance-server
Open

Add conformance-server: host conformance test harness (addresses #674)#693
qchuchu wants to merge 1 commit into
modelcontextprotocol:mainfrom
qchuchu:conformance-server

Conversation

@qchuchu

@qchuchu qchuchu commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds examples/conformance-server, a host-conformance test harness for the
MCP Apps spec (2026-01-26), modeled on web-platform-tests. It ships a single
ui:// runner that renders inside the host's sandboxed iframe, drives the
postMessage/JSON-RPC bridge, asserts the host's behaviour against the spec, and
reports PASS/FAIL right in the iframe.

This is a concrete first step toward #674 ("Set up public MCP Apps platform
tests"): the in-iframe runner that a public wpt.fyi-style grid would later
aggregate across hosts. Opening per the examples policy; happy to adjust scope.

The host is the browser. The ui:// page is the WPT test. The bridge is testharness.js.

What's included

  • examples/conformance-server/: React runner plus MCP server, mirroring the
    basic-server-react layout and toolchain (vite + bun build, stdio/HTTP entry).
  • A host-requirement catalogue embedded in the README: every host-directed
    normative requirement in the spec, each tagged with its RFC-2119 clause, a
    vantage (where it's observable: in-view / host / server), and status.
    24 of 45 implemented today (in-view automatic checks plus 6 human-in-the-loop).
  • Registered alongside debug-server everywhere it belongs: both E2E specs
    (servers.spec.ts, generate-grid-screenshots.spec.ts) and both publish
    workflows (pkg-pr-new plus npm matrix).

Testing

  • npm run build plus npm run --workspace examples/conformance-server build: clean
  • npm run prettier: clean
  • E2E golden snapshot generated via the playwright docker image (CI-identical
    rendering); servers.spec.ts passes for the new server.

Checklist

  • Follows existing code style (npm run prettier)
  • Builds and E2E tests pass
  • Documentation (README with full catalogue)
  • Focused and atomic
  • "Allow edits by maintainers" checked

🤖 Generated with Claude Code

A WPT-style host-conformance test runner for the MCP Apps spec (2026-01-26): ships a ui:// page that renders inside the host's sandboxed iframe, drives the postMessage/JSON-RPC bridge, asserts host behaviour against the spec, and reports PASS/FAIL right in the iframe.

First step toward modelcontextprotocol#674 (public MCP Apps platform tests). Mirrors the basic-server-react layout/toolchain and is registered alongside the other examples in both E2E specs and both publish workflows.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant