Scopes not forwarded to DCR endpoint and duplication of RedirectUris
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- csharp
- Área
- authentication
Línea de trabajo
Comienza con HttpClientTransport y el manejo de OAuth y DynamicClientRegistrationOptions, y luego sigue cómo ResourceMetadata.ScopesSupported llega a la solicitud DCR. Verifica que los scopes solicitados se reenvíen y determina cómo deberían conciliarse los valores de RedirectUri de OAuth y DCR; el trabajo está completo cuando ambos comportamientos están cubiertos sin requerir una configuración duplicada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have implemented an MCP server and added DCR support to my Duende Identity Server, and it all kind of works with the MCP Server and MCP Client in the SDK. However, one issue seems to be with scopes. The server declares it's supported scopes:
.AddMcp(options =>
{
options.ResourceMetadata = new()
{
Resource = new Uri(serverUrl),
AuthorizationServers = { new Uri(chronosIdp) },
ScopesSupported = ["mcp:tools"]
};
});
However, in the request that my DCR endpoint receives, Scopes is null. Shouldn't the HttpClientTransport take the scopes from the MCP Server and add these to the DCR request?
Right now I can add them manually here, but a normal MCP tool user wouldn't know what scopes to request - that's why the MCP server declares them:
var transport = new HttpClientTransport(new()
{
Endpoint = new Uri(serverUrl),
Name = "Secure Chronos Client",
OAuth = new()
{
Scopes = [ "mcp:tools", "chronosapi"], // shouldn't need to do this!
RedirectUri = new Uri("http://localhost:1179/callback"),
AuthorizationRedirectDelegate = HandleAuthorizationUrlAsync,
DynamicClientRegistration = new DynamicClientRegistrationOptions
{
ClientName = "Chronos MCP Client",
ClientUri = new Uri("http://localhost:1179/callback")
},
}
}, httpClient, consoleLoggerFactory);
var client = await McpClient.CreateAsync(transport, loggerFactory: consoleLoggerFactory);
Also it seems a bit redundant to specify the same RedirectUri in the OAuth object AND the DCR object - they are necessarily the same so maybe if the DCR property is present the OAuth object can use the info there - or vice versa. Just to make it easier to set up correctly.
- Lenguaje dominante
- C#
- Estrellas
- 4.5k
- Forks
- 814
- Merge medio
- 9 d 19 h
- PR fusionados (30 d)
- 4
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/csharp-sdk
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/csharp-sdk#1867 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comentario ·
-
enhancement needs confirmation P3 ready for work
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/csharp-sdk#515 · 6 comentarios · 3 reacciones ·
Todos los issues de modelcontextprotocol/csharp-sdk
Issues similares
-
bug frontend good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
CS0162 "Unreachable code detected" warning from a MSBuildTemp .tmp file in every game project Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/arrow-adbc#4809 ·