Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

MCP endpoint matches the Authorization scheme case-sensitively and logs the same reason for "absent" and "wrong scheme" (ChatGPT connector gets missing_bearer_token)

Abierto Apto para principiantes
#23,710 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Rish-it ya está trabajando en esto.

Desde el 22/10/2026.

  • #23782 de @Rish-it — abierto
  • #23792 de @shethshlok — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

Empieza en el middleware HTTP de MCP de apps/server que analiza el encabezado Authorization y, después, inspecciona el manejo existente de 401 y los motivos de las advertencias. Reproduce la solicitud reportada con bearer en minúsculas y la solicitud sin encabezado; se considera terminado cuando la comparación del esquema cumple la expectativa de que no distinga entre mayúsculas y minúsculas y los dos motivos del fallo se pueden distinguir sin registrar credenciales.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug needs-triage
Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce

Control (dummy, non-secret value, through the public managed host)

  • Authorization: Bearer <dummy> -> 401, reason unknown_or_expired_token (the header passes the tunnel and reaches verification)
  • Authorization: bearer <dummy> -> 401, reason missing_bearer_token
Expected behavior
  1. Match the scheme case-insensitively.
  2. Log distinct reasons (for example missing_authorization_header vs unsupported_scheme), without logging the credential.
Actual behavior

Summary
The MCP HTTP middleware only accepts an Authorization value that starts with exactly "Bearer " (case-sensitive). RFC 9110 section 11.1 says the auth-scheme is case-insensitive. A lowercase "bearer <token>" is rejected with 401 and the warning reason "missing_bearer_token", which is also the reason logged when no header is sent at all, so the two cases cannot be told apart in the logs.

Why I noticed
ChatGPT custom MCP app (OAuth/DCR, orchestration:read only). OAuth completes: register 201, approval, /oauth/mcp/token 200 with token_type "Bearer". But every /mcp POST from the ChatGPT connector (UA Python/aiohttp), 8 of 8 across two separate authorizations, including one 0.8 s after token issuance and several after "Update tools", is rejected with missing_bearer_token, and the token-verification step never runs. From T3's logs I cannot tell whether ChatGPT sends no Authorization header or a scheme/case T3 does not accept. This may well be OpenAI-side; if so, this issue is only about the two T3 points under Expected behavior.

No credentials, environment IDs or hostnames are included.

Impact

Minor bug or occasional failure

Version or commit

T3 Code Desktop (stable) 0.1.1

Environment

macOS arm64, T3 Code Desktop 0.1.1, main server on 3773, reached through the managed tunnel host

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

No response

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
1 h 22 min
PR fusionados (30 d)
18

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.