MCP Servers

Import a local MCP OAuth credential

Validates and imports a locally held OAuth credential for an existing MCP server. Temporary mode never stores or refreshes a refresh token. Transfer mode takes ownership of the supplied refresh-token chain. The access token is validated immediately; the refresh token is not exercised until the access token expires because testing it could rotate the local client's token chain. Token values are write-only and never returned.

<sub>Scope: mcp:write</sub>

post/v3/organizations/{orgId}/mcp-servers/{id}/oauth-import

Request

  • Base URL: https://api.reasonmachines.com
  • URL: https://api.reasonmachines.com/v3/organizations/{orgId}/mcp-servers/{id}/oauth-import
  • Auth: HTTP bearer

Request body

mode'temporary' | 'transfer' required
access_tokenstring required

Write-only OAuth access token. Never returned.

refresh_tokenstring

Write-only. Transfer mode only.

expires_atstring date-time required
scopesstring
source_applicationstring required
device_labelstring required
replace_existingboolean

Required as true to replace an existing OAuth connection.

acknowledgement'reason_owns_refresh_token'

Response

Credential imported and verified.

connectedtrue required
mode'temporary' | 'transfer' required
expires_atstring date-time required
refresh_owned_by_reasonboolean required
refresh_testedfalse required

Always false. Testing an imported refresh token could rotate or invalidate the local client's token chain.

Changes

No recorded changes to this operation across all 1 revision of this API.