improve mcp CLI + ability to debug MCP oauth
#5980
Merged
+333
−23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



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.
opencode mcp auth listto show auth status (authenticated/expired/not authenticated) for all OAuth-capable serversopencode mcp debug <name>to diagnose OAuth connection issues (shows HTTP response, WWW-Authenticate header, tests OAuth flow)opencode mcp authserver selection (✓ authenticated, ⚠ expired, ○ not authenticated)(N active, N errors)in collapsed MCP sidebar headeropencode mcp authto include all remote servers (OAuth enabled by default) instead of only those with explicitoauth: {}config