Skip to content

OpenCode MCP Auth in GitHub Codespaces redirects to a non-existent page #342

Description

@affan2021shaikh

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs and GitHub Discussions.
  • I confirm I have searched the Discord.

Describe the bug

When authenticating Supabase MCP in OpenCode, after clicking Authorize OpenCode, it redirects to http://127.0.0.1:19876/mcp/oauth/callback&state=**************************************************************** which has no response data at all. This happens in GitHub Codespaces.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to 'https://github.com/codespaces'
  2. Click on '`New codespace'
  3. Pick any options
  4. Run the following in the terminal:
npm i -g opencode-ai
cat > .opencode/opencode.json <<'EOF'
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "supabase": {
      "type": "remote",
      "url": "https://mcp.supabase.com/mcp?project_ref=tiokvmuyfgcnagnelpib&features=docs%2Caccount%2Cdatabase%2Cdebugging%2Cdevelopment%2Cfunctions%2Cbranching%2Cstorage",
      "enabled": true
    }
  }
}
EOF
opencode mcp auth supabase
  1. Wait and when it appears, ⌘-click on the link.
  2. Click Authorize OpenCode.

Expected behavior

Closure of tab and authentication confirmation in terminal.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS Tahoe 26.5.2 (25F84)
  • Browser: Firefox Nightly (155.0a1 (2026-07-21) (aarch64))
  • Version of Node.js: v24.14.0

Additional context

Same problem has happened before with Gemini CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions