SseClientTransportOptions.Endpoint needs a way for a consumer to control if the corresponding Resource ends with a trailing slash or not
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- csharp
- Área
- authentication
Línea de trabajo
Comienza localizando SseClientTransportOptions.Endpoint y la construcción de la URL de autorización descrita en el issue. Inspecciona las pruebas existentes sobre el transporte SSE y los parámetros de recursos de OAuth. La tarea estará terminada cuando los consumidores puedan controlar la forma de la barra final del endpoint y el recurso de autorización generado coincida con ella de forma coherente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
When creating an MCP client that connects to an OAuth-secured MCP server, the "Endpoint" may have different conventions regarding whether or not it ends with a trailing slash. SseClientTransportOptions.Endpoint being a URI makes this increasingly problematic, as the default behavior appends a trailing slash, even if the input string doesn't contain it:
var urlRawString = "https://example.com";
var uri = new Uri(urlRawString);
Console.WriteLine(urlRawString); // https://example.com
Console.WriteLine(uri.ToString()); // https://example.com/
Per spec, this is even in violation of their recommendation of whether or not to include the trailing slash:
Note: While both https://mcp.example.com/ (with trailing slash) and https://mcp.example.com (without trailing slash) are technically valid absolute URIs according to RFC 3986, implementations SHOULD consistently use the form without the trailing slash for better interoperability unless the trailing slash is semantically significant for the specific resource.
Describe the solution you'd like
I'd like for SseClientTransportOptions.Endpoint to be a string, and the internals can validate that it is a URI
Describe alternatives you've considered
If SseClientTransportOptions.Endpoint being Uri is strictly necessary, than a callback to format the resource prior to constructing the authorization url may be helpful. Or some option to eab This is probably more problematic, though, as it would allow implementers to violate the spec more easily.
Additional context
To work around the issue, I have had to do the following when writing an MCP client:
- Set
ClientOAuthOptions.AuthorizationRedirectDelegate - Override the resource query parameter of the authorization url with the trailing slash removed
- Lenguaje dominante
- C#
- Estrellas
- 4.6k
- Forks
- 817
- Merge medio
- 8 d 7 h
- PR fusionados (30 d)
- 3
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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 74/100
modelcontextprotocol/csharp-sdk#1899 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/csharp-sdk#1867 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
modelcontextprotocol/csharp-sdk#1836 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement needs confirmation
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/csharp-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
lay295/TwitchDownloader#1675 ·
-
copilot documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
space-wizards/RobustToolbox#7119 ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 4 días
-
.NET Bug Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-dotnet#5666 · 2 comentarios ·
Los mantenedores suelen responder en 2 días