Test MCP Servers
with confidence.
A Jest-inspired testing framework designed specifically for Model Context Protocol servers. Write tests that are predictable,fast, andmaintainable.
$ npm install -g mcp-jest
$ cat weather-test.json
{
"name": "Weather Server Tests",
"server": { "command": "node weather-server.js" },
"tests": [{
"type": "tool",
"tool": "get-weather",
"arguments": { "city": "Paris" },
"expect": { "temperature": { "type": "number" } }
}]
}
$ mcp-jest weather-test.json
✓ Weather Server Tests
✓ get-weather (142ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Time: 0.867s
Why MCP Jest?
Built by developers who understand the pain of testing distributed systems.
Familiar Syntax
If you know Jest, you already know MCP Jest. Zero learning curve.
Save Time
Automated testing catches bugs before production. Ship faster.
Type-Safe
Full TypeScript support. Catch errors at compile time.
Core Features
Everything you need to test MCP servers effectively.
JSON Configuration
Simple JSON-based test definitions. No complex setup required.
Parallel Execution
Run multiple test suites simultaneously for faster feedback.
Snapshot Testing
Capture and compare server responses across test runs.
CI/CD Integration
Works with GitHub Actions, GitLab CI, and other platforms.
CLI & API
Use via command line or integrate programmatically.
TypeScript Support
Full type definitions for better development experience.
How It Works
Define your tests in JSON, run with a single command.
Define your test
{
"name": "Weather Server Tests",
"server": {
"command": "node weather-server.js"
},
"tests": [{
"name": "Should fetch weather",
"type": "tool",
"tool": "get-weather",
"arguments": { "city": "Paris" },
"expect": {
"temperature": { "type": "number" },
"condition": "sunny"
}
}]
}
Run the test
$ mcp-jest weather-test.json
Running Weather Server Tests...
✓ Should fetch weather (142ms)
Temperature: 22
Condition: sunny
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Time: 0.867s
Ran all test suites.
Perfect For
MCP Jest adapts to your testing needs.
Development Testing
- Test during development for immediate feedback
- Validate changes before committing
- Debug with detailed error messages
CI/CD Pipelines
- Automated testing on every push
- Prevent broken deployments
- Integration with all major CI platforms
Ready to improve your testing?
Join developers who ship reliable MCP servers with confidence.