← Back to Pull requests

Give token-only MCP servers a token box instead of a dead Sign in #2367

Closed
unknown closed this pull request without merging on Nov 30, 2026 14:30 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 14:22 UTC
Author

Why

On the MCPs & Connectors page, the GitHub row's Sign in button did nothing useful. GitHub's MCP server takes a personal access token, not a browser sign-in, and it offers no client registration, so the sign-in could never finish.

Before: a catalog server that takes a key over HTTP (GitHub, Exa) with no key saved showed "Needs a sign-in." and a Sign in button. Pressing it tried the browser sign-in and failed. The only place to paste the token was the Add sheet.

After: that row says "Needs a token. This server takes a pasted token, not a browser sign-in." and shows a password box with Save token. Save token runs the same approval card the Add sheet uses, and the token is sealed as before. Scheduled jobs and automations list such a server as "needs its token".

How

  • connectors::Row gains key_hint: Option<String>. It is set when a signed-out HTTP server matches a catalog entry that takes a key, by the name it was added under or by its URL. Such a row has needs_sign_in false.

  • Row::blocked() holds the reason a job can't use a server; the scheduler and automations preflights call it instead of two copies of the same branches.

  • The key box and its approval card move into ConnectorKey.tsx, shared by the row and the Add sheet.

  • The 401 error now reads "Sign in or paste its token on its row under MCPs & Connectors", and the no-registration sign-in error says the server can't sign in through the browser.
  • Testing

  • New Rust test a_token_server_offers_its_token_box_instead_of_sign_in (catalog add, a pasted GitHub URL, a saved tokenRef, and a plain OAuth server).

  • New Vitest case for the row's token box and approval card. Fake token values only.

  • Run path: cargo nextest run --workspace --locked --profile ci, cargo clippy --workspace --all-targets -- -D warnings, and the UI tests, all in CI on this PR.

  • pii-guard: clean. rustfmt on touched files.
  • Skipped / not verified: nothing ran locally beyond rustfmt and pii-guard (dependencies aren't installed in this environment), so CI is the test run. Semgrep isn't available here. Stdio servers that take a key (Brave Search and others) keep using the Add sheet's key box; their rows can't yet tell whether a key is saved.

    Base: beta at d80ce6e.

    ---
    _Generated by Claude Code_

    Diff: 290 lines (+217 / -73) across 3 files Reviewer: cursor[bot] Review duration: 7m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 290 lines diff across 3 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.339
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #2367"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 63% (MEDIUM) · Higher = larger blast radius
    63%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.9% · Safe to merge
    24.9%