Repository navigation
Commit 42c9575
committed
fix: remove default disabled Authorization header to fix direct OAuth connections (modelcontextprotocol#982)
The default disabled Authorization header introduced in v0.18.0 prevented
direct connections to OAuth-protected MCP servers from working properly.
When connecting directly without prior OAuth flow:
1. The disabled header existed in customHeaders
2. needsOAuthToken correctly identified no enabled auth header
3. serverAuthProvider.tokens() returned null (no prior OAuth flow)
4. No Authorization header was added to the request
5. Request failed with 401 before OAuth flow could be triggered
This fix removes the default disabled header, allowing the OAuth flow
to be triggered naturally on 401 responses for direct connections.
The auth flows (step-by-step and quick) continue to work as they
complete OAuth before connecting, so tokens are already available.1 parent 82067f3 commit 42c9575
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
208 | 203 | | |
209 | 204 | | |
210 | 205 | | |
| |||
0 commit comments