API key for SSE MCP servers

Guess no news about header support till this day right?

vscode-insiders works nicely

"mcp": {

    "servers": {
        "canvas-server": {
            "type": "sse",
            "url": "http://localhost:8002/sse",
            "headers": {
                "Authorization": "Bearer canvas-6ae3.."
            }
        }
    }
}

It’s kinda irony that Cursor that is supposed to be AI-first comparing to VSCode actually lagging behind in terms of MCP support. ¯_(ツ)_/¯

Any support for api key headers yet? Can not provide access to my service unless I can identify the user - need it for spam, context, quotas etc.

Yes that makes sense, I added my vote to it. Also for security reasons more and more MCP servers will start using OAuth.

This is becoming a requirement for us to enable our in-house MCP, so we’re a bit bummed that it’s not officially supported yet.
Do you have any updates on when this will be available?

2 Likes

This would be a great feature and open up multi tenant MCP servers! Bummer that we don’t have it on cursor yet

This is need of the hour, We want to host MCP’s internally and need to supply tokens user specific instead of hardcoding it in the MCP

Finally, they have it :rocket:
Tested with streamable-http transport (against our Pinecone Assistant remote MCP server).
The relevant section in the docs is updated as well: Cursor – Model Context Protocol

1 Like

How do you authenticate in cursor using streamable?

You can use bearer token for example. See their example in the “Remote Server” tab.

1 Like

So it should be something like this, right? (I dont have a streamable SSE MCP at the moment to test)

{
  "mcpServers": {
    "my-api-server": {
      "url": "https://api.example.com/mcp",
      "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "Content-Type": "application/json"
      }
    }
  }
}
1 Like

Hi team,

Is there already a feature or will we get a feature to read from env for headers?
It’s very critical when the mcp.json is checked into repositories, where we won’t be having users adding there auth headers.

VSCode already has this support through direct env directive or through input syntax in MCP.

It would be great if we have it as well.