Guide • Adapters
Partner Adapters
A partner adapter translates generic scenario operations into the concrete API of the system under test.
Built-in Adapters
mcp-auth-test-server
The default adapter connects to mcp-auth-test-server. It knows how to call OAuth discovery, DCR registration, authorization, token exchange, MCP JSON-RPC, debug, and test endpoints.
mcp-conformance run --partner mcp-auth-test-server --base-url http://127.0.0.1:8765 Generic MCP Server
A minimal adapter for any MCP server exposing JSON-RPC over HTTP.
mcp-conformance run --partner generic-mcp --base-url http://127.0.0.1:8080 Supports Bearer token auth. Provide the token inline:
steps:
- id: call
type: client_request
action: mcp.request
auth:
bearer_token: "my-static-token"
request:
method: tools/list Or resolve from an environment variable:
steps:
- id: call
type: client_request
action: mcp.request
auth:
bearer_token:
from_env: MCP_BEARER_TOKEN
request:
method: tools/list This lets you keep tokens out of scenario YAML and pass them at runtime:
MCP_BEARER_TOKEN=$(cat /secrets/mcp-token) mcp-conformance run --partner generic-mcp Writing Custom Adapters
Implement the TestPartner ABC:
from mcp_conformance.partners.base import (
AuthStep, FaultConfig, MCPResponse, TestPartner
)
class MyCustomAdapter(TestPartner):
async def health(self) -> bool: ...
async def send_mcp_request(self, method, params, *, auth, headers, endpoint) -> MCPResponse: ...
async def send_auth_request(self, step: AuthStep) -> MCPResponse: ...
async def reset_state(self) -> None: ...
async def get_debug_state(self, endpoint: str) -> dict: ...
async def configure_injection(self, fault: FaultConfig) -> None: ...