MCP Gateway
ApiMcp servers

Configure server OAuth

Configure OAuth for an MCP server, enabling per-user OAuth authentication. The client_secret is encrypted at rest using AES-256-GCM.

POST
/api/v1/servers/{server_id}/oauth-config

Path Parameters

server_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/servers/497f6eca-6276-4993-bfeb-53cbbbba6f08/oauth-config" \  -H "Content-Type: application/json" \  -d '{    "provider": "string",    "client_id": "string",    "client_secret": "string",    "authorize_url": "string",    "token_url": "string"  }'
{
  "provider": "string",
  "client_id": "string",
  "client_secret_masked": "string",
  "authorize_url": "string",
  "token_url": "string",
  "refresh_url": "string",
  "scopes": [
    "string"
  ],
  "token_endpoint_auth_method": "string",
  "pkce_required": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}