[PR #5980] improve mcp CLI + ability to debug MCP oauth #11679

Closed
opened 2026-02-16 18:16:36 -05:00 by yindo · 0 comments
Owner

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

State: closed
Merged: Yes


This PR improves visibility into MCP server auth errors across opencode by providing more details in the opencode mcp ... CLI surface.

It adds an opencode mcp debug <name> command to help debug remote auth flows + shows users a toast when an MCP server fails to auth (vs. failing silently) + shows MCP status when the sidebar header is collapsed.

The toast is probably the most controversial as I don't want to spam users but the current state shows "failure" and requires a user to manually check the status.

  • add opencode mcp auth list to show auth status (authenticated/expired/not authenticated) for all OAuth-capable servers
  • add opencode mcp debug <name> to diagnose OAuth connection issues (shows HTTP response, WWW-Authenticate header, tests OAuth flow)
  • show auth status icons in opencode mcp auth server selection (✓ authenticated, ⚠ expired, ○ not authenticated)
  • show toast notification when MCP server requires auth (instead of failing silently)
  • show (N active, N errors) in collapsed MCP sidebar header
  • fix filter in opencode mcp auth to include all remote servers (OAuth enabled by default) instead of only those with explicit oauth: {} config
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5980 **State:** closed **Merged:** Yes --- This PR improves visibility into MCP server auth errors across opencode by providing more details in the `opencode mcp ...` CLI surface. It adds an `opencode mcp debug <name>` command to help debug remote auth flows + shows users a toast when an MCP server fails to auth (vs. failing silently) + shows MCP status when the sidebar header is collapsed. The toast is probably the most controversial as I don't want to spam users but the current state shows "failure" and requires a user to manually check the status. - add `opencode mcp auth list` to show auth status (authenticated/expired/not authenticated) for all OAuth-capable servers - add `opencode mcp debug <name>` to diagnose OAuth connection issues (shows HTTP response, WWW-Authenticate header, tests OAuth flow) - show auth status icons in `opencode mcp auth` server selection (✓ authenticated, ⚠ expired, ○ not authenticated) - show toast notification when MCP server requires auth (instead of failing silently) - show `(N active, N errors)` in collapsed MCP sidebar header - fix filter in `opencode mcp auth` to include all remote servers (OAuth enabled by default) instead of only those with explicit `oauth: {}` config
yindo added the pull-request label 2026-02-16 18:16:36 -05:00
yindo closed this issue 2026-02-16 18:16:36 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11679