Skip to main content
The MCP Tasks Conformance SDK lets you validate the MCP Tasks wire your server exposes: which wire the connection resolves to, whether declaration hygiene holds, and whether the server honours the observable parts of the contract. Use it when you want the same checks as the CLI’s tasks conformance command, but inside your own test runner or CI pipeline.
Tasks conformance provokes and then polls a real task, so it requires a persistent connection. It is not available in hosted mode.

Import

Basic usage

Pass a tool name on the extension wire. Auto-selection reads execution.taskSupport, which the 2026-07-28 ToolSchema strips, so without toolName the task-dependent checks cannot run and run() returns outcome: "incomplete" with passed: false:
For a stdio server:

MCPTasksConformanceConfig

MCPTasksConformanceConfig extends the standard MCPServerConfig, so it accepts the same HTTP and stdio connection settings as MCPClientManager. Additional properties: Example with a focused check set:

Check ids

Result shape

run() returns an MCPTasksConformanceResult. The discovery object includes: Each MCPTasksCheckResult includes:
  • id
  • category
  • title
  • description
  • status"passed", "failed", or "skipped"
  • skipReason — set whenever status is "skipped": "not-applicable" (the check cannot apply to this server, so it does not hold the run back) or "could-not-run" (the check applies but was never exercised, which makes the run incomplete)
  • durationMs
  • optional details
  • optional warnings
  • optional error

CI reporting

Use the shared reporting helpers to produce JUnit XML or JSON artifacts:
toConformanceReport accepts protocol, OAuth, apps, and tasks results and normalizes them into a single report shape, so the SDK and CLI JUnit output are byte-identical for the same result.

Notes

  • Declaration hygiene is asserted against captured outbound JSON-RPC bytes, not re-derived from intent.
  • The tasks-undeclared-creation-refused and tasks-undeclared-capability-rejected checks apply to the extension wire only and are skipped on the legacy wire.
  • tasks-undeclared-capability-rejected needs a live task to probe with, and its probes run after every check that reads that task so a wrongly-accepted tasks/update or tasks/cancel cannot corrupt the rest of the run. A server with no subscriptions/listen (-32601) gets that sub-probe reported as a warning rather than a failure.
  • The tasks-mcp-name-routing check applies to HTTP transports only and is skipped for stdio servers.
  • Checks that require a created task report skipReason: "could-not-run" when no probe tool resolves, when the named tool is not listed, when the probed call produced no task, or when the task never became readable. Any of those makes the run incomplete; a skip can never add up to a pass.
  • CLI exit codes: 0 for passed, 1 for failed, 3 for incomplete (2 stays reserved for usage errors).