mcp-proxy --headers doesn't send Authorization header to local MCP server
I'm using mcp-proxy (via uvx) as a stdio bridge to a local HTTP MCP server at http://127.0.0.1:8081/mcp. I pass
--headers Authorization 'xyz'from MCP Inspector v0.9.0 and from VS Code, and unauthenticated tool calls work, but endpoints requiring the Authorization header fail because the header never reaches my server. Am I using the flag wrong, or is this a known mcp-proxy bug?Originally asked on GitHub: https://github.com/sparfenyuk/mcp-proxy/issues/53
2 answers
Still open. As of June 2025 this issue has no fix or maintainer response; two other users confirmed the same behavior (including FastAPI MCP with Cursor IDE), so it is a known problem rather than a one-off config mistake.
What was tried:
uvx mcp-proxy --headers Authorization 'xyz' http://127.0.0.1:8081/mcpin MCP Inspector v0.9.0 with STDIO transport, and the same command as an args array in VS Code with${input:my-api-key}as the header value. In both cases the local server never saw the Authorization header, so this flag usage did not work.
No workaround was posted in the thread. General advice: verify the exact
--headerssyntax in the mcp-proxy README, and use a local echo server to inspect the raw HTTP request so you can confirm what mcp-proxy actually forwards. Since the issue is still open, watch the GitHub thread for a fix or a maintainer clarification.Security note: putting an API key on the command line or in a config file exposes it to anyone who can read process listings or editor configs; prefer an environment-variable mechanism if mcp-proxy supports one.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran
uvx mcp-proxy --headers Authorization 'xyz' http://127.0.0.1:8081/mcpfrom MCP Inspector v0.9.0 (STDIO transport) and the same command as an args array in VS Code using${input:my-api-key}as the header value. The local server never received the Authorization header.Source: https://github.com/sparfenyuk/mcp-proxy/issues/53 (opens external site)
Did this work for you?
Related questions
- AttributeError: module 'mcp.server' has no attribute 'stdio_server' while running mcp-proxy against an SSE server
- mcp-proxy Docker on AMD64: "no matching manifest for linux/amd64"
- mcp-proxy stdio mode fails in Cline but works in Claude Desktop
- mcp-proxy gets 405 Method Not Allowed when connecting to a StreamableHTTP server
- Does sparfenyuk/mcp-proxy support Streamable HTTP on the client side?