…talogue
Adds @modelcontextprotocol/ext-apps/validator and a mcp-app-validator bin
implementing the official app validator proposed in modelcontextprotocol#673:
- rules.ts: machine-readable catalogue of app-side spec requirements
(stable APP-NNN ids, MUST->error / SHOULD->warning severity, spec
section + normative sentence per rule; direction field reserved for
host-side rules per modelcontextprotocol#674)
- static.ts: no-render checks over tools/list, resources/list, and
resources/read (ui:// scheme, mcp-app mimeType, text-or-blob content,
HTML sanity, resource existence, _meta.ui shapes via the generated Zod
schemas, CSP origin well-formedness, visibility values, deprecated
flat-key usage)
- harness.ts: behavioral checks under a minimal Playwright mock host
speaking the postMessage JSON-RPC protocol (initialize handshake,
appCapabilities, initialized notification, JSON-RPC well-formedness,
size-changed emission, tools/list answer when the tools capability is
declared, display-mode discipline); playwright resolved lazily so
static validation runs without it
- CLI: streamable-HTTP / --stdio / --html targets, pretty and --json
reporters, exit codes 0/1/2
Validated against the in-repo examples: all Node example servers pass;
pdf-server correctly draws the APP-104 (size-changed) warning.
Refs modelcontextprotocol#673
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
A working reference implementation of the official MCP App validator proposed in #673, opened as a draft to make that discussion concrete. Happy to restructure any part of it to maintainer preference (naming, location, scope).
New export @modelcontextprotocol/ext-apps/validator + mcp-app-validator bin:
Validation
Open questions (mirrored on #673)
Aware of the SDK v2 migration (#702/#710) — SDK contact is contained to two small modules, and I'm glad to rebase onto the v2 tree if preferred.
Refs #673
🤖 Generated with Claude Code