
Test suite for validating MCP server implementations against the open MCP protocol specification. Helps developers ensure protocol compliance and interoperability.
概览
A testing suite and reference implementation for the Model Context Protocol (MCP). The MCP Protocol Validator provides a comprehensive environment for testing and validating MCP server implementations. With reference implementations for both STDIO and HTTP transports, along with an extensive testing framework, it ensures developers can verify their servers comply with the MCP specification. The modular architecture supports various server configurations, transport methods, and provides detailed compliance reporting, making it an essential tool for MCP server development and validation. 1. : A reference implementation using STDIO transport 2. : A reference implementation using HTTP transport 3. : A comprehensive testing framework for verifying MCP server implementations The current implementation is fully compliant with the latest MCP protocol specification (2025-03-26). ✅ All tests pass for the reference implementations!
README
以下为原文 README 节选,完整内容请查看原文。
MCP Protocol Validator
A testing suite and reference implementation for the Model Context Protocol (MCP).
Summary
The MCP Protocol Validator provides a comprehensive environment for testing and validating MCP server implementations. With reference implementations for both STDIO and HTTP transports, along with an extensive testing framework, it ensures developers can verify their servers comply with the MCP specification. The modular architecture supports various server configurations, transport methods, and provides detailed compliance reporting, making it an essential tool for MCP server development and validation.
Overview
This repository contains:
- Minimal MCP Server: A reference implementation using STDIO transport
- Minimal HTTP MCP Server: A reference implementation using HTTP transport
- MCP Testing Framework: A comprehensive testing framework for verifying MCP server implementations
The current implementation is fully compliant with the latest MCP protocol specification (2025-03-26).
✅ All tests pass for the reference implementations!
Reference Implementations
Minimal MCP Server (STDIO)
A simple reference implementation that uses STDIO for transport and supports:
- Basic protocol operations (initialization, shutdown)
- Synchronous tool calls
- Asynchronous tool calls (for 2025-03-26)
- Utility tools for file system operations
# Run the server
python ./minimal_mcp_server/minimal_mcp_server.py
Supported Tools
echo: Echo input textadd: Add two numberssleep: Sleep for specified seconds (useful for testing async operations)list_directory: List files in a directoryread_file: Read a filewrite_file: Write a file
Minimal HTTP MCP Server
A reference implementation using HTTP transport with:
- JSON-RPC 2.0 over HTTP implementation
- Support for both protocol versions (2024-11-05 and 2025-03-26)
- Synchronous and asynchronous tool calls
- Resources capability (for 2025-03-26)
- Batch request support
- CORS support for browser clients
# Run the server with default settings (localhost:8000)
python ./minimal_http_server/minimal_http_server.py
# Run with custom host and port
python ./minimal_http_server/minimal_http_server.py --host 0.0.0.0 --port 8080
# Run a basic HTTP test suite
python ./minimal_http_server/test_http_server.py
# Run compliance tests against the HTTP server
python -m mcp_testing.scripts.http_test --server-url http://localhost:8000 --protocol-version 2025-03-26
See the HTTP Server README for more details.
MCP Testing Framework
A flexible framework for verifying MCP server compliance with protocol specifications.
Key Features
- Support for both 2024-11-05 and 2025-03-26 protocol versions
- Support for both STDIO and HTTP transport protocols
- Dynamic tool testing that adapts to server capabilities
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →