[Server] Let a framework integration opt out of the HTTP edge middleware without a warning
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
Start with StreamableHttpTransport's empty-middleware warning and handshakeMiddleware(), then trace how Drupal's mcp_server integration supplies the empty list. Define an explicit opt-out that suppresses only the deliberate warning while preserving protocol validation, and keep accidental empty lists distinguishable.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
StreamableHttpTransport logs a warning whenever it gets an empty middleware list (added in #307):
Streamable HTTP transport started with an empty middleware list. Default security protections (CORS, DNS rebinding, protocol version validation) are disabled. …
In the Drupal integration (mcp_server), the empty list is deliberate. Drupal's HTTP layer already handles both edge checks:
- CORS comes from Drupal's
cors.config.CorsMiddlewarewould add a second set of CORS headers. - Host validation comes from Drupal's
trusted_host_patterns, which are regular expressions.DnsRebindingProtectionMiddlewaretakes an exact host list and answers 403 for any host not on it.
Since 0.8, the protocol version check runs through handshakeMiddleware() no matter what list is passed, so the "protocol version validation" part of the message no longer applies.
PHP builds a new transport for every request, so this warning becomes one log entry per MCP request on every Drupal site using the SDK.
Could the transport accept an explicit opt-out that doesn't warn? For example, a constructor flag, or a documented value that means "the host application handles CORS and Host validation". The warning still makes sense for an accidental [].
Downstream: https://git.drupalcode.org/project/mcp_server/-/work_items/3585939
- Lenguaje dominante
- PHP
- Estrellas
- 1.6k
- Forks
- 180
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 55
Preparar el entorno
- 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/php-sdk
-
[Server] Handler type uses bare Closure, hard to decorate RegistryInterface under strict PHPStanAbiertoServer
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
modelcontextprotocol/php-sdk#468 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Builder::build() silently skips configured file-based discovery when symfony/finder is missing — should fail loudlyPosiblemente ocupada @ousamabenyounes la tomó hace 57 días. Abiertoneeds confirmation needs maintainer action Server
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/php-sdk#398 · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
modelcontextprotocol/php-sdk#370 ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
modelcontextprotocol/php-sdk#587 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 Medio día Aptitud para principiantes 60/100
modelcontextprotocol/php-sdk#586 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de modelcontextprotocol/php-sdk
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ProfessionalWiki/NeoWiki#1675 ·
Los mantenedores suelen responder en 1 día
-
Incorrect documentationAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
WhatsApp link preview crawler is not detected as a botPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
matomo-org/device-detector#8405 ·
Los mantenedores suelen responder en 1 día