Skip to content

feat(tui): explore a more capable MCP modal #36303

Open

Description

@kitlangton

Context

The V2 MCP modal is currently a minimal status list with an error-detail branch. It should become a useful control and diagnosis surface without turning into a dense dashboard.

@kitlangton is the design owner for this exploration.

Explore

  • Decide what users need to understand at a glance for pending, connected, failed, authentication-required, registration-required, and disabled servers.
  • Explore which actions belong directly in the list and which belong in a server detail view.
  • Consider enable/disable, retry or reconnect, authenticate, inspect capabilities, and error details without assuming all of them belong in the first version.
  • Design the focused-server detail treatment together with the progressive nested-dialog/back-stack work tracked in feat(tui): unify modal interaction and visual behavior #36302.
  • Make disabled and unavailable commands use the shared DialogSelect disabled-action treatment rather than disappearing or remaining executable.
  • Define loading, empty, and refresh states explicitly.
  • Verify narrow-terminal behavior once Drive supports deterministic viewport sizing.

Current source

  • packages/tui/src/component/dialog-mcp.tsx
  • packages/tui/src/ui/dialog-select.tsx
  • packages/tui/src/ui/dialog.tsx

Validation

Add deterministic opencode-drive states for pending, connected, failed with details, needs-auth, disabled, empty, and refresh behavior. The audit showed that pending-state capture needs a request barrier or controllable latency rather than screenshot sleeps.

Activity

  1. self-assigned this
    on Jul 10, 2026
  2. big-andy-coates commented on Aug 19, 2026

    @big-andy-coates

    Hey @kitlangton, +1 for being to re-authenticate mcp servers from within an active session :)

  3. zhiganov commented on Sep 15, 2026

    @zhiganov

    Reproduction evidence: optional OAuth server appears connected but cannot authenticate in the TUI

    Environment

    • OpenCode: v2.0.3
    • OS: Windows 11 10.0.26200.9445
    • Terminal: Windows Terminal, TERM=xterm-256color
    • Shell: C:\WINDOWS\system32\cmd.exe
    • Install: npm global, latest channel
    • Active plugins: none found

    Reproduction

    • Configure an OAuth-capable remote MCP server that also exposes public tools.
    • Start OpenCode without stored OAuth credentials.
    • opencode mcp list and /mcps report the server as connected because anonymous initialization and public tools succeed.
    • Call an account-protected tool; it returns Unauthorized.
    • Open /mcps. The server can only be connected or disconnected with Space. Enter exposes no detail view or Authenticate action.
    • Run opencode mcp auth <server> externally and complete browser authorization.
    • Call the same protected tool again; it succeeds.

    Expected behavior

    The MCP modal should expose Authenticate/Re-authenticate for OAuth-capable remote servers even when their transport status is connected. Alternatively, a protected-tool authorization failure should transition the server to an actionable authentication-required state.

    Actual behavior

    Anonymous connectivity masks the missing OAuth session. The TUI reports connected and offers no authentication path, leaving opencode mcp auth <server> as the only working route.

    This reproduces consistently with Avails. It is also the same detection ambiguity noted in #26195: an MCP server can return HTTP 200 without authentication while protected operations still require OAuth.

  4. ggbdpq commented on Oct 4, 2026

    @ggbdpq

    Context: I opened #53065 proposing an MCP observability surface before finding this exploration (and #34435, closed as completed). This is the right design track, so consolidating — closing mine with a pointer.

    What I can usefully contribute to the "decide what users need to understand at a glance" checklist is failure-mode evidence: there are 10+ open MCP lifecycle issues whose diagnosis is blocked by exactly the facts a panel could surface:

    Concrete data suggestion: the service already tracks per-server status internally; extending the status payload with transport type, pid, child-process count, uptime, and last error/time requires no new architecture and would give this modal a factual floor to design the states on. Happy to draft that status-payload extension as a PR if it's useful to the exploration.

  5. VlexWest commented on Oct 17, 2026

    @VlexWest

    Opened #56452 for the enable/disable part: space in /mcps toggles a server in any state (failed & pending too) & saves it to the config file that defines it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions