Skip to content
← All articles

MCP Authentication: API Keys, OAuth and Safety

Send a bearer token in the Authorization header, never in the URL, or sign in with OAuth. MCP authentication explained, with 401 vs 403 and API keys.

John Guerrero, with a beard and round glassesBy John GuerreroUpdated November 9, 2026
Abstract illustration: a card passing through the slot of a wall, the key travelling with every request

Frequently asked questions

Is authentication required in MCP?

No. The specification says authorization is optional. When a server over an HTTP-based transport supports it, it should follow the specification's OAuth-based flow. Servers that run locally over standard input and output should instead read credentials from the environment.

How does a client send a token to an MCP server?

In the Authorization header as Authorization: Bearer <token>, on every HTTP request. The specification says the token must not go in the URL query string.

What is the difference between an API key and OAuth for MCP?

An API key is a long-lived secret you create once and paste into the client's settings. OAuth lets the user sign in and approve access in a browser, and the client receives short-lived tokens it can refresh. API keys are simpler to set up for developers. OAuth is friendlier for people who should never handle a secret.

What does Clautia use today?

An API key sent as Authorization: Bearer <API_KEY> to https://app.clautia.com/api/mcp. An owner or admin creates the key with a name and scopes, the full key is shown once, and it can be revoked at any time.

What do the 401 and 403 errors mean?

A 401 means authorization is missing or the token is invalid, expired or revoked. A 403 means the credential is valid but lacks permission for that action. In Clautia, a 403 usually means the key is missing a scope such as posts:write or ai:write.

Can an AI agent be trusted with an API key?

Only with limits. Use the narrowest scopes the job needs, keep the key in an environment variable, revoke it when the project ends and rely on confirmations for destructive actions. Remember the agent acts on your behalf, so what it can do is what the key allows.

Does Clautia support OAuth for MCP?

Not yet. Today Clautia connects with an API key in the Authorization header. OAuth (one-click connection) is not available yet. Agents that cannot send a bearer key are not supported for now.