[Client][Server] Ship extension classes for the two authorization extensions

Offen
#721 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@chr-hertel arbeitet bereits daran.

Seit 10.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

auth Client Server

Currently neither side announces the authorization extensions from #669. The extension guides ask for that, the normative specs in modelcontextprotocol/ext-auth don't:

  • client: io.modelcontextprotocol/oauth-client-credentials and io.modelcontextprotocol/enterprise-managed-authorization in clientCapabilities.extensions ("must" in the guides)
  • server: io.modelcontextprotocol/oauth-client-credentials in the server/discover capabilities (optional, "recommended for discoverability")

Nothing breaks without it - conformance doesn't check it, and the TypeScript and Python SDKs don't announce them either. Users can already do it with their own AbstractExtension, but since the prefix is reserved for official extensions, it's on us to ship the classes, like McpApps:

$client = Client::builder()
    ->enableExtension(new OAuthClientCredentials())
    ->build();

$server = Server::builder()
    ->enableExtension(new OAuthClientCredentials())
    ->build();

OAuth::forServiceAccount() can't enable it on its own, since core must not know concrete extensions - so it stays opt-in and gets documented next to forServiceAccount() and setCrossAppAccess(). Low priority, rather a follow up once the other SDKs move.

Vorherrschende Sprache
PHP
Sterne
1.7k
Forks
206
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
102

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/php-sdk

Alle Issues in modelcontextprotocol/php-sdk

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.