API Reference
CLI
mcph run [OPTIONS] FILE
| Flag | Description |
|---|
--transport stdio|http | Transport type (default: stdio) |
--command TEXT | Server command for stdio |
--url TEXT | Server URL for HTTP |
--reporter console|junit|json | Report format (repeatable) |
--timeout SECONDS | Request timeout (default: 30) |
--continue-on-failure | Run all steps even if some fail |
--verbose | Show transport trace |
--env KEY=VALUE | Pass variable (repeatable) |
--version | Show version |
--help | Show help |
DSL Syntax
Connection
CONNECT stdio "python -m my_server"
CONNECT http "https://api.internal/mcp"
Initialization
INITIALIZE protocolVersion="2025-03-26"
CLIENT name="Mcph" version="1.0.0"
CAPABILITIES roots=true sampling=true
Discovery
LIST tools
LIST prompts
LIST resources
Tool Execution
CALL "tool_name" { "arg": "value", "num": 42 }
Resource Access
READ "file:///path/to/resource"
SUBSCRIBE "file:///path/to/resource"
Prompts
GET prompt "prompt_name" { "language": "rust" }
Notifications
LISTEN "notifications/tools/list_changed" TIMEOUT 5000
Assertions
ASSERT STATUS == 200
ASSERT STATUS == -32602
ASSERT serverInfo.name == "Expected"
ASSERT serverInfo.version MATCHES /^[0-9]+\.[0-9]+\.[0-9]+$/
ASSERT tools COUNT >= 1
ASSERT tools[*] EXISTS name == "run_sql"
ASSERT result.content.text CONTAINS "expected"
ASSERT isError == false
# Fuzzy types
ASSERT result.x == #string
ASSERT result.y == ##number
# Structural equality
ASSERT schema == {
"type": "object",
"properties": {
"name": { "type": "string" }
}
}
Predicates
| Predicate | Description |
|---|
== | Equality |
!= | Inequality |
>, >=, <, <= | Numeric comparison |
CONTAINS | Substring check |
MATCHES /pattern/ | Regex match |
EXISTS | JSONPath element existence |
COUNT | JSONPath match count |
Fuzzy Types
| Type | Description |
|---|
#string | Must be a string |
#number | Must be int or float |
#boolean | Must be bool |
#array | Must be list |
#object | Must be dict |
##string | Optional: if present, must be string |
Variable Capture
CAPTURE var_name: result.field
CAPTURE var_name: result.text regex /pattern/ 1
CALL "tool" { "ref": "{{var_name}}" }
Capability Gating
REQUIRE_CAPABILITY prompts
LIST prompts
REQUIRE_CAPABILITY resources
LIST resources
Variable Injection
SET _meta.protocolVersion = "DRAFT-2026-v1"
HEADER "Authorization" = "Bearer {{TOKEN}}"
Teardown
SHUTDOWN