McpTest
unit tests for your MCP server tools — catch broken tools before Claude does
npx -y github:Isco0819/mcp-testEver run into this?
Like supertest for REST APIs (14k GitHub stars) or promptfoo for LLM evals (9k stars), both with massive traction, but nothing equivalent exists for MCP tool contract testing. Devs ship MCP servers and only discover broken tools when Claude Desktop throws cryptic runtime errors. There is no standard way to write repeatable test cases for MCP tool inputs and outputs.
The fix
npx mcp-test reads a YAML spec of expected tool calls and responses, spawns your MCP server locally via stdio transport, fires each test case, and reports pass/fail with diffs. Zero external API — pure local subprocess.
What it does
- YAML test specs: define tool name, input args, and expected output as JSON Schema or exact snapshot
- Spawns your MCP server as a child process via stdio transport — no Claude Desktop or network needed
- Schema validation mode via ajv + snapshot mode for regression locking across refactors
- CI-friendly exit codes and JSON reporter compatible with GitHub Actions and Jest reporters