MCP Protocol Validator logo

MCP Protocol Validator

by Janix-ai

The MCP Protocol Validator is a testing suite and reference implementation for the Model Context Protocol (MCP). It provides a comprehensive environment for testing and validating MCP server implementations, ensuring compliance with the MCP specification.

View on GitHub

Last updated: N/A

What is MCP Protocol Validator?

The MCP Protocol Validator is a tool designed to test and validate implementations of MCP servers. It includes reference implementations using STDIO and HTTP transports, along with a testing framework to verify compliance with the MCP specification.

How to use MCP Protocol Validator?

The validator provides scripts for basic interaction, compliance reporting, and HTTP testing. Users can run these scripts against their MCP server implementations, specifying the server command or URL, protocol version, and other options. The framework supports both STDIO and HTTP transports and offers customization options for targeted functionality testing.

Key features of MCP Protocol Validator

  • Support for MCP protocol versions 2024-11-05 and 2025-03-26

  • Support for STDIO and HTTP transport protocols

  • Dynamic tool testing that adapts to server capabilities

  • Detailed compliance reporting

  • Configurable test modes for targeted functionality testing

  • Comprehensive specification requirement testing (MUST, SHOULD, MAY)

  • Server configuration system for diverse implementations

Use cases of MCP Protocol Validator

  • Verifying MCP server compliance with protocol specifications

  • Developing and validating new MCP server implementations

  • Testing different transport methods (STDIO, HTTP)

  • Generating compliance reports for MCP servers

FAQ from MCP Protocol Validator

How do I run a basic interaction test?

Use the python -m mcp_testing.scripts.basic_interaction command, providing the server command and protocol version.

How do I run a full compliance test?

Use the python -m mcp_testing.scripts.compliance_report command, providing the server command, protocol version, and optionally an output directory.

How do I test an HTTP server?

Use the python -m mcp_testing.scripts.http_test command, providing the server URL and protocol version.

How do I test a pip-installed MCP server?

Install the server in the same environment as the testing framework and run tests using the module-style command (e.g., python -m mcp_server_fetch).

What do I do if I get a 'Failed to start transport' error?

Ensure that the server is installed in the same environment as the testing framework.