|
7 | 7 | - MCP_CONFORMANCE_SCENARIO env var -> scenario name |
8 | 8 | - MCP_CONFORMANCE_CONTEXT env var -> optional JSON (for client-credentials scenarios) |
9 | 9 | - MCP_CONFORMANCE_PROTOCOL_VERSION env var -> spec version the harness mock |
10 | | - server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; defaults |
11 | | - to the harness's LATEST_SPEC_VERSION when --spec-version is omitted. |
| 10 | + server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; when |
| 11 | + --spec-version is omitted the harness picks per-scenario (LATEST_SPEC_VERSION |
| 12 | + for active scenarios, DRAFT_PROTOCOL_VERSION for draft-only ones). |
12 | 13 | - Server URL as last CLI argument (sys.argv[1]) |
13 | 14 | - Must exit 0 within 30 seconds |
14 | 15 |
|
|
54 | 55 | logger = logging.getLogger(__name__) |
55 | 56 |
|
56 | 57 | #: Spec version the harness is running this scenario at (e.g. "2025-11-25", |
57 | | -#: "2026-07-28"). The harness always sets this (it falls back to its own |
58 | | -#: LATEST_SPEC_VERSION when --spec-version is omitted), so None means we were |
59 | | -#: invoked outside the harness. Handlers that need to take the stateless 2026 |
60 | | -#: path will branch on this once the SDK has one; today it is logged only. |
| 58 | +#: "2026-07-28"). The harness always sets this (when --spec-version is omitted |
| 59 | +#: it picks per-scenario: LATEST_SPEC_VERSION for active scenarios, |
| 60 | +#: DRAFT_PROTOCOL_VERSION for draft-only ones), so None means we were invoked |
| 61 | +#: outside the harness. Handlers that need to take the stateless 2026 path will |
| 62 | +#: branch on this once the SDK has one; today it is logged only. |
61 | 63 | PROTOCOL_VERSION: str | None = os.environ.get("MCP_CONFORMANCE_PROTOCOL_VERSION") |
62 | 64 |
|
63 | 65 | # Type for async scenario handler functions |
|
0 commit comments