Bug
After completing OAuth for a remote MCP server, opencode mcp auth <name> shows:
┌ MCP OAuth Authentication
│
■ Unexpected status: disabled
│
└ Done
Even though the authentication itself succeeded.
Root Cause
In finishAuth (packages/opencode/src/mcp/index.ts), after OAuth completes successfully, createAndStore(mcpName, mcpConfig) is called with the raw config from getMcpConfig(). If the server has enabled: false (e.g. was previously disconnected), create() short-circuits and returns { status: "disabled" } without attempting to connect.
The authenticate CLI handler doesn't have a case for "disabled" status, so it falls through to the else branch printing "Unexpected status: disabled".
Fix
Pass { ...mcpConfig, enabled: true } to createAndStore in finishAuth, matching what connect() already does.
Bug
After completing OAuth for a remote MCP server,
opencode mcp auth <name>shows:Even though the authentication itself succeeded.
Root Cause
In
finishAuth(packages/opencode/src/mcp/index.ts), after OAuth completes successfully,createAndStore(mcpName, mcpConfig)is called with the raw config fromgetMcpConfig(). If the server hasenabled: false(e.g. was previously disconnected),create()short-circuits and returns{ status: "disabled" }without attempting to connect.The
authenticateCLI handler doesn't have a case for"disabled"status, so it falls through to the else branch printing "Unexpected status: disabled".Fix
Pass
{ ...mcpConfig, enabled: true }tocreateAndStoreinfinishAuth, matching whatconnect()already does.