opencode
opencode copied to clipboard
Fix MCP OAuth auth commands to recognize remote servers by default
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
/review
looks like there are some type errors
@shamil2 will you fix this? o.w. I'll open a new PR
still has type errors @shamil2