Hi Prakhar P., are you using API Key Authenticator for your MCP server authentication?
If so, I suspect the issue may be related to how the Authorization header is being passed to mcp-remote. When specified as:
--header Authorization:Bearer <token> the shell may split the argument, causing mcp-remote to receive only Authorization:Bearer while dropping the actual token value. A couple of approaches that should work:
Option 1: Quote the entire header value
--header "Authorization:Bearer <token>"
Option 2: Pass the token via an environment variable
{
"args": [
"mcp-remote",
"http://mcp-server-url",
"--allow-http",
"--header",
"Authorization:${AUTH_TOKEN}"
],
"env": {
"AUTH_TOKEN": "Bearer 123"
}
}Using an environment variable is generally safer and avoids potential shell parsing issues altogether.