Skip to main content
POST
Import OAuth tokens

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.

Body

application/json
serverUrl
string
required

The MCP server URL the tokens were obtained for.

tokens
object
required
oauthResourceUrl
string

OAuth protected-resource URL, when it differs from serverUrl.

clientInformation
object

OAuth client used to obtain the tokens. Optional, but without it server-side refresh cannot run — always include it when you provide a refresh_token.

Response

Tokens stored.

imported
boolean
required
expiresAt
number | null

Epoch milliseconds when the stored access token expires, or null if unknown.