← Back to all products

MCP Server Conformance Test Kit

$39

A black-box conformance suite for remote MCP (Streamable HTTP) servers: verifies initialize, tools/list schema validity, tools/call contracts, and error handling. CI-ready, self-tested.

📁 7 files🏷 v1.0.0 (updated 2026-08-02)
TypeScriptMarkdownJSON

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) 📦 Download Free Sample

📁 File Structure 7 files

mcp-conformance-test-kit/ ├── README.md ├── package.json ├── src/ │ ├── client.ts │ ├── conformance.ts │ └── run.ts └── test/ └── conformance.test.ts

📖 Documentation Preview README excerpt

MCP Server Conformance Test Kit

A black-box conformance suite for remote MCP servers. Point it at your

Streamable-HTTP /mcp endpoint and it verifies the server behaves per the Model

Context Protocol: initialize handshake, tools/list shape, tools/call

success + error contracts, JSON-RPC framing, and tool-schema validity. Run it in

CI so a refactor can't silently break your agent integration.

Why you need it

MCP clients (Claude, Cursor, Cline, agent frameworks) are strict about the

protocol. A server that returns a slightly wrong shape "works on my machine" and

then fails in a real client. This kit catches those before your users' agents do.

What it checks

  • Transport: a plain GET returns something sane; POST speaks JSON-RPC 2.0.
  • initialize: returns protocolVersion, capabilities, serverInfo.
  • tools/list: every tool has a name, description, and a valid JSON-schema

inputSchema (object type, properties present).

  • tools/call: a read-only tool returns content[]; an invalid-args call returns

an error result (not a crash / 500).

  • Annotations: side-effecting tools are not marked readOnlyHint: true

(honesty check — clients gate on this).

  • Error handling: unknown method / malformed body yield JSON-RPC errors, not

HTML stack traces.

What's inside

  • src/client.ts — a tiny MCP-over-HTTP client (SSE-aware JSON parsing).
  • src/conformance.ts — the suite; returns a structured pass/fail report.
  • src/run.ts — CLI: MCP_URL=https://you/mcp node run.js → prints report, exits

non-zero on failure (CI-ready).

  • test/conformance.test.ts — runs the suite against a built-in mock MCP server so

the kit itself is tested.

Usage


npm install
MCP_URL=https://your-server.example/mcp npm run check   # gates on conformance

Requirements

Node 18+ (global fetch). No external deps.

License

MIT.

📄 Code Sample .ts preview

src/client.ts/** Minimal MCP-over-Streamable-HTTP client. Handles the JSON-or-SSE response the * spec allows. `fetchImpl` is injectable so the suite can run against a mock. */ export type FetchLike = (url: string, init: any) => Promise<{ status: number; text: () => Promise<string> }>; let idCounter = 1; export function parseBody(text: string): any { const t = text.trim(); if (t.startsWith('{') || t.startsWith('[')) return JSON.parse(t); // SSE framing: find the last data: line const line = t.split('\n').reverse().find((l) => l.startsWith('data:')); if (line) return JSON.parse(line.slice(5).trim()); return JSON.parse(t); } export async function rpc( url: string, method: string, params: unknown, fetchImpl: FetchLike = fetch as any, ): Promise<{ status: number; body: any }> { const res = await fetchImpl(url, { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json, text/event-stream' }, body: JSON.stringify({ jsonrpc: '2.0', id: idCounter++, method, params }), }); const raw = await res.text(); let body: any = null; try { body = parseBody(raw); } catch { body = { _unparseable: raw.slice(0, 200) }; } return { status: res.status, body }; }
Buy Now — $39 Back to Products