Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When registering a remote MCP server programmatically using the vscode.cursor.mcp.registerServer() API with RemoteServerConfig, the headers field is silently ignored. Headers such as Authorization and custom
headers (e.g. X-API-Key) are never sent to the MCP server.
Root Cause & Upstream Fix:
I believe this issue was caused by an upstream bug in VS Code’s MCP implementation. The identical issue was reported and resolved in VS Code:
- microsoft/vscode#245828 (MCP Server Configuration: "headers" field incorrectly flagged as invalid and headers not sent · Issue #245828 · microsoft/vscode · GitHub) — “MCP Server Configuration: ‘headers’ field incorrectly flagged as invalid and headers not sent”
The fix was completed in the April 2025 milestone, verified, and released in VS Code Insiders.
Steps to Reproduce
- Register a remote MCP server using the extension API:
vscode.cursor.mcp.registerServer({
name: 'my-remote-server',
server: {
url: 'https://api.example.com/mcp',
headers: {
'Authorization': 'Bearer my-token',
'X-Custom-Header': 'my-value'
}
}
});
- Observe that the MCP server receives no Authorization or custom headers in incoming requests.
Expected Behavior
All headers specified in RemoteServerConfig should be included in requests to the remote MCP server, as documented in the MCP Extension API Reference (MCP Extension API Reference | Cursor Docs).
Operating System
MacOS
Version Information
Version: 2.5.17
VSCode Version: 1.105.1
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770
Date: 2026-02-17T05:58:33.110Z
Build Type: Stable
Release Track: Default
Electron: 39.3.0
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0
Does this stop you from using Cursor
No - Cursor works, but with this issue