Skip to main content
The Protocol Conformance SDK lets you run the same checks as the CLI protocol conformance commands, but inside your own Jest or Vitest suites. Use it when you want MCP protocol regressions to fail CI directly, or when you need JUnit XML and JSON artifacts from code rather than shell scripts.
Protocol conformance is currently HTTP-only. For local stdio-only servers, use MCP Apps Conformance, unit tests, or run your server through an HTTP bridge in CI.

Import

Single run

Suite

MCPConformanceSuiteConfig keeps the existing serverUrl + defaults + runs shape:

MCPConformanceConfig

Available categories and check ids

Categories:
  • core
  • protocol
  • tools
  • prompts
  • resources
  • security
  • transport
Check ids:
  • server-initialize
  • ping
  • logging-set-level
  • completion-complete
  • capabilities-consistent
  • tools-list
  • tools-input-schemas-valid
  • prompts-list
  • resources-list
  • protocol-invalid-method-error
  • localhost-host-rebinding-rejected
  • localhost-host-valid-accepted
  • server-sse-polling-session
  • server-accepts-multiple-post-streams
  • server-sse-streams-functional

Result types

MCPConformanceTest.run() returns an MCPConformanceResult: MCPConformanceSuite.run() returns an MCPConformanceSuiteResult:

CI reporting

All three conformance domains share the same report helpers:
  • toConformanceReport(result)
  • renderConformanceReportJUnitXml(report)
  • renderConformanceReportJson(report)
The CLI uses the same helpers internally, so protocol conformance --format junit-xml and protocol conformance-suite --format junit-xml emit the same XML that the SDK helpers produce for the same result.