Remote MCP server fails with Invalid URL protocol for Stitch endpoint

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”,
“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
    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

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:

{
  "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.