I need a way to pass api key to MCP server. This is not needed for cli mcp but when we add an SSE mcp we should have an additional box called API key and then cursor ahould pass it as authroization or X-API-Key header when making requests to the sse and messages endpoints.
1 Like
need this as well
+1
The config JSON should be able to forward headers.
I added bearer token to the inspector for debugging, but general headers is better. Also, the Cursor docs shows (probably copy-paste mistake) that you can pass a key to the ssh, you can rename the “env” and pass the token in “Authorization” header
I connect to Home Assistant via SSE by the below configuration. It requests the token embedded in header authorization. Looks failure. Is my configuration correct?
Home Assistant log found: Login attempt or request with invalid authentication from x.x.x.x . Requested URL: '/mcp_server/sse'. (node)
{
"mcpServers": {
"Home Assistant": {
"url": "http://192.x.x.x:8123/mcp_server/sse",
"env": { "API_KEY": "xyz123"}
}
}
}