Repository navigation
Closed
Description
Summary
A streamable-HTTP upstream that needs no authentication at all ends up permanently in Pending Auth / "Sign-in required" after a short network outage. It never leaves that state on its own. mcpproxy auth login cannot help, because the server has no OAuth endpoints. Restarting the daemon is the only fix.
Version / environment
- mcpproxy-go v0.69.0, Linux (NixOS), running as a systemd service with
disable_management: true. Not yet checked on v0.70.0. - Upstream config (no
oauthblock, no headers):
{ "name": "cloudflare-docs", "protocol": "streamable-http", "url": "https://docs.mcp.cloudflare.com/mcp" }- The server itself:
initializereturns 200 without credentials./.well-known/oauth-protected-resource[/mcp]and/.well-known/oauth-authorization-serverreturn 404.
What happened
- Wi-Fi dropped for about 20 minutes and DNS stopped resolving. Every remote upstream went
Ready → Error, as expected. - During the outage, reconnect attempts failed with
MCP initialize failed during no-auth strategy: server did not respond to MCP initialize within 30s ... - When the network came back, every other upstream returned to
Ready. On its last reconnect,cloudflare-docswent into the HTTP OAuth strategy:Starting OAuth flow ... has_persisted_token=false Preflight request for WWW-Authenticate header failed ... dial tcp: lookup docs.mcp.cloudflare.com ... i/o timeout Authorization Server Metadata discovery failed ... context deadline exceeded No OAuth scopes discovered; falling back to empty list MCP initialization failed after OAuth setup: no valid token available, authorization required State transition Connecting -> Pending Auth - After that there were no more reconnect attempts. Hours later the server still showed
status: "pending auth",health.summary: "Sign-in required", although the network had been fine for a long time. POST /api/v1/servers/{name}/restartis refused underdisable_management. Aftersystemctl restart mcpproxy, the server connected immediately via the no-auth strategy (2 tools).
Expected
- A timeout or DNS failure in the no-auth strategy should not count as "OAuth required". This looks like the same class of problem as fix(upstream): stop misclassifying transport errors as auth failures #464, but here the trigger is a transport timeout, not the strategy-name substring.
- If the OAuth strategy is attempted anyway and discovery finds no OAuth metadata (or discovery itself fails on a network error), the server should go to
Errorand keep retrying with backoff, not to a terminalPending Auth. Pending Authshould be re-evaluated periodically. For example, retry the no-auth strategy when no token exists and discovery found nothing.
Workaround
A systemd timer that restarts the daemon when a server known to need no OAuth reports pending auth.
Metadata
Metadata
Assignees
Labels
No labels
Activity
fix(upstream): stop network errors parking no-auth servers in Pending…