Skip to content

Chore: enhance MCP authentication flow with automatic resume and connection status updates - #701

Open
harshil-2096 wants to merge 3 commits into
mainfrom
fix/hv/once-the-mcp-authenticationconnection-is-completed-the-mcp
Open

Chore: enhance MCP authentication flow with automatic resume and connection status updates#701
harshil-2096 wants to merge 3 commits into
mainfrom
fix/hv/once-the-mcp-authenticationconnection-is-completed-the-mcp

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

image image

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
UI and catalog MCP resume orchestration only; no auth backend or credential handling changes.

Overview
Improves the catalog MCP authentication prompt so users see per-server Connected state after a successful authorize, instead of always showing Connect.

When every pending server has connected, the chat automatically calls resume (same as Continue) so the turn can proceed without an extra click. Continue shows a spinner and stays disabled while resume is in flight, and re-enables if resume fails so the user can retry. Pending server sets reset connection/resume state via a key on the catalog prompt.

The shared McpAuthPrompt slot gains optional connectedServerIds and continueLoading props for this UI. Non-catalog flows (auth URLs in a new tab) still use manual Continue unchanged.

Tests cover auto-resume after all catalog connects, no resume on failed auth, and Continue retry after resume errors.

Reviewed by Cursor Bugbot for commit 2bc7df9. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2bc7df9

The changes in this PR will be included in the next version bump.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@harshil-2096 harshil-2096 changed the title feat: enhance MCP authentication flow with automatic resume and connection status updates Chore: enhance MCP authentication flow with automatic resume and connection status updates Sep 11, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59c9401. Configure here.

Comment thread packages/trueforge-ui/src/containers/McpAuthContainer.tsx
const handleConnect = (serverId: string) => {
void handleAuthorize(serverId, isSuccess => {
if (isSuccess) {
const nextConnectedServerIds = new Set([...connectedServerIdsRef.current, serverId]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we harden this flow and see if actually we are getting authenticated as true here?

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