[PR #11925] feat(tui): add MCP OAuth authentication in dialog-mcp #13987

Open
opened 2026-02-16 18:18:48 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11925

State: open
Merged: No


Summary

  • Add a keybind to trigger OAuth authentication for MCP servers in TUI
  • Show needs_auth/needs_client_registration status with visual indicators
  • Display error messages for failed MCP connections
  • Add toast notifications for auth flow feedback

Bug Fixes

  • fix(provider): Add missing error checks in OAuth authorize
  • fix(mcp): Improve OAuth flow reliability by passing serverUrl to credential storage

Changes

File Change
src/cli/cmd/auth.ts Remove unnecessary sleep
src/provider/auth.ts Add OauthMissing/OauthMethodNotFound error checks
src/mcp/auth.ts Add serverUrl parameter to credential functions
src/mcp/index.ts Pass mcpName to waitForCallback
src/mcp/oauth-callback.ts Fix cancelPending to search by mcpName
src/mcp/oauth-provider.ts Pass serverUrl to save functions
src/cli/cmd/tui/component/dialog-mcp.tsx New OAuth UI feature
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11925 **State:** open **Merged:** No --- ## Summary - Add `a` keybind to trigger OAuth authentication for MCP servers in TUI - Show `needs_auth`/`needs_client_registration` status with visual indicators - Display error messages for failed MCP connections - Add toast notifications for auth flow feedback ## Bug Fixes - **fix(provider)**: Add missing error checks in OAuth authorize - **fix(mcp)**: Improve OAuth flow reliability by passing serverUrl to credential storage ## Changes | File | Change | |------|--------| | `src/cli/cmd/auth.ts` | Remove unnecessary sleep | | `src/provider/auth.ts` | Add OauthMissing/OauthMethodNotFound error checks | | `src/mcp/auth.ts` | Add serverUrl parameter to credential functions | | `src/mcp/index.ts` | Pass mcpName to waitForCallback | | `src/mcp/oauth-callback.ts` | Fix cancelPending to search by mcpName | | `src/mcp/oauth-provider.ts` | Pass serverUrl to save functions | | `src/cli/cmd/tui/component/dialog-mcp.tsx` | **New OAuth UI feature** |
yindo added the pull-request label 2026-02-16 18:18:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13987