Skip to content

fix(mcp): remove github catalog entry + render orphaned OAuth servers - #93

Merged
jonnyparris merged 1 commit into
mainfrom
fix/oauth-zombie-cleanup
May 26, 2026
Merged

fix(mcp): remove github catalog entry + render orphaned OAuth servers#93
jonnyparris merged 1 commit into
mainfrom
fix/oauth-zombie-cleanup

Conversation

@jonnyparris

Copy link
Copy Markdown
Owner

Two cleanups for the OAuth integrations UI

1. GitHub catalog entry removed

api.githubcopilot.com/mcp/ returns:

Incompatible auth server: does not support dynamic client registration

…when the SDK-managed OAuth path attempts DCR. The catalog entry was advertising a 'Connect with OAuth' button that could never succeed. Users who want GitHub MCP should add a github_token secret — the static-headers path already handles it.

2. Orphaned OAuth servers now render with a 'Clear' button

Before this commit, renderOAuthCard was only invoked for catalog entries with auth_type='oauth' that had a matching hub-DO record. When a catalog entry got removed (e.g. cf-portal in #89) but the user already had a stuck/failed hub-DO record from a previous attempt, the record was invisible in the UI. The user had no way to clear it without poking /api/mcp/delete-auth directly.

Fix: track which oauthServers got rendered alongside a catalog entry; render any unmatched ones via the new renderOrphanedOAuthCard with a 'Clear' button (calls existing /api/mcp/delete-auth).

Also tighten renderOAuthCard for non-ready states: 'Refresh' only appears for state=ready, and the destructive action reads 'Clear' for non-ready states and 'Disconnect' only when actually connected.

Background

I saw 'Cloudflare Portal · Authenticating…' stuck in the integrations panel with no actionable button. Investigation: the per-user hub DO had two zombie OAuth entries (portal.mcp.cfdata.org from an old failed authorize attempt, api.githubcopilot.com from the DCR rejection). Both invisible because cf-portal's catalog entry was removed in #89 and GitHub's catalog entry would've showed Connect-with-OAuth which would fail again.

Cleared the two zombies via /api/mcp/delete-auth manually. This PR prevents the situation from recurring.

Verification

  • npm run typecheck clean
  • npx vitest run 832/832 pass

beep-boop-🤖

Two cleanup fixes for the OAuth integrations UI:

1. Remove GitHub from CORE_MCP_CATALOG (api.githubcopilot.com/mcp/)
   GitHub Copilot's MCP server returns 'Incompatible auth server: does
   not support dynamic client registration' when the SDK-managed OAuth
   path attempts DCR. The catalog entry was advertising a Connect with
   OAuth button that could never succeed. Users who want GitHub MCP
   should add a github_token secret instead — the existing static-
   headers path already handles it and the UI hides any GitHub catalog
   suggestion when a github_token is present.

   The fallback github_token-hides-suggestion code path in
   dodo-settings.js (`if(cat.id==="github"&&hasGithubToken)return`)
   becomes dead with this change but is harmless to leave in place.

2. Always render orphaned OAuth servers
   Before this commit, renderOAuthCard was only called for catalog
   entries with auth_type='oauth' that had a matching SDK-managed
   hub-DO record. When a catalog entry was removed (e.g. cf-portal
   in PR #89) but the user already had a failed/stuck server record
   from a previous attempt, the record was invisible in the UI →
   no way to clear it without poking /api/mcp/delete-auth manually.

   Fix: track which oauthServers got rendered alongside a catalog
   entry; render any unmatched ones via the new renderOrphanedOAuthCard
   with a 'Clear' button (calls existing /api/mcp/delete-auth).

   Also improve renderOAuthCard for non-ready states:
   - 'Refresh' button only shows for state=ready (it was retrying
     against a broken config in other states, which was useless)
   - The remove button reads 'Disconnect' when ready, 'Clear'
     otherwise.

Tests: 832/832 pass. Catalog test count updated to reflect the
removed github entry; new assertions confirm github and cf-portal
are NOT in the catalog so the next person doesn't accidentally
re-add them without reading the history.

Stale UI rendering of an orphaned cf-portal 'authenticating' entry
that surfaced this issue was already wiped manually via
/api/mcp/delete-auth.

beep-boop-🤖
@jonnyparris
jonnyparris merged commit e8c9a96 into main May 26, 2026
2 checks passed
@jonnyparris
jonnyparris deleted the fix/oauth-zombie-cleanup branch May 26, 2026 16:05
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.

1 participant