modelcontextprotocol / modelcontextprotocol/php-sdk
[Client] Extend conformance client.php with scenario context env vars
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- PHP
- Sterne
- 1.6k
- Forks
- 173
- Ø Merge
- 2 T. 49 Min.
- Gemergte PRs (30 T.)
- 23
Beschreibung
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_CONTEXTas JSON). - For each scenario, wire context into
Client\Builder:auth/pre-registration→setOAuthClient(client_id, client_secret).auth/client-credentials-basic→setOAuthClient(...)+ forceclient_credentialsgrant.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.phpupdated.- Documented context keys in the test file's docblock.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit tests/Conformance/client.php und untersuche den Conformance-Runner, um die genaue Kontext-Umgebungsvariable und die JSON-Schlüssel zu überprüfen. Lies die verfügbaren Client\Builder-Methoden und verfolge dann die aufgeführten Auth-Szenarien, um ihren Kontext zu verknüpfen; fertig ist die Aufgabe, wenn die Datei die Schlüssel dokumentiert und die Auth-Szenarien den für die Conformance-Validierung erforderlichen Kontext erhalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- php
- Bereich
- authentication, testing-qa
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 72/100