Serverdex error reference · read 21 November 2026

MCP server needs authentication (401 Unauthorized): what it means and how to fix it

Needs authentication · 401 Unauthorized · invalid_token

The remote server answered the initialize request with HTTP 401 (or 403): it wants an OAuth sign-in or an API key before it lists tools. The Serverdex live check records exactly this as `needs_auth` — on 21 Nov 2026 about 5,500 listed hosted servers answer this way.

Shown by: Claude Code · Claude Desktop · Cursor · VS Code · Gemini CLI

Causes, most likely first — and the fix for each

  1. 1OAuth-protected server that you have not signed in to yet.

    Fix: Claude Code: `/mcp` → select the server → Authenticate. Cursor: click the server in the MCP panel. VS Code: the sign-in prompt appears on first use. Complete the flow in the browser.

  2. 2API-key server without the key in the headers.

    Fix: Put the key in the `headers` block of the server entry (`"Authorization": "Bearer …"` or the header the server documents).

  3. 3The token expired or was revoked.

    Fix: Sign in again; `invalid_token` in the response body usually means the stored token is stale.

Hosted servers failing this way right now

The Serverdex live check calls every listed hosted MCP server about once a day with a credential-free handshake. 4,801 listed servers last answered with http_401 / http_403. If the one you are adding is here, the error is on the server's side today.

Test any endpoint yourself: MCP server health check · full list of hosted servers: remote MCP servers.

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 OAuth loop (infinite sign-in tabs) · Tools limited to 40 total (Cursor) · executable file not found in $PATH (Antigravity) · MODULE_NOT_FOUND / No module named mcp.server.fastmcp.