[BUG] Claude Code can't use HTTP MCP servers with API key authentication
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I have an HTTP MCP server that requires Bearer token auth. Works fine with curl and regular VS Code chat, but Claude Code extension it won't send the Authorization header from mcp.json. It just shows the OAuth gate instead of accessing the actual tools. Claude Code needs to actually send these headers.
What Should Happen?
Claude Code should send the custom Authorization header from mcp.json when connecting to the HTTP MCP server, so it can authenticate and access all available tools instead of being blocked by OAuth.
Error Messages/Logs
Steps to Reproduce
Add an HTTP MCP to ~/.config/Code/User/mcp.json that requires Bearer token auth:
{
"servers": {
"test-mcp": {
"type": "http",
"url": "https://your-mcp-endpoint.com/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}
Open Claude Code and try to use ToolSearch for that MCP
Notice Claude Code only shows OAuth authentication options instead of the actual tools from the server
Verify the server works by running: curl -H "Authorization: Bearer your-api-key" https://your-mcp-endpoint.com/mcp - it returns tools successfully
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Opus 4.8
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗