Skip to main content
POST
Create MCP OAuth Connection

Endpoint

POST /v3/tools/credentials/oauth

Description

Create a named OAuth connection. Match the server’s grant type. For authorization_code, supply an allowed redirect_url, open the returned auth_url in a browser, and refresh the connection status after sign-in. For client_credentials, no browser sign-in is needed.

Authentication

API key (x-api-key) in the header.

Request

Response

Returns credential_id and status. An authorization-code connection also returns auth_url, state, and expires_at.

Authorizations

x-api-key
string
header
required

Body

application/json
provider_uuid
string
required

MCP server ID returned by List MCP Servers.

credential_name
string
required

Display name for this connection.

user_id
string
required

Your user ID, such as your account email.

grant_type
enum<string>
default:authorization_code
Available options:
authorization_code,
client_credentials
redirect_url
string

Required for authorization_code.

client_id
string

Optional OAuth client override.

client_secret
string

Optional secret for the override; requires client_id.

Response

Successful response

credential_id
string

ID of the named connection.

status
enum<string>
Available options:
success,
pending,
failed
external_ref
object
auth_url
string

Browser sign-in URL for authorization_code.

state
string

OAuth state for authorization_code.

expires_at
string<date-time>