Skip to content

Conversation

@shamil2
Copy link
Contributor

@shamil2 shamil2 commented Dec 14, 2025

Fixes issue where MCP OAuth authentication commands didn't recognize remote MCP servers as OAuth-enabled unless explicitly configured with 'oauth' in the config.

Changes

  • Updated CLI MCP list and auth commands to use MCP.supportsOAuth() function
  • Remote MCP servers now support OAuth by default (matching server behavior)
  • No longer requires explicit 'oauth' config for remote servers to be OAuth-enabled

Root Cause

The CLI was checking !!cfg.oauth but the server enables OAuth for remote servers by default unless oauth: false. This created a mismatch where servers would accept OAuth but the CLI wouldn't show them as OAuth-capable.

Closes #5444

…abled by default

- Updated CLI checks to use MCP.supportsOAuth() instead of requiring explicit oauth config
- Remote MCP servers now support OAuth authentication without needing 'oauth' in config
- Fixes issue where 'opencode mcp auth' showed no OAuth servers for remote configs

Closes anomalyco#5444
@rekram1-node
Copy link
Collaborator

/review

@rekram1-node
Copy link
Collaborator

looks like there are some type errors

@klaudworks
Copy link

@shamil2 will you fix this? o.w. I'll open a new PR

@rekram1-node
Copy link
Collaborator

still has type errors @shamil2

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.

MCP with oauth doesn't work

3 participants