Test an MCP server before agents rely on it: handshake and transport checks, schema and description checks for every tool, structured error behavior on bad inputs, edge cases and permission boundaries, conformance and regression runs with a fingerprinted tools/list, and a report that separates broken tools from weak descriptions. Ships a runnable stdio probe, a reusable test-case library, a per-tool scoring rubric, and a worked audit of a flawed three-tool server with a clean control server beside it. Use when someone asks to test, audit, validate, QA, or review an MCP server, check whether an MCP server is ready for agents or CI, debug why agents misuse an MCP server's tools, or set up regression testing for tool definitions.
./install.sh mcp-server-testingname: mcp_server_testing description: "Test an MCP server before agents rely on it: handshake and transport checks, schema and description checks for every tool, structured error behavior on bad inputs, edge cases and permission boundaries, conformance and regression runs with a fingerprinted tools/list, and a report that separates broken tools from weak descriptions. Ships a runnable stdio probe, a reusable test-case library, a per-tool scoring rubric, and a worked audit of a flawed three-tool server with a clean control server beside it. Use when someone asks to test, audit, validate, QA, or review an MCP server, check whether an MCP server is ready for agents or CI, debug why agents misuse an MCP server's tools, or set up regression testing for tool definitions."
An MCP server is a contract a model reads and acts on. Unit tests on the handlers cannot see most of what breaks that contract: a description too vague to choose by, a schema the handler quietly ignores, an annotation that understates a deletion, an error that arrives in the wrong layer where the model cannot learn from it. This skill tests the server the way a client and an agent meet it, from the handshake out to a real task, and reports what it finds in two piles: tools that are broken, and tools that work but are described too weakly to use well.
The kit has four parts. scripts/mcp_probe.py is a dependency-free stdio probe that runs the automated cases and fingerprints the tool list. references/test-cases.md is the full reusable case library, layers 0 to 6. references/scoring-rubric.md scores each tool on six dimensions and sets the release gates. references/worked-audit.md is a complete audit of a planted-fault server, with the clean control server it was measured against, both runnable from examples/.
python3 scripts/mcp_probe.py live -- <server command>. It checks the initialize handshake and tools capability, follows tools/list pagination, runs the static schema and description checks, fires the safe negative calls (unknown tool, unknown method, missing required arguments, one wrong-typed argument), checks stdout purity, and prints the tools/list SHA-256 fingerprint. It never invents valid arguments and never sends a valid call to a tool whose name or annotations mark it destructive. Save the output, it is the evidence base for scoring. For a remote server, or a stdio server the probe cannot launch, capture tools/list in the Inspector CLI and run python3 scripts/mcp_probe.py audit-list <file> for the static half, then work the live cases by hand.npx @modelcontextprotocol/inspector against the same server (the reference testing tool from the MCP project, needs Node 22.19.0 or newer, no install). Confirm what the probe saw is what a second client sees: the same tool list, the same schemas, the same error shapes. A server that behaves differently per client has a dialect problem, and that is a finding, not a footnote.references/test-cases.md, layers 0 to 6 in order: transport and handshake, discovery, schema and description, happy path, bad input and error behavior, permission boundaries, regression and agent runs. The two error layers need separate attention. Per the specification, unknown tools, invalid arguments, and server failures are protocol errors, standard JSON-RPC responses (method not found is -32601, invalid params is -32602). Failures inside a tool's own work, a missing record, a downstream API failure, bad input data, belong in a normal result with isError true and text that tells the model what happened and what to do next. A server that mixes these layers up trains agents to retry blindly or to give up on recoverable errors.references/scoring-rubric.md: six dimensions at 0 to 3, discoverability, schema tightness, happy path correctness, error behavior, safety and boundaries, output discipline. Classify each finding as a broken tool or a weak description before scoring, the fix owner and the retest cost differ. Apply the server gates after the rows: handshake and stdout purity, unknown tool and method rejected, fingerprint and golden results recorded, no secret in any result, error, or log line. A safety score of 0 on any tool blocks the release at any total.A finished test run delivers a report with:
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.