MCP-Hurl (Mcph)
MCP-Hurl is a declarative testing DSL for MCP servers. Hurl-inspired .mcph syntax with a custom Python async runner. Transport-agnostic — stdio and
Streamable HTTP.
CONNECT stdio "python -m my_mcp_server"
INITIALIZE protocolVersion="2025-03-26"
CLIENT name="Mcph" version="1.0.0"
CAPABILITIES roots=true
ASSERT STATUS == 200
ASSERT serverInfo.name == "MyServer"
LIST tools
ASSERT STATUS == 200
ASSERT tools COUNT >= 1
CALL "run_sql" { "query": "SELECT 1;" }
ASSERT STATUS == 200
ASSERT isError == false
SHUTDOWN Quick Start
git clone https://github.com/rmax-ai/mcph
cd mcph
uv run mcph run examples/conformance.mcph Why Mcph?
The Model Context Protocol is the standard interface between LLMs and tools. But as organizations deploy MCP servers, verifying protocol compliance remains a gap. Existing API testing tools are optimized for stateless HTTP — they can't handle stdio subprocesses, JSON-RPC multiplexing, or the MCP capability handshake.
Mcph solves this with:
- Hurl-inspired syntax — readable, self-documenting, executable
- First-class JSON-RPC — request IDs, error codes, notifications
- Transport-agnostic — stdio subprocesses and Streamable HTTP
- Structural assertions — JSONPath, regex, fuzzy types, schema validation
- Capability-aware — skip tests for features the server doesn't support
- CI-native — JUnit XML, JSON reports, exit codes
Features
| Feature | Description |
|---|---|
CONNECT | stdio subprocess or HTTP endpoint |
INITIALIZE | Stateful MCP handshake |
LIST | Discover tools, prompts, resources |
CALL | Invoke tools with JSON arguments |
READ | Read resources by URI |
ASSERT | JSONPath, regex, fuzzy type, structural equality |
CAPTURE | Extract values into variables |
{{var}} | Template interpolation |
REQUIRE_CAPABILITY | Skip tests for unsupported features |