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 — Remote MCP servers with Bearer headers fail on Linux (SSE 400, no Streamable HTTP fallback) · Issue #24946 · anomalyco/opencode

Remote MCP servers with Bearer headers fail on Linux (SSE 400, no Streamable HTTP fallback) #24946

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Remote MCP servers with Bearer headers fail on Linux (SSE 400, no Streamable HTTP fallback)#24946
Copy link
Assignees
nexxeln

Description

@ricogu
ricogu
opened on Apr 29, 2026
Issue body actions

Description

Remote MCP servers configured with static Bearer token headers (e.g., GitHub's mcp.github.tools.sap/mcp and api.githubcopilot.com/mcp/) fail to connect on Linux with SSE error: Non-200 status code (400). The same config works on macOS.

Related Issues

  • Unauthenticated streamable HTTP MCP servers are reported as SSE errors instead of missing auth #16247 — Root cause: Streamable HTTP servers reported as SSE errors
  • config Feishu MCP server for open code mmet an Error message:SSE error: Non-200 status code (404) #18724 — Same symptom with Feishu MCP

Environment

  • OpenCode version: 1.14.29
  • OS: Linux (Ubuntu 24.04 arm64, running in Lima VM)
  • macOS host: works fine with identical config and version

Config

{
  "mcp": {
    "github.com": {
      "type": "remote",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer {env:GITHUB_COM_TOKEN}"
      },
      "enabled": true
    }
  }
}

Investigation

  1. Token is valid — curl -s -H "Authorization: Bearer $TOKEN" https://api.github.com/user returns 200
  2. Endpoint is reachable — POST with MCP initialize message returns valid response from inside the VM
  3. SSE GET returns 405/400 — The server only supports POST (Streamable HTTP), not GET (SSE)
  4. macOS works, Linux doesn't — Same binary version, same config. On macOS, opencode falls back to Streamable HTTP. On Linux, it stops at the SSE error.
  5. oauth: false doesn't help — Tried disabling OAuth auto-detection, no change
  6. Other remote MCP servers work — context7, jira, hyperspace portal all connect fine (they use OAuth via mcp-auth.json, not static headers)

Steps to Reproduce

  1. Run opencode 1.14.29 on Linux (e.g., Lima VM with Ubuntu 24.04)
  2. Configure a remote MCP server with Bearer headers pointing to a Streamable HTTP endpoint
  3. Run opencode mcp list
  4. Observe: SSE error: Non-200 status code (400)

Expected Behavior

opencode should fall back from SSE to Streamable HTTP when the SSE probe gets a non-200 response, the same way it does on macOS.

Workaround

None available. The stdio approach (github-mcp-server binary) also fails due to a protocol framing mismatch (Content-Length vs raw JSON lines).

Activity

  1. github-actions
    assigned
    rekram1-node
    on Apr 29, 2026
  2. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    linux
    on Apr 29, 2026
  3. thdxr
    removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    linux
    on May 3, 2026
  4. thdxr
    assigned
    nexxeln
    and unassigned
    rekram1-node
    on May 3, 2026
  5. rekram1-node
    closed this as not plannedon Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

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.