Authentication

The MCP endpoint accepts the same three schemes as the REST surface — see Flux API Authentication for the full mechanics of each. An MCP integration turns on two narrower questions: which scheme the client is able to send, and how quickly access can be withdrawn.


Which scheme

Pick by what the client lets you send, not by how sensitive the content is:

SituationScheme
Hosted connector that can only send Authorization: BearerBearer fxk_…
Your own client or server-side integrationSimple or Secure
Public contentno header at all

A hosted connector — the Claude API's mcp_servers[].authorization_token, and hosted connectors generally — takes a single token field and always sends it as Authorization: Bearer <token>. There is no way to make it send Simple or Secure instead, so those connectors need a bearer token or nothing works. A client where you write the header yourself (Claude Code, Cursor, custom code) can send Simple; server-side code that can sign each request should prefer Secure. Public APIs need no header at all — is_auth_required: false accepts anonymous reads.

For the step-by-step of wiring either path into a client, see Connect Claude and Connect ChatGPT and OpenAI.


Bearer tokens

A bearer token is an opaque fxk_ credential bound to an existing Flux API key, not a separate identity. It is shown once, at issue, and is exactly as powerful as its key: role, grants, and per-collection allowed_methods all resolve through the key.

Issuing and revoking bearer tokens are Management API calls — see Flux API Keys → Bearer token for the endpoints and the token format.


Revocation timing

Deleting a key or emptying its role takes effect within about 5 minutes, when a cached permission snapshot expires. Revoking a bearer token also clears its cached entry, so it normally takes effect on the next request, and always within the same 5 minutes.

Revoking or re-issuing a bearer token leaves public_key, secret_key and role untouched, so it can be done without disturbing anything else built on that key.


Authentication errors

When authentication fails, the error message names the check that failed, such as Unsupported bearer token for a Management API JWT sent where a Flux bearer token belongs. See Flux API Authentication → Error Responses for the error body.

Was this page helpful?