You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For OAuth configuration without a configured client ID, discover OAuth metadata and complete Dynamic Client Registration (RFC 7591) before opening authorization, then send registered client_id.
Actual
Authorization opens directly with client_id= empty. GitHub returns 404.
Reproduction
Configure https://api.githubcopilot.com/mcp/ upstream with OAuth and no client_id.
Run mcpproxy auth login --server=github.
Browser opens URL above and returns 404.
Context
#83 / #116 made oauth.client_id optional for DCR. Current flow appears to skip or fail DCR without surfacing discovery/registration failure.
Thanks for the clean report — root-caused and reproduced, fix is up in #976.
Root cause: GitHub's authorization server (https://github.com/login/oauth) doesn't advertise a registration_endpoint in its RFC 8414 metadata, so Dynamic Client Registration is impossible there. mcpproxy attempted DCR, got "server does not support dynamic client registration", logged a warning, and then intentionally fell back to "public client OAuth with PKCE, no client_id". That fallback premise is wrong — OAuth public clients still require a client_id (PKCE replaces the client secret, not the id) — so the authorize URL was built with client_id= empty and GitHub 404s it. Worse, both the REST login endpoint and mcpproxy auth login reported success on that broken URL.
Fix (#976): when no client_id is available after the DCR attempt, mcpproxy now aborts with a structured oauth_client_id_required error (CLI exits 1 with the full error block and suggestion) instead of ever opening a guaranteed-broken authorization URL.
Workaround today: register your own GitHub OAuth App (callback URL http://127.0.0.1:*/oauth/callback — any port, mcpproxy allocates dynamically; if your provider requires a fixed port, check the login log line for the actual callback port) and set it on the server entry:
Follow-up: #975 correctly prevents the broken empty client_id authorization URL, but the GitHub static-client OAuth path is still not workable end-to-end.
Environment
mcpproxy v0.61.0 (macOS arm64, daemon mode)
Upstream: https://api.githubcopilot.com/mcp/
Static oauth.client_id configured from a GitHub OAuth App
Problem 1: callback port is dynamic for static credentials
GitHub OAuth Apps require one exact callback URL and reject http://127.0.0.1:*/oauth/callback as invalid. mcpproxy allocates a free callback port for each login; in this session it changed from 53015 to 54025.
The current implementation persists a callback port only for DCR-created credentials, not a configured static oauth.client_id. This makes reauthorization unreliable because the GitHub OAuth App callback URL must be manually changed to match the latest mcpproxy port before each login.
Expected: support configured or persisted callback-port/redirect-URI reuse for static OAuth credentials, with a documented configuration path.
Problem 2: successful GitHub browser authorization does not connect mcpproxy
I configured the GitHub OAuth App callback URL to exactly match the active mcpproxy listener:
http://127.0.0.1:54025/oauth/callback
Then ran:
mcpproxy auth login --server=github
GitHub browser flow reported Authentication was successful. However mcpproxy remained Sign-in required; github stayed in Error with OAuth authentication required, no token appeared to persist, and zero GitHub MCP tools were discovered.
Expected: after browser success, mcpproxy must receive the callback, exchange/store the token, and connect to the official GitHub MCP upstream.
Impact
The official GitHub MCP endpoint is OAuth-only. PAT cannot be used as a fallback for this endpoint, so GitHub OAuth Apps with static client IDs need this flow to work reliably.
Thanks — both of these reproduce, and both turned out to be real bugs. Filed and fixed separately.
First, a correction to my own earlier comment here. I suggested registering http://127.0.0.1:*/oauth/callback as the OAuth App callback URL, "any port". Retracting that: it isn't valid GitHub syntax, and it can't work in principle. GitHub does have wildcard matching on callback URLs now, but their docs are explicit that it covers subdomains and subdirectory paths only — "the redirect URL's host (excluding subdomains) and port must exactly match the callback URL". A loopback port that moves between logins can never satisfy that. You were right to push back.
Problem 1 — confirmed, filed as #1066, fixed in #1069
Your port move (53015 → 54025) is exactly what #1066 records: two consecutive logins on the same daemon allocated http://127.0.0.1:54108/oauth/callback, then http://127.0.0.1:54308/oauth/callback. Reproduced against a GitHub-shaped fake provider — RFC 8414 metadata advertising S256 and deliberately noregistration_endpoint, like github.com/login/oauth. Three distinct causes:
Only the DCR-succeeded branches ever persisted the callback port, so a static oauth.client_id login stored callback_port: 0.
Port 0 plus a non-empty client_id then hit the "legacy DCR credentials, clearing for re-registration" branch and wiped your stored credentials on the next login. A client_id that came from mcp_config.json can never be re-registered, so that branch was always wrong for static clients.
oauth.redirect_uri existed in the config schema, was diffed on reload and was documented — but the OAuth flow never read it. The redirect URI was unconditionally the freshly allocated one. That's why my wildcard workaround had no correct alternative at the time.
Register that exact string as the OAuth App's Authorization callback URL — same host, same port, same path. mcpproxy binds that port and sends the configured URI to the provider verbatim. It must be an RFC 8252 loopback redirect: http scheme, loopback host, explicit port, /oauth/callback path. Pick a port nothing else on your machine claims; a malformed value or an occupied port fails the login with an error that names redirect_uri. Without redirect_uri, mcpproxy now persists the port of the first successful login and reuses it.
Problem 2 — two candidates, and one log line tells them apart
There are two known ways to get exactly what you saw — browser says success, mcpproxy stays signed out, 0 tools — and I can't tell from here which one hit you.
Candidate A — #1067, fixed in #1068. Each upstream had a single shared 1-buffer callback channel with no per-flow routing. A background reconnect could park its own waiter on it, win the race against your manual login, and reject the real authorization code as a state mismatch — so no /token request was ever made. The callback page rendered "Authorization Successful" unconditionally, including on that drop path. #1068 dispatches callbacks by state, gives each flow its own single-use channel, returns an explicit HTTP 400 "Authorization Failed" page for an unknown or expired state, and stamps the failure onto the server's status so it shows up in mcpproxy upstream list instead of only in the log.
Candidate B — a missing client_secret. A GitHub OAuth App is issued a client secret at creation, and GitHub's token endpoint appears to expect it: exchanging with client_id + PKCE alone returned incorrect_client_credentials in a probe. Treat that as a lead, not a finding — it's a single observation, and GitHub does advertise code_challenge_methods_supported: ["S256"] at /.well-known/oauth-authorization-server/login/oauth (that metadata describes the GitHub Apps user-authorization flow, not classic OAuth Apps). If you hit incorrect_client_credentials, add "client_secret" next to "client_id" — and please say so, because we'd rather confirm this than infer it.
The discriminator. On macOS the core log is ~/Library/Logs/mcpproxy/main.log (not under ~/.mcpproxy/, unless you run a custom --data-dir, in which case it's <data-dir>/logs/main.log). Retry the login, then:
grep -iE "state mismatch|incorrect_client_credentials|failed to exchange authorization code"~/Library/Logs/mcpproxy/main.log
incorrect_client_credentials → Candidate B: a config issue, not that bug. Set oauth.client_secret and retry.
Neither → please attach the log and we'll look.
One more thing that would help: did the browser step take more than about two minutes? The background waiter that mcpproxy auth login parks had a hardcoded 120s cap even though the manager hands it a 30-minute context — a GitHub sign-in with 2FA or an org-approval step blows through that while you're still in the browser. #1068 makes that waiter follow the caller's deadline. (The synchronous in-connect OAuth paths still use their own 120s wait; that's tracked separately.)
Status
#1068 and #1069 are both merged to main. Neither is in v0.61.0, which was cut the day before them, and nothing has been tagged since — so they land in the next release. A follow-up, #1070, fixes several things QA found in the redirect_uri pin itself: an [::1] pin bound IPv4 and so silently timed out, and the "fail loudly" errors above were going to a no-op logger and reaching no log at all.
Activity
Dumbris commentedon Aug 13, 2026
Thanks for the clean report — root-caused and reproduced, fix is up in #976.
Root cause: GitHub's authorization server (
https://github.com/login/oauth) doesn't advertise aregistration_endpointin its RFC 8414 metadata, so Dynamic Client Registration is impossible there. mcpproxy attempted DCR, got "server does not support dynamic client registration", logged a warning, and then intentionally fell back to "public client OAuth with PKCE, no client_id". That fallback premise is wrong — OAuth public clients still require aclient_id(PKCE replaces the client secret, not the id) — so the authorize URL was built withclient_id=empty and GitHub 404s it. Worse, both the REST login endpoint andmcpproxy auth loginreported success on that broken URL.Fix (#976): when no client_id is available after the DCR attempt, mcpproxy now aborts with a structured
oauth_client_id_requirederror (CLI exits 1 with the full error block and suggestion) instead of ever opening a guaranteed-broken authorization URL.Workaround today: register your own GitHub OAuth App (callback URL
http://127.0.0.1:*/oauth/callback— any port, mcpproxy allocates dynamically; if your provider requires a fixed port, check the login log line for the actual callback port) and set it on the server entry:{ "name": "github", "url": "https://api.githubcopilot.com/mcp/", "protocol": "http", "enabled": true, "oauth": { "client_id": "<your OAuth app client id>" } }Verified locally that a configured
oauth.client_idproduces a working authorize URL carrying it.fix(oauth): abort with oauth_client_id_required instead of empty-clie…
nagydavid commentedon Aug 26, 2026
Follow-up: #975 correctly prevents the broken empty
client_idauthorization URL, but the GitHub static-client OAuth path is still not workable end-to-end.Environment
v0.61.0(macOS arm64, daemon mode)https://api.githubcopilot.com/mcp/oauth.client_idconfigured from a GitHub OAuth AppProblem 1: callback port is dynamic for static credentials
GitHub OAuth Apps require one exact callback URL and reject
http://127.0.0.1:*/oauth/callbackas invalid. mcpproxy allocates a free callback port for each login; in this session it changed from53015to54025.The current implementation persists a callback port only for DCR-created credentials, not a configured static
oauth.client_id. This makes reauthorization unreliable because the GitHub OAuth App callback URL must be manually changed to match the latest mcpproxy port before each login.Expected: support configured or persisted callback-port/redirect-URI reuse for static OAuth credentials, with a documented configuration path.
Problem 2: successful GitHub browser authorization does not connect mcpproxy
I configured the GitHub OAuth App callback URL to exactly match the active mcpproxy listener:
Then ran:
GitHub browser flow reported Authentication was successful. However mcpproxy remained
Sign-in required;githubstayed inErrorwithOAuth authentication required, no token appeared to persist, and zero GitHub MCP tools were discovered.Expected: after browser success, mcpproxy must receive the callback, exchange/store the token, and connect to the official GitHub MCP upstream.
Impact
The official GitHub MCP endpoint is OAuth-only. PAT cannot be used as a fallback for this endpoint, so GitHub OAuth Apps with static client IDs need this flow to work reliably.
fix(oauth): dispatch callbacks by state and stop faking success (#1068)
fix(oauth): keep the loopback callback port stable for static clients (…
Dumbris commentedon Aug 27, 2026
Thanks — both of these reproduce, and both turned out to be real bugs. Filed and fixed separately.
First, a correction to my own earlier comment here. I suggested registering
http://127.0.0.1:*/oauth/callbackas the OAuth App callback URL, "any port". Retracting that: it isn't valid GitHub syntax, and it can't work in principle. GitHub does have wildcard matching on callback URLs now, but their docs are explicit that it covers subdomains and subdirectory paths only — "the redirect URL's host (excluding subdomains) and port must exactly match the callback URL". A loopback port that moves between logins can never satisfy that. You were right to push back.Problem 1 — confirmed, filed as #1066, fixed in #1069
Your port move (
53015→54025) is exactly what #1066 records: two consecutive logins on the same daemon allocatedhttp://127.0.0.1:54108/oauth/callback, thenhttp://127.0.0.1:54308/oauth/callback. Reproduced against a GitHub-shaped fake provider — RFC 8414 metadata advertisingS256and deliberately noregistration_endpoint, likegithub.com/login/oauth. Three distinct causes:oauth.client_idlogin storedcallback_port: 0.0plus a non-emptyclient_idthen hit the "legacy DCR credentials, clearing for re-registration" branch and wiped your stored credentials on the next login. Aclient_idthat came frommcp_config.jsoncan never be re-registered, so that branch was always wrong for static clients.oauth.redirect_uriexisted in the config schema, was diffed on reload and was documented — but the OAuth flow never read it. The redirect URI was unconditionally the freshly allocated one. That's why my wildcard workaround had no correct alternative at the time.The supported path now is an explicit pin:
{ "name": "github", "url": "https://api.githubcopilot.com/mcp/", "protocol": "http", "enabled": true, "oauth": { "client_id": "<your OAuth App client id>", "redirect_uri": "http://127.0.0.1:54108/oauth/callback" } }Register that exact string as the OAuth App's Authorization callback URL — same host, same port, same path. mcpproxy binds that port and sends the configured URI to the provider verbatim. It must be an RFC 8252 loopback redirect:
httpscheme, loopback host, explicit port,/oauth/callbackpath. Pick a port nothing else on your machine claims; a malformed value or an occupied port fails the login with an error that namesredirect_uri. Withoutredirect_uri, mcpproxy now persists the port of the first successful login and reuses it.Docs: Configuration → Pinning the callback port with
redirect_uri(onmain; docs.mcpproxy.app picks it up on the next site build).Problem 2 — two candidates, and one log line tells them apart
There are two known ways to get exactly what you saw — browser says success, mcpproxy stays signed out, 0 tools — and I can't tell from here which one hit you.
Candidate A — #1067, fixed in #1068. Each upstream had a single shared 1-buffer callback channel with no per-flow routing. A background reconnect could park its own waiter on it, win the race against your manual login, and reject the real authorization code as a state mismatch — so no
/tokenrequest was ever made. The callback page rendered "Authorization Successful" unconditionally, including on that drop path. #1068 dispatches callbacks bystate, gives each flow its own single-use channel, returns an explicit HTTP 400 "Authorization Failed" page for an unknown or expired state, and stamps the failure onto the server's status so it shows up inmcpproxy upstream listinstead of only in the log.Candidate B — a missing
client_secret. A GitHub OAuth App is issued a client secret at creation, and GitHub's token endpoint appears to expect it: exchanging withclient_id+ PKCE alone returnedincorrect_client_credentialsin a probe. Treat that as a lead, not a finding — it's a single observation, and GitHub does advertisecode_challenge_methods_supported: ["S256"]at/.well-known/oauth-authorization-server/login/oauth(that metadata describes the GitHub Apps user-authorization flow, not classic OAuth Apps). If you hitincorrect_client_credentials, add"client_secret"next to"client_id"— and please say so, because we'd rather confirm this than infer it.The discriminator. On macOS the core log is
~/Library/Logs/mcpproxy/main.log(not under~/.mcpproxy/, unless you run a custom--data-dir, in which case it's<data-dir>/logs/main.log). Retry the login, then:state mismatch: expected … got …→ Candidate A. Fixed by fix(oauth): dispatch callbacks by state and stop faking success #1068; nothing to change on your side.incorrect_client_credentials→ Candidate B: a config issue, not that bug. Setoauth.client_secretand retry.One more thing that would help: did the browser step take more than about two minutes? The background waiter that
mcpproxy auth loginparks had a hardcoded 120s cap even though the manager hands it a 30-minute context — a GitHub sign-in with 2FA or an org-approval step blows through that while you're still in the browser. #1068 makes that waiter follow the caller's deadline. (The synchronous in-connect OAuth paths still use their own 120s wait; that's tracked separately.)Status
#1068 and #1069 are both merged to
main. Neither is in v0.61.0, which was cut the day before them, and nothing has been tagged since — so they land in the next release. A follow-up, #1070, fixes several things QA found in theredirect_uripin itself: an[::1]pin bound IPv4 and so silently timed out, and the "fail loudly" errors above were going to a no-op logger and reaching no log at all.fix(oauth): make the redirect_uri pin actually reachable, diagnosable…
fix(telemetry): stop four diagnostics instruments measuring themselves (
feat(oauth): brand the browser page shown after sign-in (#1666)