AI
Complete the vendor OAuth flow for an MCP server connection.
Verifies the state/link_token belongs to the authenticated customer, exchanges the vendor authorization code for tokens, encrypts them at rest, and creates (or updates, for a reconnect) the customer's McpServer row.
post/mcpservers/oauth/complete
Request body
Example request
{
"state": "9f2c1e7a4b3d4f5e8a9b0c1d2e3f4a5b",
"code": "8a3b1c9d0e2f"
}Response
The connected MCP server.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"customer_id": "7c4d2f3a-1b8e-4f5c-9a6d-3e2f1a0b4c5d",
"name": "Internal Ticketing System",
"detail": "Exposes ticket lookup/creation tools to the LLM.",
"url": "https://mcp.example.com/mcp",
"status": "active",
"auth_type": "bearer",
"api_key_header": "X-API-Key",
"oauth_vendor": "github",
"has_secret": true,
"tm_create": "2026-01-15T09:30:00.000000Z",
"tm_update": "2026-01-15T09:30:00.000000Z",
"tm_delete": "2026-01-15T09:30:00.000000Z"
}Changes
Changed in 2 of the 97 revisions of this API.2
- ○
the response property
became required for the statusresponse-property-became-required
- ○
- ○
endpoint added
endpoint-added
- ○