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

未關閉
#721 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@chr-hertel 已經在處理了。

開始於 2026年11月10日。

評估

這個 Issue 還沒有評估資料。

描述

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.

主要語言
PHP
星號
1.7k
分支
206
平均合併
1 天 17 小時
30 天內合併 PR
102

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelcontextprotocol/php-sdk 的其他 Issue

查看 modelcontextprotocol/php-sdk 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。