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 for testing and validating server implementations of the Model Context Protocol (MCP). It includes reference implementations and a testing framework to ensure servers adhere to the MCP specification.

How to use MCP Protocol Validator?

The validator can be used to test both STDIO and HTTP-based MCP servers. For STDIO servers, use the compliance_report.py script with the --server-command option to specify the server to test. For HTTP servers, run the http_compliance_test.py script. Detailed instructions and examples are provided in the README.

Key features of MCP Protocol Validator

  • Comprehensive testing suite for STDIO and HTTP servers

  • Reference implementations for MCP

  • Compliance reporting

  • Support for protocol version negotiation

  • Test configuration options (timeouts, required tools, skipped tests)

  • Dynamic tool discovery

Use cases of MCP Protocol Validator

  • Validating MCP server implementations

  • Ensuring compliance with the MCP specification

  • Testing different STDIO server types (direct command, pip-installed)

  • Testing HTTP server functionality

  • Generating detailed test reports

FAQ from MCP Protocol Validator

What is the Model Context Protocol (MCP)?

Refer to https://github.com/modelcontextprotocol for more information.

How do I run STDIO compliance tests?

Use the command python -m mcp_testing.scripts.compliance_report --server-command "your_server_command" --protocol-version your_protocol_version

How do I run HTTP compliance tests?

First, start the HTTP server. Then, use the command python -m mcp_testing.scripts.http_compliance_test --output-dir reports

What types of tests are included?

The suite includes tests for protocol initialization, tools functionality, error handling, protocol version negotiation, batch request processing, and session management.

Where can I find the test reports?

STDIO test reports are printed to the console. HTTP test reports are generated in the reports directory (or the directory specified with the --output-dir option).