Skip to main content
POST
Set the current user's API key for an api_key MCP server

Authorizations

Authorization
string
header
required

Use Authorization: Bearer

Body

application/json
url
string
required
api_key
string
required
write-only

Response

The updated connection

A user's credential for one external MCP server URL (account-scoped, no secrets exposed). All non-none modes are per-user. A synthesized row (a server the user could connect but hasn't) has a null id and status not_connected.

id
string<uuid> | null
normalized_url
string
status
enum<string>
Available options:
connected,
expired,
revoked,
error,
not_connected
auth_mode
enum<string> | null

Auth mode of the servers using this URL; null for an orphaned connection.

Available options:
oauth,
api_key,
none
has_api_key
boolean

True when this is an api_key connection with a key stored.

server_names
string[]

Names of the enabled servers (across the user's stores) that use this URL.

store_names
string[]
in_use
boolean

False when no enabled server in any of the user's stores still references this URL.

connected_at
string<date-time> | null
last_refreshed_at
string<date-time> | null
token_expires_at
string<date-time> | null