Skip to main content
PATCH
Rename a server account or make it the default

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

serverId
string
required

ID of the server inside the project.

account
string
required

The account's id, or its name. A well-formed account id is matched as an id; anything else is a name, matched ignoring case.

Body

application/json

At least one of the two.

name
string

Letters, digits, ., _ and -, starting with a letter or digit, at most 64 characters. A name outside the rule answers 400 with details.code: "invalid_account_name" rather than being cleaned up, and so does a name that is also a well-formed account id. Unique on the server, ignoring case.

Pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
isDefault
enum<boolean>

Make this the default account. false is refused: to move the default, set it on another account.

Available options:
true

Response

The account.

One account a saved server signs in with. METADATA ONLY: no account response carries a token, a vault id, an email or any other recorded profile field.

id
string
required

Never changes, including while the account needs reconnecting. An eval suite's saved account choice stores it.

name
string | null
required

Your own label, or null for an account nobody named. Nothing checks it against who the token belongs to.

kind
enum<string>
required

project accounts belong to a server shared with the project; project admins manage them.

Available options:
personal,
project
isDefault
boolean
required

The effective default: the account marked as default, else the oldest. Runs with no saved account choice act as it.

needsReconnect
boolean
required

The issuer rejected a refresh, or the token expired with no refresh token stored. Upload a fresh token to restore it; the id stays.

hostedOnly
boolean
required

Hosted runs use the account, and no local app, browser or sandbox receives its token. True for accounts written by PUT .../accounts/{account} and for project accounts.

expiresAt
integer | null
required

When the access token expires, epoch milliseconds.

createdAt
integer
required
updatedAt
integer
required