Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Auth] OAuth proxy / DCR facade for non-DCR providers (e.g. Entra ID + Claude Code)

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp

調査の方向性

まず、ModelContextProtocol.AspNetCore の認証サーフェスと、リンクされている FastMCP OAuthProxy/OIDCProxy の設計を確認します。DCR ファサード、callback の転送、token factory、State と PKCE の保護、OIDC discovery、および IDataProtector/IDistributedCache のストレージ境界を定義します。完了とは、Claude Code が upstream token を公開せずにプロキシ経由で認証できることです。

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

説明

area-auth enhancement P2 ready for work

Is your feature request related to a problem? Please describe.

Securing an MCP server with Entra ID is not workable when the connecting client is Claude Code. Entra ID doesn't support Dynamic Client Registration, and Claude Code has no app registration and no client_metadata_document_uri to offer, so there's no client_id to present and no supported registration path. Claude Code simply can't authenticate against an Entra-backed MCP server today.

This is distinct from #648 / PR #1402, which fix the resource= parameter bug for clients that already have a pre-registered client_id. That fix is necessary but not sufficient: our problem is upstream of it.

Describe the solution you'd like

A server-side OAuth proxy / DCR facade in ModelContextProtocol.AspNetCore, similar to what FastMCP (Python) ships as OAuthProxy / OIDCProxy. At a high level it would:

  1. Present a DCR-compliant surface to MCP clients: handle POST /register and return pre-registered credentials rather than attempting real DCR against the upstream provider
  2. Handle callback forwarding: store the MCP client's dynamic redirect URI, use the server's fixed redirect URI with the upstream provider, and forward back to the client after token exchange
  3. Issue its own short-lived JWTs to MCP clients rather than forwarding the upstream token (token factory pattern), preventing token passthrough
  4. Encrypt and store upstream tokens server-side using IDataProtector and IDistributedCache
  5. Support OIDC discovery: Entra exposes /.well-known/openid-configuration, so endpoints should be auto-discoverable rather than manually configured

Describe alternatives you've considered

  • External sidecar proxy (e.g. mcp-auth-proxy): works, but adds ops complexity with no idiomatic .NET integration
  • Use a DCR-capable AS (Auth0, WorkOS): viable, but forces a third-party IdP dependency on teams already standardised on Entra
  • Pre-registration + surfacing client_id in PRM: only works for clients that support pre-registration or CIMD; Claude Code supports neither

Additional context

FastMCP's implementation is a useful reference for the security design: it includes confused deputy mitigation via state cookie binding, PKCE validation at both the client-to-proxy and proxy-to-upstream legs, and a token factory that ensures upstream tokens are never exposed to MCP clients.

主要言語
C#
スター
4.5k
フォーク
814
平均マージ
9日 19時間
マージ済み PR(30日)
4

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

modelcontextprotocol/csharp-sdk のほかの issue

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

似ている issue

C# の issue をもっと見る

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

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