OAuth

Import OAuth tokens

Changed on

Stores OAuth tokens you obtained yourself (e.g. via the SDK's runOAuthLogin — interactive loopback, headless, or client-credentials) for this server, scoped to your user, project, and server. Subsequent API calls against the server inject the stored access token automatically, and 401s from the server trigger a server-side refresh — no further caller involvement.

This closes the loop after an OAUTH_REQUIRED error.

post/projects/{projectId}/servers/{serverId}/oauth/import-tokens

Request

  • Base URL
    https://app.mcpjam.com/api/v1
  • URL
    https://app.mcpjam.com/api/v1/projects/{projectId}/servers/{serverId}/oauth/import-tokens
  • Auth
    HTTP bearer

Path parameters

projectIdstring required

ID of the hosted project that contains the server.

serverIdstring required

ID of the server inside the project.

Request body

serverUrlstring required

The MCP server URL the tokens were obtained for.

oauthResourceUrlstring

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

Response

Tokens stored.

importedtrue required
expiresAtnumber nullable

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

Changes

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • warning

      added the new CONFLICT enum value to the response property for the response status

    • info

      endpoint added