Test MCP servers automatically with code. One tool starts the server, validates responses, records and replays external calls, and substitutes a mock server.
npm install -g @mcpeak/cliA failed case says what differs, why, and how to fix it
The failure message is the product. A test tool's real interface is the sentence it prints when something fails. Instead of stopping at expected true, got false, MCPeak says what differs, why, and how to fix it.
I want to know my server actually works
It reads tools/list, proposes passing and violation cases, and saves only what a person approves.
mcpeak generate --out weather.suite.json -- node ./server.mjsIt prints what differs, why, and how to fix it. Any failure exits with code 1, so it drops straight into CI.
mcpeak test weather.suite.json -- node ./server.mjsOne definition JSON starts a mock that passes the same suite.
mcpeak test weather.suite.json -- mcpeak-mock weather.mock.jsonCall the real API once. Later runs replay the recording and get the same responses without the network.
mcpeak test weather.suite.json --record-session weather.session.db -- node ./server.mjsIt runs the suite against the server twice and compares the results, finding cases that wobble on timestamps or ordering.
mcpeak test weather.suite.json --determinism -- node ./server.mjs--repair-bundle saves the failure evidence to a file, which you hand to an AI for likely causes in your server code.
mcpeak repair repair.json --provider claude --model sonnetDashboard
Pick and run suites in a local web UI, and approve generate proposals or review repair results with a click. The verdict calls the same functions as the CLI, so both give the same result.
npm install -g @mcpeak/dashboard && mcpeak-dashboardGet started
One global install gives you the mcpeak command. For a one-off run, npx works too.
npm install -g @mcpeak/cliIt reads the server's schemas and proposes cases. Only what a person approves is saved.
mcpeak generate --out weather.suite.json -- node ./server.mjsIt starts the server and judges it. Any failure exits with code 1, so it drops straight into CI.
mcpeak test weather.suite.json -- node ./server.mjsDocs