[BUG] HTTP MCP server without auth triggers OAuth probe in VS Code extension, fails with 404
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?
Description
When an HTTP-type MCP server is configured without authentication (auth.type: none or no auth block), the VS Code extension incorrectly probes for OAuth endpoints, causing a 404 error and making the MCP server unusable in VS Code. The same configuration works correctly in the CLI.
Actual Behavior
Authentication fails with:
SDK auth failed: HTTP 404: Invalid OAuth error response: SyntaxError: JSON Parse error: Unexpected identifier "Not". Raw body: Not Found
The extension probes /.well-known/oauth-authorization-server (or similar OAuth discovery endpoint), gets a 404, and misinterprets it as an auth failure.
Additional Context
The server correctly handles unauthenticated MCP connections — initialize returns 200 with a valid response
The CLI (claude chat) connects successfully to the same server with the same .mcp.json
claude mcp list (run outside the session) shows the server as "✓ Connected"
Workaround: use the CLI instead of the VS Code extension
Setting "auth": {"type": "none"} explicitly does not prevent the OAuth probe
Environment
Claude Code CLI: 2.1.44
Claude Code VS Code extension: 2.1.101
OS: macOS 14 (Darwin 24.1.0)
MCP server: custom HTTP server (uvicorn/fastmcp, MCP protocol version 2025-03-26)
What Should Happen?
MCP Server should work via VS Code Extension
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
Configure an HTTP MCP server in .mcp.json with no authentication:
{
"mcpServers": {
"snowflake": {
"type": "http",
"url": "https://your-mcp-server.example.com/path"
}
}
}
Open the project in VS Code with the Claude Code extension
Open /mcp — the server appears with an "Authenticate" button
Click "Authenticate"
Expected Behavior
The extension should connect directly without prompting for authentication, since the server accepts unauthenticated connections (responds 200 to MCP initialize).
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
CLI 2.1.44, VS Code Extension 2.1.44
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗