Skip to content
Hexel StudioDocs

Create an MCP OAuth auth config by discovery

POST/titan/tools/auth-configs/mcp-oauth

Discovers the registered MCP server's authorization (RFC 9728 protected-resource metadata, RFC 8414 or OpenID Connect authorization-server metadata), registers a client (RFC 7591) unless a pre-registered client is given, and creates an oauth2 auth config with pkce S256 and the RFC 8707 resource indicator. Connect with POST /v1/connections/initiate. Requires permission tool-gateway:auth:write.

Headers

Bearer <token>. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

X-Workspace-Idoptional string

Workspace scope used by permission checks, if applicable.

X-Environment-Idoptional string

Optional environment scope.

Body parameters

clientoptional object

Client is a pre-registered client; omitted registers one with RFC 7591.

nameoptional string

RedirectURI is the OAuth callback the client registers and later authorization requests use.

resource_metadata_urloptional string

ResourceMetadataURL is an RFC 9728 metadata URL to use instead of probing the server.

scopesoptional array of string

ToolkitSlug is the MCP toolkit MCP_<SERVER>; its registered server is the one discovered.

workspace_idoptional string

Returns

201CreatedMCPOAuthConfigResponse

auth_configoptional AuthConfig
discoveryoptional ToolsPlan

Errors

  • 400Bad Request
  • 401Unauthenticated: token missing or rejected at the edge
  • 403Forbidden: caller lacks the required permission
  • 502Bad Gateway