# Remote MCP server fails with Invalid URL protocol for Stitch endpoint

**URL:** <https://forum.cursor.com/t/remote-mcp-server-fails-with-invalid-url-protocol-for-stitch-endpoint/156221>\
**Category:** Bug Reports\
**Tags:** mcp\
**Created:** [March 30, 2026, 9:41am UTC](https://forum.cursor.com/t/remote-mcp-server-fails-with-invalid-url-protocol-for-stitch-endpoint/156221 "2026-03-30T09:41:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoji\_tegong](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@chaoji\_tegong](https://forum.cursor.com/u/chaoji_tegong)\
**Post date:** [March 30, 2026, 9:41am UTC](https://forum.cursor.com/t/remote-mcp-server-fails-with-invalid-url-protocol-for-stitch-endpoint/156221/1 "2026-03-30T09:41:42Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

I’m trying to use Stitch MCP in Cursor with the official remote MCP setup from Stitch docs.

My mcp.json config is:

{  
“mcpServers”: {  
“stitch”: {  
“url”: “[https://stitch.googleapis.com/mcp](https://stitch.googleapis.com/mcp)”,  
“headers”: {  
“X-Goog-Api-Key”: “REDACTED”  
}  
}  
}  
}  
I’m using the official Stitch MCP endpoint，  
However, Cursor fails to connect and shows this error in the MCP log:

Creating streamableHttp transport  
Connecting to streamableHttp server  
Client error for command Invalid URL protocol: the URL must start with `http:` or `https:`  
Error connecting to streamableHttp server, falling back to SSE: Invalid URL protocol: the URL must start with `http:` or `https:`  
Connecting to SSE server  
Client error for command SSE error: Invalid URL protocol: the URL must start with `http:` or `https:`  
Error connecting to SSE server after fallback: SSE error: Invalid URL protocol: the URL must start with `http:` or `https:`  
A few notes:

The configured URL is already a valid https:// URL.  
This does not look like an API key authentication failure (401/403), because Cursor fails before any normal remote MCP connection seems to be established.  
Earlier I also tested the local npx stitch-mcp approach, but this report is specifically about the remote URL + headers setup.  
The endpoint is reachable over the network. For example, opening it directly with a browser or curl reaches the server, although it returns 405 Method Not Allowed on plain GET, which seems expected for an API endpoint.  
It looks like Cursor may be incorrectly parsing or handling the remote MCP URL for this endpoint, or there may be a compatibility issue in the streamable HTTP / SSE fallback flow.

Has anyone seen this before, or is this a known issue with remote MCP servers using this Stitch endpoint?

### Steps to Reproduce

1. Add a remote MCP server in ~/.cursor/mcp.json using the official Stitch endpoint:  
url = [https://stitch.googleapis.com/mcp](https://stitch.googleapis.com/mcp)  
header = X-Goog-Api-Key: REDACTED
2. Reload MCP / restart Cursor.
3. Enable the Stitch MCP server.  
Result:  
Cursor fails immediately with:  
“Invalid URL protocol: the URL must start with `http:` or `https:`”  
Then it falls back to SSE and fails with the same error.

### Expected Behavior

Cursor should connect normally or return a standard HTTP/auth error instead.

### Operating System

MacOS

### Version Information

Version: 2.6.22

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 30, 2026, 11:21am UTC](https://forum.cursor.com/t/remote-mcp-server-fails-with-invalid-url-protocol-for-stitch-endpoint/156221/5 "2026-03-30T11:21:43Z")

</div>

Hey, this is a known issue with remote MCP servers. It affects multiple endpoints, not just Stitch. Figma, Vercel, and others have the same problem.

The root cause is that Cursor’s MCP client tries to do OAuth discovery during the connection flow, and something in that process builds a malformed URL that fails validation, even though your original `https://` URL is valid.

Sadly, there’s no reliable workaround for remote URL-based MCP servers that hit this. Your best option for now is to use the local `npx stitch-mcp` approach instead:

```json
{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "stitch-mcp"],
      "env": {
        "STITCH_API_KEY": "your-api-key"
      }
    }
  }
}

```

The team knows about this class of issues with remote MCP connections. There’s no timeline yet, but your report helps with prioritization. Let me know if the local approach works for you.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [April 21, 2026, 11:23am UTC](https://forum.cursor.com/t/remote-mcp-server-fails-with-invalid-url-protocol-for-stitch-endpoint/156221/7 "2026-04-21T11:23:03Z")

</div>

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
