Feature request for product/service
Cursor IDE
Describe the request
Our internal MCP server (Streamable HTTP) uses bearer tokens that expire after 24 hours. A token comes from a separate token endpoint with Basic auth, and the server has no OAuth. In mcp.json the only option is a static Authorization header, optionally filled from an environment variable with ${env:NAME}. So every day each user has to request a new token, update mcp.json or the variable, and reconnect. After the token expires, Cursor shows a misleading OAuth error instead of the 401 (bug report).
Request: let a remote server entry name a command that prints the request headers as a JSON object. Cursor would run it when it connects to the server, and again when a request gets a 401 or 403, then reconnect with the new headers and retry the request once.
{
"mcpServers": {
"internal": {
"url": "https://mcp.example.com/mcp",
"headersHelper": "/path/to/get-mcp-headers.sh"
}
}
}
Claude Code has this as headersHelper. It also passes the server’s name and URL to the command in environment variables, so one script can serve several servers. Using the same name and behavior would let one script work in both tools.
Our workaround is a local stdio MCP server that forwards to the remote one and adds the header. It works, but every team with this kind of server has to build and maintain one.