[PR #5780] fix: Make OAuth fully optional for remote MCP servers #11585

Closed
opened 2026-02-16 18:16:27 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5780

State: closed
Merged: No


OAuth is now auto-detected for remote MCP servers - users don't need to
configure anything. The MCP SDK automatically:

  • Detects 401 Unauthorized responses
  • Discovers OAuth metadata from the server
  • Handles dynamic client registration (RFC 7591)
  • Negotiates scopes automatically

Changes:

  • Fix CLI checks to use oauth !== false instead of !!oauth, correctly
    treating undefined as "auto-detect enabled" rather than "disabled"
  • Update CLI messages to reflect that OAuth is auto-detected by default
  • Remove fake example scopes (tools:read) that don't exist in any MCP server

Users can now use a minimal config:

{
  "mcp": {
    "my-server": {
      "type": "remote",
      "url": "https://example.com/mcp"
    }
  }
}
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5780 **State:** closed **Merged:** No --- OAuth is now auto-detected for remote MCP servers - users don't need to configure anything. The MCP SDK automatically: - Detects 401 Unauthorized responses - Discovers OAuth metadata from the server - Handles dynamic client registration (RFC 7591) - Negotiates scopes automatically Changes: - Fix CLI checks to use `oauth !== false` instead of `!!oauth`, correctly treating undefined as "auto-detect enabled" rather than "disabled" - Update CLI messages to reflect that OAuth is auto-detected by default - Remove fake example scopes (tools:read) that don't exist in any MCP server Users can now use a minimal config: ```json { "mcp": { "my-server": { "type": "remote", "url": "https://example.com/mcp" } } } ```
yindo added the pull-request label 2026-02-16 18:16:27 -05:00
yindo closed this issue 2026-02-16 18:16:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11585