title: Authoring Scenarios

description: How to write declarative YAML conformance scenarios.

Guide • Scenarios

Authoring Scenarios

Scenarios are declarative YAML files. Each scenario has:

  • Metadata — id, title, version, spec references, required capabilities
  • Partner config — which test partner to use
  • Steps — ordered sequence of actions with assertions

Structure

id: auth.auth_code_pkce_happy_path
title: "Auth code + PKCE happy path"
version: "0.1"
spec_refs:
  - rfc6749
  - rfc7636
capabilities:
  required:
    - oauth.auth_code_pkce
partner:
  type: mcp_auth_test_server
steps:
  - id: discover
    type: client_request
    action: oauth.discover
    assert:
      - type: status
        expected: 200
  - id: register
    type: client_request
    action: oauth.dcr.register
    request:
      json:
        client_name: "mcp-conformance test"
        redirect_uris: ["http://127.0.0.1:9876/callback"]
        grant_types: ["authorization_code"]
        token_endpoint_auth_method: "none"
    assert:
      - type: status
        expected: [200, 201]
      - type: response_contains_keys
        expected: [client_id]

Step Types

TypePurpose
client_requestDrive a client-like HTTP action
inject_faultConfigure partner fault injection
waitSleep for async behavior
log_debugPull debug state into trace

Action Types

ActionEndpointMethod
oauth.discover/.well-known/oauth-authorization-serverGET
oauth.dcr.register/registerPOST
oauth.auth_code.authorize/authorizeGET (query params)
oauth.token.exchange/tokenPOST
partner.health/healthGET
mcp.request/mcp/oauthPOST
test.tokens.mint_expired/test/tokens/expiredPOST
test.reset/test/resetPOST
test.state/test/stateGET
test.faults.configure/test/faultsPOST

Assertion Types

See Reports for the full assertion catalog.

Built with SvelteKit + mdsvex. Deployable as a static site on GitHub Pages.