anomalyco / anomalyco/opencode

MCP server type 'remote' fails with 405 against local MCP endpoints requiring POST transport

Open
#40,195 1 comment 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 3, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Bug: MCP local server (type: remote) fails with 405 against Supabase local MCP endpoint

Description

When configuring an MCP server with type: "remote" pointing to a local Supabase MCP endpoint (Supabase CLI MCP), OpenCode gets Non-200 status code (405) and reports "SSE error".

Root Cause

The Supabase CLI MCP endpoint does NOT support SSE (GET). It only accepts POST JSON-RPC after the MCP handshake. OpenCode with type: "remote" sends an SSE-style GET request, which the endpoint rejects with 405.

Config (from official Supabase Studio instructions)
{
  "mcp": {
    "supabase-local": {
      "type": "remote",
      "url": "http://127.0.0.1:54321/mcp?features=docs%2Cdatabase%2Cdebugging%2Cdevelopment",
      "enabled": true
    }
  }
}
Evidence
  1. supabase status confirms MCP is running on the endpoint
  2. OpenCode panel shows: supabase-local SSE error: Non-200 status code (405)
  3. Direct curl POST works with JSON-RPC
  4. psql direct connection works (schema and database fully functional)
Expected Behavior

OpenCode should use POST-based MCP transport for type: "remote" servers that don't support SSE, or negotiate the transport protocol during handshake.

Workaround

Use psql directly on port 54322 with the local Postgres instance.

Environment
  • OpenCode version: latest
  • OS: Linux
  • Supabase CLI: local dev MCP server
  • The endpoint serves MCP over POST, not SSE

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.