Grant type is hardcoded `authorization_code` for DCR

オープン
#222 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
swift

調査の方向性

Start with Sources/MCP/Base/Authorization/OAuthClientRegistrar.swift around line 82 and trace how client metadata is assembled for dynamic client registration. Define how callers can provide additional grant types such as refresh_token, then verify that the registration request declares the configured values and supports the reported offline_access flow.

索引モデルが issue の本文から書いたものです。

説明

bug

Describe the bug
In OAuthClientRegistrar the declared grant types for client registration are hard coded to authorization_code with no option to add additional grant types such as refresh_token. For authorization servers that require refresh_token grant type be declared during client registration, this effectively prevents clients from using refresh tokens with some authorization servers.

Both Python and Typescript MCP SDKs provide OAuthClientProvider/OAuthClientMetadata constructs to allow specifying grant types as well as other client metadata.

To Reproduce
Steps to reproduce the behavior:

  1. DCR with an MCP server/authz server that requires refresh_token declaration
  2. Request offline_access scope during authorization
  3. (may or may not get a refresh token depending on the authz server)
  4. Try to exchange the refresh token for a new access token
  5. Request will be rejected

Expected behavior
Provide a mechanism to specify grant types to be declared at client registration time.

Logs
n/a

Additional context
Mentioned above, but to reiterate, other official MCP SDKs (e.g. Typescript, Python, etc.) do support specifying grant types through configuration.

主要言語
Swift
スター
1.6k
フォーク
270
平均マージ
2日 7時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/swift-sdk のほかの issue

modelcontextprotocol/swift-sdk の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。