Serverdex error reference · read 21 November 2026
MCP OAuth loop (infinite sign-in tabs): what it means and how to fix it
OAuth loop · browser keeps opening authorization tabsThe client starts the OAuth flow, the browser completes it, and the client immediately starts it again. The authorization succeeded but the token exchange or the callback did not reach the client, so it retries.
Shown by: Cursor · Claude Code · VS Code
Causes, most likely first — and the fix for each
1The callback URL cannot reach the client: you are on a remote machine, in a container, or over SSH, and the browser runs elsewhere.
Fix: Run the sign-in on the machine that runs the client, forward the callback port over SSH, or use a client flow that lets you paste the redirect URL (Claude Code's `/mcp` and OpenCode's prompt accept a pasted callback URL).
2The server's token endpoint returns an error after a successful authorization (client registration mismatch, wrong redirect URI).
Fix: Delete the stored OAuth credentials for that server and sign in again; if it persists the server's OAuth configuration is wrong — check its docs for a required pre-registered client id.
3Several clients share one stored token file and overwrite each other.
Fix: Sign in from one client at a time; keep per-client configurations.
Still failing?
Work through the twelve general causes in order in MCP server not working: the causes, in order, check the exact config file path and shape for your client in the client setup guides, or generate a known-good config with the config generator.
Sources (read 21 November 2026)
Other MCP errors: MCP error -32000: Connection closed · MCP error -32001: Request timed out · MCP error -32601: Method not found · MCP error -32602: Invalid params · MCP error -32603: Internal error · MCP error -32600: Invalid request · HTTP 406 Not Acceptable from an MCP server · spawn npx ENOENT · spawn uvx ENOENT (and uv, docker) · Server transport closed unexpectedly · Client closed (Cursor) · No tools, prompts, or resources (Cursor) · Unexpected token … is not valid JSON · SSE error: Invalid content type, expected text/event-stream · Could not attach to MCP server (Claude Desktop) · Failed to reconnect to an MCP server (Claude Code) · MCP server needs authentication (401 Unauthorized) · Tools limited to 40 total (Cursor) · executable file not found in $PATH (Antigravity) · MODULE_NOT_FOUND / No module named mcp.server.fastmcp.