Skip to content

fix(connector): stop lying about state, and say why sign-in failed#266

Merged
AVADSA25 merged 2 commits into
mainfrom
fix/connector-honest
Jul 16, 2026
Merged

fix(connector): stop lying about state, and say why sign-in failed#266
AVADSA25 merged 2 commits into
mainfrom
fix/connector-honest

Conversation

@AVADSA25

Copy link
Copy Markdown
Owner

Three defects, all reported from live use, all confirmed against the real endpoints.

1. GitHub's "Sign in" did nothing

Not a UI bug. GitHub's MCP server publishes no OAuth metadata at all, so fastmcp's Dynamic Client Registration 404s and the flow dies before a browser can open:

OAuthRegistrationError: Registration failed: 404 404 page not found

Probed to confirm:

Server /.well-known/oauth-authorization-server registration_endpoint
Notion 200 https://mcp.notion.com/register
GitHub 404 none — OAuth sign-in is impossible
Hugging Face 200 https://huggingface.co/oauth/register

The error was swallowed. signin_server now never raises and maps each failure to an actionable message — GitHub's says it needs a personal access token under headers, not OAuth.

2. Hugging Face said "Connected" though nobody signed in

It's an open endpoint (auth: none). There is no session — which is also why the card offered no way out. "Connected" reads as "someone signed in here", which is false. Now: "Ready — open endpoint, no sign-in needed", with no Sign out, because there is nothing to end.

3. Failures vanished before they could be read

Sign-in errors were toasts. They now stay on the card until the next attempt.

Also renames Disconnect → Sign out — it matches what the button actually ends.

State machine

Condition Shows
off just the toggle
oauth + signed in ● Signed in · Sign out
oauth + not signed in Needs OAuth sign-in · Sign in
api_key + configured ● Connected via API key
api_key + missing Needs an API key in mcp_servers.json
open endpoint ● Ready · open endpoint — no sign-in needed

Tests

Error mapping verified across all four failure modes (DCR 404 → PAT instructions; registration 500 → rejected-registration; timeout → check URL/online; unknown → raw detail). py_compile clean on both changed Python files.

Mikarina13 and others added 2 commits July 16, 2026 14:31
Three things the Connector tab got wrong, all reported from live use:

1. GitHub's "Sign in" did nothing. Its MCP server publishes no OAuth metadata
   at all, so fastmcp's Dynamic Client Registration 404s and the flow dies
   BEFORE a browser opens. The error was swallowed. signin_server now maps
   every failure to an operator-readable message naming the cause and the fix
   (GitHub needs a PAT under "headers", not OAuth).

2. Hugging Face showed "Connected" though nobody ever signed in. It's an OPEN
   endpoint (auth: none) — there is no session, which is also why it offered no
   way out. Saying "Connected" reads as "someone signed in here". It now reads
   "Ready — open endpoint, no sign-in needed".

3. Failures surfaced as toasts that vanish before they can be read. Sign-in
   errors now stay ON the card until the next attempt.

Also renames Disconnect -> Sign out, matching what the button actually ends.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AVADSA25
AVADSA25 merged commit 75cbfa1 into main Jul 16, 2026
1 check passed
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