Skip to content

Conversation

@elithrar
Copy link
Contributor

@elithrar elithrar commented Dec 22, 2025

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

@elithrar
Copy link
Contributor Author

sidebar now:

image

@elithrar
Copy link
Contributor Author

elithrar commented Dec 22, 2025

opencode mcp debug <name>

image

@elithrar
Copy link
Contributor Author

server w/o auth:

image

@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 1a2b656 into anomalyco:dev Dec 23, 2025
3 checks passed
iljod pushed a commit to iljod/opencode that referenced this pull request Dec 23, 2025
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
Clouder0 added a commit to Clouder0/overcode that referenced this pull request Jan 4, 2026
Merged upstream dev changes into my_dev job system branch.

Conflicts resolved:
- sidebar.tsx: Combined job system UI with upstream TodoItem and MCP count helpers
- compaction.ts: Kept InvalidTool + added upstream prompt replacement feature
- retry.test.ts: Kept both test suites (socket error + ECONNRESET tests)

Upstream features merged:
- Prompt stashing (anomalyco#6021)
- Did you know tips (anomalyco#5982)
- MCP OAuth debug command (anomalyco#5980)
- Cloudflare AI Gateway (anomalyco#5174)
- Install CLI flags (anomalyco#5885)
- Windows CRLF grep fix (anomalyco#5948)
- Dialog keybind blocking fix (anomalyco#6017)
- Model filtering fix (anomalyco#6053)
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.

2 participants