Skip to content

fix(oauth): normalize HTTP 201 token responses for Supabase compatibility#317

Merged
Dumbris merged 1 commit intomainfrom
fix/oauth-token-201-status-normalization
Mar 3, 2026
Merged

fix(oauth): normalize HTTP 201 token responses for Supabase compatibility#317
Dumbris merged 1 commit intomainfrom
fix/oauth-token-201-status-normalization

Conversation

@Dumbris
Copy link
Contributor

@Dumbris Dumbris commented Mar 3, 2026

Summary

  • Supabase's OAuth token endpoint returns HTTP 201 Created instead of the standard 200 OK
  • The mcp-go library (v0.43.1) only accepts 200 in ProcessAuthorizationResponse, causing token exchange to fail despite the response containing a valid access token
  • Extended OAuthTransportWrapper.RoundTrip() to normalize 201→200 for token responses
  • Always create the transport wrapper for all OAuth servers (previously only when extra params were configured)

Test plan

  • Unit tests: 4 new test cases covering 201 normalization with/without extra params, 200 passthrough, and non-token 201 passthrough
  • All existing oauth tests pass
  • Manual verification: Supabase server connects successfully with 20 tools after fix

🤖 Generated with Claude Code

…lity

Supabase's OAuth token endpoint returns HTTP 201 Created instead of the
standard 200 OK. The mcp-go library only accepts 200, causing token
exchange to fail even though the response contains a valid access token.

Extend OAuthTransportWrapper to normalize 201→200 for token responses,
and always create the wrapper for all OAuth servers (not just when extra
params are configured).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3d0864e
Status: ✅  Deploy successful!
Preview URL: https://63d298c4.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-oauth-token-201-status-n.mcpproxy-docs.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Mar 3, 2026

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/oauth-token-201-status-normalization

Available Artifacts

  • archive-darwin-amd64 (24 MB)
  • archive-darwin-arm64 (21 MB)
  • archive-linux-amd64 (13 MB)
  • archive-linux-arm64 (11 MB)
  • archive-windows-amd64 (23 MB)
  • archive-windows-arm64 (21 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (26 MB)
  • installer-dmg-darwin-arm64 (24 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 22626180544 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris Dumbris merged commit ed10f89 into main Mar 3, 2026
23 checks passed
@Dumbris Dumbris deleted the fix/oauth-token-201-status-normalization branch March 3, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants