MCP server authentication: API keys, OAuth or none

Published 5 Dec 2026 · Updated 5 Dec 2026 · By Editorial desk

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.

OAuth goes with remote servers: 44% of HTTP servers mention it, 15% of stdio-only ones
Streamable HTTP servers44% (384 of 879)SSE servers29% (51 of 173)stdio-only servers15% (312 of 2,062)0%25%50%% of each group

Bars: share of each group whose README or registry entry mentions OAuth, scaled to the highest share.

Source: Best MCP Servers dataset (official MCP Registry entries, READMEs and the GitHub API), read 2 December 2026.

Figures 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.

What the index shows

API keys lead: 65% of servers mention one, 23% mention OAuth
API key65% (2,035)OAuth23% (726)Not stated32% (1,013)No authentication1% (17)0%35%70%% of 3,152 servers

Bars: share of all 3,152 listed servers by what the README or registry entry mentions; a server can mention several.

Source: Best MCP Servers dataset (official MCP Registry entries, READMEs and the GitHub API), read 2 December 2026.

Auth mentioned Servers Share of 3,152
API key 2,035 65%
OAuth 726 23%
No authentication 17 under 1%
Not stated 1,013 32%

A 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 and MCP servers with an API key.

Hosted servers lean to OAuth

Of 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.

What it means for your config

  • 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 always writes placeholders.
  • OAuth, HTTP: the config holds only the URL. The client opens a browser the first time; revoke access in the vendor's account settings.
  • Not stated: read the README before you run it. 1,013 servers do not say.

A short checklist

  1. Prefer OAuth for anything with write access to an account you care about.
  2. Give API keys the smallest scope the vendor offers, and one key per client.
  3. For local servers with no auth, check what the server can reach: files, network, shell.
  4. Prefer servers from the maker of the product for credentialed access; the security servers group lists the tools that audit the rest.

The score and the keyword rules are on the methodology page.

Guides