claude-code - 💡(How to fix) Fix MCP SSE transport ignores relative endpoint URLs; Streamable HTTP (type: http) silently not loaded

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

When an MCP server entry uses "type": "http", Claude Code never connects to it and it does not appear in claude mcp list. No error is reported.

Fix Action

Workaround

Use supergateway as a stdio proxy. Its SSE client (MCP TypeScript SDK) correctly resolves relative endpoint URLs:

"visualstudio": {
  "command": "npx",
  "args": ["-y", "supergateway", "--sse", "http://localhost:5050/sse"]
}

Code Example

{
  "servers": {
    "visualstudio": {
      "type": "http",
      "url": "http://localhost:5050"
    }
  }
}

---

event: endpoint
data: /message?sessionId=<GUID>

---

"visualstudio": {
  "type": "sse",
  "url": "http://localhost:5050/sse"
}

---

"visualstudio": {
  "command": "npx",
  "args": ["-y", "supergateway", "--sse", "http://localhost:5050/sse"]
}
RAW_BUFFERClick to expand / collapse

Claude Code version: 2.1.140 (also present in 2.1.139) Platform: Windows 10


Bug 1 — "type": "http" entries in .mcp.json are silently ignored

When an MCP server entry uses "type": "http", Claude Code never connects to it and it does not appear in claude mcp list. No error is reported.

Repro:

{
  "servers": {
    "visualstudio": {
      "type": "http",
      "url": "http://localhost:5050"
    }
  }
}

Expected: Claude Code sends a POST to http://localhost:5050/ with an initialize JSON-RPC message. Actual: Server never appears in claude mcp list; no requests reach the server.


Bug 2 — "type": "sse" transport never sends initialize when endpoint URL is relative

When an MCP server responds to GET /sse with a relative URL in the event: endpoint event, Claude Code's SSE client never sends the initialize POST.

VS MCP server response to GET /sse:

event: endpoint
data: /message?sessionId=<GUID>

Per the MCP spec, clients must resolve this relative path against the SSE base URL (http://localhost:5050/ssehttp://localhost:5050/message?sessionId=...). The MCP TypeScript SDK handles this correctly with new URL(event.data, baseUrl). Claude Code does not — the SSE connection sits idle until the server closes it (~5 s).

Repro:

"visualstudio": {
  "type": "sse",
  "url": "http://localhost:5050/sse"
}

Expected: POST to http://localhost:5050/message?sessionId=<GUID> with initialize. Actual: No POST sent; server receives only the initial GET and eventually closes the connection.


Workaround

Use supergateway as a stdio proxy. Its SSE client (MCP TypeScript SDK) correctly resolves relative endpoint URLs:

"visualstudio": {
  "command": "npx",
  "args": ["-y", "supergateway", "--sse", "http://localhost:5050/sse"]
}

Reproduction server

Visual Studio MCP extension (VS 2022, any recent version). Runs at http://localhost:5050 while VS is open. Emits a relative URL in the SSE endpoint event and exposes a Streamable HTTP endpoint at POST /.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix MCP SSE transport ignores relative endpoint URLs; Streamable HTTP (type: http) silently not loaded