MCP Catalogs
Home

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.

developer-toolsai-llmtesting
1
Forks
37
Open issues
4 mo ago
Last commit
2d ago
Indexed

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:

you:Testing MCP servers before deployment to catch potential issues
you:Validating protocol compliance of MCP implementations
you:Integrating automated testing into CI/CD pipelines for MCP servers
you:Can I use MCP-Jest to test existing MCP servers?
you:Does MCP-Jest support testing of both local and remote MCP servers?

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 README
  • mcpTest

    Run automated tests for MCP servers

  • discover

    Auto-discover and generate tests for MCP server capabilities

  • validate

    Check MCP protocol compliance with detailed scoring

  • watch

    Auto-rerun tests when MCP server files change

Comparable tools

mcp-protocol-validatormanual-testinggeneric-test-frameworks

Installation

npm install mcp-jest        # As dependency
npm install -g mcp-jest     # Or globally for CLI

Using 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.