[PR #6960] fix: enable MCP server after OAuth completion #12176

Open
opened 2026-02-16 18:17:06 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


Summary

  • Fix opencode mcp auth <server> returns "Unexpected status: disabled" after successful OAuth

When running opencode mcp auth <server>, users see:
┌ MCP OAuth Authentication

■ Unexpected status: disabled

└ Done

I have some MCPs which are disabled by default: enabled:false. The create() function returns { status: "disabled" } for disabled servers, which the CLI doesn't handle.

Toggling the server via /mcp in the TUI works as connect() explicitly sets enabled: true.

FIX:

After successful OAuth completion, always enable the server (If a user is actively authenticating an MCP server, they want it enabled)

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6960 **State:** open **Merged:** No --- Summary - Fix `opencode mcp auth <server>` returns "Unexpected status: disabled" after successful OAuth When running `opencode mcp auth <server>`, users see: ┌ MCP OAuth Authentication │ ■ Unexpected status: disabled │ └ Done I have some MCPs which are disabled by default: `enabled:false`. The `create()` function returns `{ status: "disabled" }` for disabled servers, which the CLI doesn't handle. Toggling the server via `/mcp` in the TUI works as `connect()` explicitly sets `enabled: true`. FIX: After successful OAuth completion, always enable the server (If a user is actively authenticating an MCP server, they want it enabled)
yindo added the pull-request label 2026-02-16 18:17:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12176