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.

In this article
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.
Related articles
- MCP and agentsBest MCP Servers for Marketing in 2026Seven servers, from Google Analytics and HubSpot to Klaviyo and Metricool, checked against vendor docs (9 Nov 2026). The best MCP servers for marketing.Read the article
- MCP and agentsClaude Code Pricing: Plans and Costs (2026)Claude Code has no price of its own: it comes with a paid Claude plan or API billing. Here is what Pro, Max, Team and the API cost, checked on 9 Nov 2026.Read the article
- MCP and agentsClaude Code vs Codex vs Cursor: Which to ChoosePick by where you work: the terminal, OpenAI's ecosystem or an editor with the agent built in. Claude Code vs Codex vs Cursor, compared from their docs.Read the article
Put it into practice
- Features and networksSocial media MCP server and API: let your AI agent do the legworkConnect Claude Code, Codex, Cursor or another MCP-compatible agent to Clautia with an API key. Draft, schedule and manage posts by MCP or REST API.Read the guide
- The Agentic Social Media ManagerConnect any AI agent to Clautia with MCPConnect any agent to Clautia's MCP server with a URL and an API key. Check if your agent fits, test the key with curl and handle confirmations.Read the guide
- The Agentic Social Media ManagerSchedule social media posts with Claude CodeConnect Clautia MCP to Claude Code. Your agent drafts and schedules posts on 10 networks (Google Business Profile included) from the terminal.Read the guide

