Skip to content

mcp: remote server with no stored credentials reports "connected"; failures surface as a 404 saying "correct the request" #53804

Closed as not planned

Description

Description

Configured the Vercel remote MCP in a project opencode.json
("vercel": {"type": "remote", "url": "https://mcp.vercel.com"}) but never ran
opencode mcp auth vercel. From that state every signal points the wrong way:

  • opencode mcp list → ✓ vercel connected
  • auth-scoped tool calls (get_auth_user) fail with the upstream
    404: not_found. User not found. on GET /v2/user, carrying
    remediation: {action: "correct_request"} / "Correct the request before
    retrying" — there is nothing wrong with the request; the server has no identity
  • list_teams and get_git_deployment_context return {"teams": []} as a
    success, which reads as an account/permissions problem

Nothing points at opencode mcp auth <name>. An agent instructed to "surface
the sign-in" has no mechanism to surface one. I only found the cause by reading
~/.local/share/opencode/mcp-auth.json: keys are ["supabase"] — no vercel
entry, i.e. never authenticated, not an expired token.

Expected: either opencode mcp list reports needs_auth for a server with no
stored credentials (the state #53607 describes), or the failed call's error
names opencode mcp auth vercel — the command that fixed #27761.

Environment: opencode v2.0.24, shell /bin/zsh. Related: #27761, #53607.

Plugins

superpowers (plugin); vercel (MCP)

OpenCode version

v2.0.24

Steps to reproduce

  1. Add to opencode.json: "vercel": {"type": "remote", "url": "https://mcp.vercel.com"}
  2. Do not run opencode mcp auth vercel
  3. opencode mcp list → ✓ vercel connected
  4. Call any auth-scoped tool (e.g. get_auth_user) → 404: not_found. User not found.
    with remediation: correct_request

Screenshot or share link

N/A — error payloads quoted above (requestIds available on demand)

Operating System

macOS 26 (Darwin 25.6.0, arm64)

Terminal

VS Code (TERM_PROGRAM=vscode, xterm-256color)

Activity

  1. opencode-agent commented on Oct 7, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report. I couldn't reproduce this on v2.0.24.

    What I tried:

    • I started OpenCode with a clean data directory, so no MCP credentials were stored.
    • I configured {"mcp": {"servers": {"vercel": {"type": "remote", "url": "https://mcp.vercel.com"}}}} and ran opencode mcp list. It prints ⚠ vercel needs authentication, not ✓ connected. https://mcp.vercel.com answers a request without a token with a 401 and a WWW-Authenticate challenge, and that is how OpenCode detects that you need to sign in.
    • With the config shape from your report ("mcp": {"vercel": {...}}, without servers), v2 reports No MCP servers configured.

    Two details point to the opencode you used possibly not being v2:

    • ~/.local/share/opencode/mcp-auth.json is where v1 (opencode-ai) stores MCP credentials. v2 keeps them in the credential table of opencode.db, so a missing vercel key in that file doesn't tell you anything about v2.
    • A vercel entry directly under mcp is the v1 config shape.

    Could you share:

    1. The output of which opencode and opencode --version, run in the same VS Code terminal where you saw ✓ vercel connected. If an agent ran the tools, how was OpenCode started there?
    2. The full mcp section of your opencode.json, with any secrets removed, and whether you have a global config at ~/.config/opencode/opencode.json.
    3. Whether the server still shows as connected after opencode mcp logout vercel and then opencode mcp list.

    Related: #53607 (v2 doesn't import v1 MCP credentials from mcp-auth.json) and the open PR #53468 (sets servers that return 401 only on tool calls to needs_auth, with a hint to run opencode mcp auth <name>).

  2. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    I'm closing this as not planned because we haven't heard back.

    On v2.0.24 with no stored credentials, a Vercel remote MCP server configured under mcp.servers shows as ⚠ vercel needs authentication, not ✓ connected. mcp-auth.json is v1's credential store, and a vercel entry directly under mcp is the v1 config shape. That makes me think the opencode you ran may have been v1 (opencode-ai).

    If it still happens on v2, please comment here with the output of which opencode and opencode --version from the same terminal, plus your mcp config with secrets removed, and we can reopen it. Related: #53607 and #53468.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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