Skip to content

[Client] Extend conformance client.php with scenario context env vars #329

Closed

Description

@soyuka

Context

The conformance runner ships per-scenario context via --context JSON which it passes to the client command. The current tests/Conformance/client.php only reads MCP_CONFORMANCE_SCENARIO and the server URL — it ignores client_id, client_secret, private_key_pem, signing_algorithm, idp_id_token, idp_issuer, idp_token_endpoint, idp_client_id. Without these, auth scenarios cannot exercise the SDK even after auth flows are implemented.

Scope

  • Read context from the env var the runner sets (verify exact name; commonly MCP_CONFORMANCE_CONTEXT as JSON).
  • For each scenario, wire context into Client\Builder:
    • auth/pre-registration → setOAuthClient(client_id, client_secret).
    • auth/client-credentials-basic → setOAuthClient(...) + force client_credentials grant.
    • auth/client-credentials-jwt → setOAuthClientWithKey(client_id, private_key_pem, signing_algorithm).
    • auth/cross-app-access-complete-flow → supply IdP id_token + IdP discovery params.
  • Land this before or in parallel with auth flow implementation so each PR can be validated against conformance immediately.

Conformance scenarios unblocked

Prerequisite for all auth scenarios requiring context.

Dependencies

Independent — can land first (harness-only).

Acceptance

  • tests/Conformance/client.php updated.
  • Documented context keys in the test file's docblock.

Activity

  1. added
    ClientIssues & PRs related to the Client component
    P0Broken core functionality, security issues, critical missing feature
    authIssues and PRs related to Authentication / OAuth
    enhancementRequest for a new feature that's not currently supported
    on May 19, 2026
  2. removed
    P0Broken core functionality, security issues, critical missing feature
    on Aug 19, 2026
  3. chr-hertel commented on Nov 10, 2026

    @chr-hertel
    Member

    Solved with #669 - will be part of v0.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientIssues & PRs related to the Client componentauthIssues and PRs related to Authentication / OAuthenhancementRequest for a new feature that's not currently supported

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions