GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcp auth returns "Unexpected status: disabled" after successful OAuth on enabled:false servers · Issue #33915 · anomalyco/opencode

mcp auth returns "Unexpected status: disabled" after successful OAuth on enabled:false servers #33915

New issue
Copy link
New issue
Copy link
Closed
#33920
Closed
mcp auth returns "Unexpected status: disabled" after successful OAuth on enabled:false servers#33915
#33920
Copy link
Assignees
rekram1-node

Description

@MaxAnderson95
MaxAnderson95
opened on Jun 25, 2026
Issue body actions

Description

Running opencode mcp auth <name> on a remote MCP server prints Unexpected status: disabled even though the OAuth flow completes fine. The token gets saved, but the CLI reports failure and the server doesn't connect for that run.

It only happens when the server is "enabled": false in the config, which is how I keep MCP servers parked until I actually need one in order to save on context window usage.

The cause is in finishAuth (packages/opencode/src/mcp/index.ts): after OAuth succeeds it calls createAndStore(mcpName, mcpConfig) with the raw config, so enabled: false makes create() short-circuit to { status: "disabled" }. The CLI handler has no case for disabled, so it falls through to "Unexpected status". connect() already avoids this by passing { ...mcp, enabled: true } — finishAuth just needs to do the same.

Same bug and fix were reported in #20278 / PR #20279, but that PR was closed unmerged and the Effect refactor (#19042) carried it forward, so it's still on dev.

OpenCode version

1.17.11

Steps to reproduce

  1. Add a remote MCP server with OAuth and "enabled": false in opencode.json
  2. Run opencode mcp auth <name> and complete the browser OAuth
  3. CLI prints Unexpected status: disabled instead of Authentication successful!

Operating System

macOS (Apple Silicon)

Terminal

Ghostty

Activity

  1. github-actions
    assigned
    rekram1-node
    on Jun 25, 2026
  2. rekram1-node
    added a commit that references this issue on Jun 28, 2026

    fix(mcp): reconnect after OAuth even when server is disabled

    This issue will close once commit 411e053 is merged into the 'dev' branch.
    411e053
  3. rekram1-node
    closed this as completedin #33920on Jun 28, 2026
  4. lacymorrow
    added a commit that references this issue on Jun 29, 2026

    sync: merge upstream/dev catch-up (629 commits) (#31)

    This issue will close once commit 2602aff is merged into the 'lash' branch.
    2602aff
  5. panyw5
    added a commit that references this issue on Jul 3, 2026

    fix(mcp): reconnect after OAuth even when server is disabled

    This issue will close once commit 3174446 is merged into the 'dev' branch.
    3174446
  6. lacymorrow
    added a commit that references this issue on Jul 9, 2026

    fix(test): resolve shell/cwd unit-test failures surfaced by GitHub-ho…

    This issue will close once commit e3cb8f7 is merged into the 'lash' branch.
    e3cb8f7
  7. MarsQiu007
    added a commit that references this issue on Jul 31, 2026

    fix(mcp): reconnect after OAuth even when server is disabled

    This issue will close once commit 98316c5 is merged into the 'main' branch.
    98316c5
  8. rldona
    added a commit that references this issue on Sep 24, 2026

    fix(mcp): reconnect after OAuth even when server is disabled

    This issue will close once commit 990ca8b is merged into the 'main' branch.
    990ca8b
  9. Ichinose-Kazuki
    added a commit that references this issue on Oct 7, 2026

    fix(mcp): reconnect after OAuth even when server is disabled

    This issue will close once commit 60c9b00 is merged into the 'dev' branch.
    60c9b00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.