Skip to content

/mcp ux fix - #12

Merged
pentoshi007 merged 2 commits into
pentoshi007:mainfrom
pent0shi:main
Sep 5, 2026
Merged

/mcp ux fix#12
pentoshi007 merged 2 commits into
pentoshi007:mainfrom
pent0shi:main

Conversation

@pent0shi

@pent0shi pent0shi commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Description

Related Issue

Closes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • ♻️ Refactor (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test update
  • 🔧 Chore (build, CI, dependencies, tooling)

How Has This Been Tested?

  • npm run typecheck passes
  • npm test passes
  • Manual testing (describe below)

Test Details

Screenshots / Recordings

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published

usehoplite Bot and others added 2 commits September 5, 2026 16:44
- sign-in instructions (device code / fallback URL) now open in a pager
  view instead of long toasts, in both classic and opentui; an mcp-oauth
  confirm dialog asks before opening the browser
- device authorization (RFC 8628) is now preferred whenever the server
  advertises it (verified live: GitHub exposes login/device/code), with
  browser loopback as fallback after consent; noninteractive sessions
  print the link + code on stderr
- github catalog entry accepts an optional GITHUB_OAUTH_CLIENT_ID
  (auth.clientId) so device sign-in works without dynamic registration;
  the no-client error now mentions the device option and gh auth login
- /mcp add and paste-add notify immediately ('adding…', 'connecting…')
  instead of going silent for seconds
mcp auth: pager sign-in UX, device-first flow, add progress notices
Copilot AI lite review requested due to automatic review settings September 5, 2026 16:49
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: b87801a3-aa3e-4db0-a9b5-2236c9a60f49


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pentoshi007
pentoshi007 merged commit e4c26b4 into pentoshi007:main Sep 5, 2026
9 checks passed

Copilot AI 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.

🟡 Changes recommended

There is a confirmed double-consent prompt issue in the loopback OAuth flow and a confirmed formatting issue in the fallback sign-in notice output.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves the MCP OAuth sign-in user experience by preferring device-code flow, adding explicit user consent prompts in the UI, and providing clearer in-app messaging during MCP server setup and authentication.

Changes:

  • Prefer OAuth device-code flow even when a browser is available, and add an explicit consent prompt hook for OAuth flows.
  • Improve TUI UX for MCP sign-in by showing device-code and authorization URL instructions in an overlay pager, plus new confirm modal titles for MCP OAuth.
  • Enhance MCP server setup UX (notices) and extend known-server installation planning to support wiring an optional OAuth client ID into auth.clientId.
File summaries
File Description
test/mcp/live-oauth-discovery.test.ts Adds an opt-in live test to validate OAuth discovery metadata for catalog servers.
test/mcp/auth-device.test.ts Updates expectations to enforce device-flow preference even when openBrowser exists.
src/ui-core/controllers/overlay-controller.ts Extends confirm kinds to include MCP OAuth consent.
src/ui-core/commands/mcp-commands.ts Adds informational session notices during MCP server add flows.
src/ui-core/bootstrap/composition-root.ts Routes MCP OAuth UX through overlay pager/confirm for clearer sign-in guidance.
src/tui-v2/components/modal/confirm-modal.tsx Adds title mapping for the new MCP OAuth confirm kind.
src/mcp/known-servers.ts Adds optional GitHub OAuth client ID secret and supports mapping secrets into auth.clientId.
src/mcp/auth/provider.ts Changes OAuth flow selection and introduces loopback/browser consent prompt messaging.
src/classic/panels/confirm-panel.ts Adds title mapping for the new MCP OAuth confirm kind in the classic UI.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/mcp/auth/provider.ts
Comment on lines +389 to 393
}
throw new McpTransportError("network", "MCP OAuth authorization was declined.");
}
await this.requireConsent(metadata, scope);
const pkce = createPkcePair();
"plain",
);
if (!shown) {
sessionRef?.notice("info", lines.join(" · "));
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.

3 participants