MCP endpoint matches the Authorization scheme case-sensitively and logs the same reason for "absent" and "wrong scheme" (ChatGPT connector gets missing_bearer_token)
Maintainers usually reply within 1 day
@shethshlok is already working on this.
Since Oct 22, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in the apps/server MCP HTTP middleware that parses the Authorization header, then inspect its existing 401 handling and warning reasons. Reproduce the reported lowercase bearer request and the request with no header; done means scheme matching follows the case-insensitive expectation and the two failure reasons are distinguishable without logging credentials.
Written by the indexing model from the issue text.
Description
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
- Match the scheme case-insensitively.
- 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
- Dominant language
- TypeScript
- Stars
- 24.8k
- Forks
- 6.4k
- Avg merge
- 4h 35m
- Merged PRs (30d)
- 174
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pingdotgg/t3code
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
[Bug]: Forgejo skipped status keeps watch_pull_request pending when no required-check policy is setOpen
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
All issues in pingdotgg/t3code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lyswhut/lx-music-desktop#3026 ·
-
area: ci type: test
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
schlessera/brain-kit#2769 ·
Maintainers usually reply within 1 day
-
Read a vector index's quantization back on Neo4j 2026.10, which reports vector.quantization.typeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine#231 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
alveusgg/alveusgg#2502 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day