Skip to content

fix(desktop): connect Vercel and show why a connection failed - #4359

Merged
LHagfoss merged 1 commit into
mainfrom
fix/desktop-connections-vercel
Nov 25, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/desktop-connections-vercel

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

Vercel's MCP server only accepts clients it has reviewed, or clients identified by a Client ID Metadata Document (CIMD, an HTTPS URL as client_id). RustCode registered an unreviewed client called "rustcode". Vercel also dropped the device grant from that registration (checked live: unauthorized_client), so connecting Vercel could never finish.

  • Engine (rustcode/engine/src/mcp/client_metadata.rs): when no client_id is configured and the authorization server advertises client_id_metadata_document_supported, or is Vercel (which accepts CIMD without advertising it), the engine uses https://rustcode.lhagfoss.com/oauth/client-metadata.json as the client_id. It skips dynamic registration and uses the loopback code redirect. The document is published by feat(site): publish RustCode's OAuth client metadata document rustcode_website#17.
  • Settings › Connections › Apps:
    • A failed app shows its reason in red, with the MCP OAuth for '<name>': prefix removed and the full text on hover, plus Retry and Remove. Before, it showed a dead "Not connected" chip.
    • Apps already set up are listed first. Connected cards get a green tint and dot, failed ones a red tint.
    • The intro line counts connected apps.
  • The mock seeds a failed vercel row so this state can be checked.

Changelog

Vercel connects from Settings › Connections, and a failed connection shows why, with Retry and Remove.

Testing

  • bun run check passes (3318 tests), including new Connectors.test.ts. cargo fmt --check, check-comments.py and check-rust-size.py pass. Rust compile and tests run in CI (VPS rule): new unit tests cover the CIMD choice and the Vercel fixture's resulting flow.
  • In the mock, the failed Vercel card shows the reason. Clicking Retry connected it and moved it to the top.
  • Live probe: Vercel's registration endpoint drops device_code from the granted grants. Its docs require CIMD or a reviewed client.
  • A real Vercel sign-in needs the website PR deployed first.

Vercel MCP accepts only reviewed clients or ones identified by a Client ID Metadata Document, so the engine's dynamically registered client could never finish signing in. The engine now uses RustCode's metadata document as its client_id for Vercel and for any server advertising client_id_metadata_document_supported.

Settings > Connections > Apps now shows a failed app's reason with Retry and Remove instead of a dead 'Not connected' chip, lists set-up apps first, tints connected and failed cards, and counts the connected apps.
@github-actions github-actions Bot added the fix A bug fix label Nov 25, 2026
@LHagfoss
LHagfoss merged commit 374c6cb into main Nov 25, 2026
11 checks passed
@LHagfoss
LHagfoss deleted the fix/desktop-connections-vercel branch November 25, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants