opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Fix MCP OAuth auth commands to recognize remote servers by default

Open shamil2 opened this issue 1 month ago • 4 comments

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

shamil2 avatar Dec 14 '25 22:12 shamil2

/review

rekram1-node avatar Dec 14 '25 22:12 rekram1-node

looks like there are some type errors

rekram1-node avatar Dec 14 '25 22:12 rekram1-node

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

klaudworks avatar Dec 18 '25 08:12 klaudworks

still has type errors @shamil2

rekram1-node avatar Dec 20 '25 03:12 rekram1-node