{"license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/","attribution":"Credit the site and link to the page the figure came from."},"source":{"name":"Best MCP Servers","url":"https://bestmcpservers.dev/blog/mcp-server-authentication-oauth-api-keys/","home":"https://bestmcpservers.dev/","method":"https://bestmcpservers.dev/methodology/","data_month":"Dec 2026","note":"Compiled from public web pages. The page behind each fact is listed in `sources` where a document has one."},"generated_at":"2026-12-05T20:00:00.000Z","site":{"key":"mcp","name":"Best MCP Servers","domain":"bestmcpservers.dev"},"slug":"mcp-server-authentication-oauth-api-keys","url":"https://bestmcpservers.dev/blog/mcp-server-authentication-oauth-api-keys/","json":"https://bestmcpservers.dev/blog/mcp-server-authentication-oauth-api-keys.json","title":"MCP server authentication: API keys, OAuth or none","description":"2,035 of 3,152 MCP server READMEs mention API keys and 726 mention OAuth. What each means for your client config, and why hosted servers lean to OAuth.","author":"Editorial desk","published_at":"2026-12-05","updated_at":"2026-12-05","tags":[],"reading_minutes":5,"sources":[{"url":"https://bestmcpservers.dev/methodology/","title":"Best MCP Servers: methodology"},{"url":"https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization","title":"MCP specification: authorization"}],"faq":[{"q":"How do most MCP servers authenticate?","a":"With an API key: 2,035 of the 3,152 servers listed on 2 December 2026 mention one in their README or registry entry. 726 mention OAuth, 17 say no authentication, and 1,013 do not say."},{"q":"Do hosted MCP servers use OAuth?","a":"More often than local ones: 384 of the 879 servers that name Streamable HTTP mention OAuth (44%). Among the 2,501 stdio servers, 1,625 mention an API key."},{"q":"Where does the API key go?","a":"For a stdio server, into the env block of the client config. The config generator on this site writes a placeholder such as <YOUR_API_KEY> so a real key never lands in a shared file."},{"q":"Is a server with no auth safe?","a":"Only if it touches nothing private. A local server with no auth still runs with your user's file and network access."}],"body_markdown":"Most MCP servers connect your agent to something that needs a credential: a database, a SaaS account, a cloud API. How the server asks for that credential decides where secrets live and how you revoke them. The MCP specification defines an OAuth-based flow for HTTP servers; local stdio servers usually read a key from an environment variable.\n\n<!-- chart:auth-transport -->\n<figure class=\"mx-pfig\"><figcaption>OAuth goes with remote servers: 44% of HTTP servers mention it, 15% of stdio-only ones</figcaption><svg class=\"sbars\" width=\"100%\" height=\"166\" role=\"img\" aria-label=\"OAuth goes with remote servers: 44% of HTTP servers mention it, 15% of stdio-only ones. Streamable HTTP servers: 384 of 879; SSE servers: 51 of 173; stdio-only servers: 312 of 2,062\" xmlns=\"http://www.w3.org/2000/svg\"><text x=\"0\" y=\"16\" class=\"sb-l\">Streamable HTTP servers</text><text x=\"100%\" y=\"16\" text-anchor=\"end\" class=\"sb-v\">44% (384 of 879)</text><rect x=\"0\" y=\"23\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"23\" width=\"88.00%\" height=\"10\" rx=\"5\" class=\"sb-b lead\"/><text x=\"0\" y=\"56\" class=\"sb-l\">SSE servers</text><text x=\"100%\" y=\"56\" text-anchor=\"end\" class=\"sb-v\">29% (51 of 173)</text><rect x=\"0\" y=\"63\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"63\" width=\"58.00%\" height=\"10\" rx=\"5\" class=\"sb-b\"/><text x=\"0\" y=\"96\" class=\"sb-l\">stdio-only servers</text><text x=\"100%\" y=\"96\" text-anchor=\"end\" class=\"sb-v\">15% (312 of 2,062)</text><rect x=\"0\" y=\"103\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"103\" width=\"30.00%\" height=\"10\" rx=\"5\" class=\"sb-b\"/><line x1=\"0\" x2=\"100%\" y1=\"126\" y2=\"126\" class=\"sb-ax\"/><line x1=\"0.00%\" x2=\"0.00%\" y1=\"126\" y2=\"131\" class=\"sb-ax\"/><text x=\"0.00%\" y=\"144\" text-anchor=\"start\" class=\"sb-k\">0%</text><line x1=\"50.00%\" x2=\"50.00%\" y1=\"126\" y2=\"131\" class=\"sb-ax\"/><text x=\"50.00%\" y=\"144\" text-anchor=\"middle\" class=\"sb-k\">25%</text><line x1=\"100.00%\" x2=\"100.00%\" y1=\"126\" y2=\"131\" class=\"sb-ax\"/><text x=\"100.00%\" y=\"144\" text-anchor=\"end\" class=\"sb-k\">50%</text><text x=\"0\" y=\"161\" class=\"sb-a\">% of each group</text></svg><p class=\"ax\">Bars: share of each group whose README or registry entry mentions OAuth, scaled to the highest share.</p><p class=\"src\">Source: Best MCP Servers dataset (official MCP Registry entries, READMEs and the GitHub API), read 2 December 2026.</p></figure>\n<!-- /chart:auth-transport -->\n\nFigures are counted on 2 December 2026 over the 3,152 servers this site lists. Auth is read from the README and the registry entry by keyword rules, so the site says a server \"mentions\" OAuth rather than that it was tested.\n\n## What the index shows\n\n<!-- chart:auth -->\n<figure class=\"mx-pfig\"><figcaption>API keys lead: 65% of servers mention one, 23% mention OAuth</figcaption><svg class=\"sbars\" width=\"100%\" height=\"206\" role=\"img\" aria-label=\"API keys lead: 65% of servers mention one, 23% mention OAuth. API key: 2,035 of 3,152; OAuth: 726 of 3,152; Not stated: 1,013 of 3,152; No authentication: 17 of 3,152\" xmlns=\"http://www.w3.org/2000/svg\"><text x=\"0\" y=\"16\" class=\"sb-l\">API key</text><text x=\"100%\" y=\"16\" text-anchor=\"end\" class=\"sb-v\">65% (2,035)</text><rect x=\"0\" y=\"23\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"23\" width=\"92.86%\" height=\"10\" rx=\"5\" class=\"sb-b lead\"/><text x=\"0\" y=\"56\" class=\"sb-l\">OAuth</text><text x=\"100%\" y=\"56\" text-anchor=\"end\" class=\"sb-v\">23% (726)</text><rect x=\"0\" y=\"63\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"63\" width=\"32.86%\" height=\"10\" rx=\"5\" class=\"sb-b\"/><text x=\"0\" y=\"96\" class=\"sb-l\">Not stated</text><text x=\"100%\" y=\"96\" text-anchor=\"end\" class=\"sb-v\">32% (1,013)</text><rect x=\"0\" y=\"103\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"103\" width=\"45.71%\" height=\"10\" rx=\"5\" class=\"sb-b\"/><text x=\"0\" y=\"136\" class=\"sb-l\">No authentication</text><text x=\"100%\" y=\"136\" text-anchor=\"end\" class=\"sb-v\">1% (17)</text><rect x=\"0\" y=\"143\" width=\"100%\" height=\"10\" rx=\"5\" class=\"sb-t\"/><rect x=\"0\" y=\"143\" width=\"1.43%\" height=\"10\" rx=\"5\" class=\"sb-b\"/><line x1=\"0\" x2=\"100%\" y1=\"166\" y2=\"166\" class=\"sb-ax\"/><line x1=\"0.00%\" x2=\"0.00%\" y1=\"166\" y2=\"171\" class=\"sb-ax\"/><text x=\"0.00%\" y=\"184\" text-anchor=\"start\" class=\"sb-k\">0%</text><line x1=\"50.00%\" x2=\"50.00%\" y1=\"166\" y2=\"171\" class=\"sb-ax\"/><text x=\"50.00%\" y=\"184\" text-anchor=\"middle\" class=\"sb-k\">35%</text><line x1=\"100.00%\" x2=\"100.00%\" y1=\"166\" y2=\"171\" class=\"sb-ax\"/><text x=\"100.00%\" y=\"184\" text-anchor=\"end\" class=\"sb-k\">70%</text><text x=\"0\" y=\"201\" class=\"sb-a\">% of 3,152 servers</text></svg><p class=\"ax\">Bars: share of all 3,152 listed servers by what the README or registry entry mentions; a server can mention several.</p><p class=\"src\">Source: Best MCP Servers dataset (official MCP Registry entries, READMEs and the GitHub API), read 2 December 2026.</p></figure>\n<!-- /chart:auth -->\n\n\n| Auth mentioned | Servers | Share of 3,152 |\n|---|---:|---:|\n| API key | 2,035 | 65% |\n| OAuth | 726 | 23% |\n| No authentication | 17 | under 1% |\n| Not stated | 1,013 | 32% |\n\nA server can mention both an API key and OAuth, so the rows add up to more than 3,152. Browse them: [MCP servers with OAuth](/mcp-servers/auth/oauth/) and [MCP servers with an API key](/mcp-servers/auth/api-key/).\n\n## Hosted servers lean to OAuth\n\nOf the 879 servers that name Streamable HTTP, 384 (44%) mention OAuth. Of the 2,501 that name stdio, 1,625 (65%) mention an API key. That split follows the specification: an HTTP server can send the client through a browser sign-in and get a scoped, revocable token; a local process just reads its environment.\n\n## What it means for your config\n\n- **API key, stdio:** the key goes in the `env` block of `claude_desktop_config.json`, `.mcp.json` or the Cursor file. Keep that file out of git, or keep placeholders in git and real values in your shell. The [config generator](/tools/mcp-json-generator/) always writes placeholders.\n- **OAuth, HTTP:** the config holds only the URL. The client opens a browser the first time; revoke access in the vendor's account settings.\n- **Not stated:** read the README before you run it. 1,013 servers do not say.\n\n## A short checklist\n\n1. Prefer OAuth for anything with write access to an account you care about.\n2. Give API keys the smallest scope the vendor offers, and one key per client.\n3. For local servers with no auth, check what the server can reach: files, network, shell.\n4. Prefer servers from the maker of the product for credentialed access; the [security servers](/security-mcp-servers/) group lists the tools that audit the rest.\n\nThe score and the keyword rules are on the [methodology page](/methodology/)."}