mcp-jest
by ReallyArtificial·★ 16·Score 41
A testing framework for MCP servers, providing Jest-like syntax for automated testing, protocol validation, and CI/CD integration.
Overview
MCP-Jest is an open-source testing framework specifically designed for Model Context Protocol servers. It allows developers to write automated tests for MCP tools, resources, and prompts with Jest-like syntax. The framework supports multiple transport protocols including stdio, HTTP streaming, and SSE, making it versatile for testing both local and remote MCP servers. With features like auto-discovery, snapshot testing, and HTML reports, MCP-Jest provides comprehensive testing capabilities for ensuring MCP server reliability and protocol compliance.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose MCP-Jest if you're developing MCP servers and need automated testing for your tools, resources, and prompts, especially if you're already using Jest or want CI/CD integration.
When NOT to choose this
Don't choose MCP-Jest if you only need simple validation or if your MCP server is already covered by comprehensive testing infrastructure.
Tools this server exposes
4 tools extracted from the READMEmcpTestRun automated tests for MCP servers
discoverAuto-discover and generate tests for MCP server capabilities
validateCheck MCP protocol compliance with detailed scoring
watchAuto-rerun tests when MCP server files change
Comparable tools
Installation
npm install mcp-jest # As dependency
npm install -g mcp-jest # Or globally for CLIUsing in a JavaScript/TypeScript project:
import { mcpTest } from 'mcp-jest';
const results = await mcpTest(
{ command: 'node', args: ['./server.js'] },
{ tools: ['search', 'email'] }
);To use with Claude Desktop, add the following to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-jest": {
"command": "npx",
"args": ["mcp-jest", "node", "/path/to/your/server.js"]
}
}
}FAQ
- Can I use MCP-Jest to test existing MCP servers?
- Yes, MCP-Jest can test any MCP server that implements the Model Context Protocol. You can test servers developed with the official MCP SDK or other compatible implementations.
- Does MCP-Jest support testing of both local and remote MCP servers?
- Yes, it supports multiple transport protocols including stdio for local servers and HTTP streaming/SSE for remote servers.
Compare mcp-jest with
Last updated · Auto-generated from public README + GitHub signals.