modelcontextprotocol / modelcontextprotocol/csharp-sdk
Add support for multiple resources per MCP Authentication scheme
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.5k
- Fork
- 814
- Merge medio
- 9g 19h
- PR unite (30g)
- 4
Descrizione
Currently, the McpAuthenticationHandler only supports responding with a single "resource" URI per scheme name as defined in https://www.rfc-editor.org/rfc/rfc9728.html. This means that you can only use OAuth for one of either the Streamable HTTP endpoint ("/") or the SSE endpoint ("/sse"), but not both. Technically, the new auth spec only applies to Streamable HTTP since that's the only HTTP transport defined in the 2025-06-18 spec and the 2025-03-26 spec for that matter, but the currently neither the server or the client code on the csharp-sdk treat SSE any differently than Streamable HTTP.
Furthermore, it be nice to be able to define multiple Streamable HTTP endpoints on different paths on a single HTTP server. However, this is something we should look at improving in general, since configuring the IMcpServerBuilder and/or McpServerOptions in the typical way doesn't allow multitenancy, and using ConfigureSessionOptions is a bit awkward.
https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo McpAuthenticationHandler e la specifica di autorizzazione collegata nell’issue per capire come una risorsa viene attualmente associata a ciascuno schema. Poi esamina IMcpServerBuilder, McpServerOptions e ConfigureSessionOptions per confrontare i percorsi di configurazione; il lavoro è completato quando sono supportate più risorse ed endpoint senza interrompere il comportamento esistente di Streamable HTTP o SSE.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- api, authentication
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100