---
title: "Finish an MCP OAuth connection"
method: POST
path: "/table-enrichments/mcp-servers/oauth/callback/"
tags: ["table-enrichments"]
---

# Finish an MCP OAuth connection

`POST /table-enrichments/mcp-servers/oauth/callback/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/table-enrichments/mcp-servers/oauth/callback/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Exchange the provider redirect's code for the grant, persist the connection, and return the server with a live probe of its tools.

## Request body

- McpOauthCallbackRequestSchema: The provider redirect's payload, relayed by the frontend callback page.
  - `code` string, required
  - `state` string, required

## Response `200`

Successful Response

- McpOauthCallbackResponseSchema: The finished connection and a live probe of what it can reach.
  - `server` McpServerReadSchema, required: One org-level MCP server as the agent editor renders it.
    - `account_label` string, nullable, required: OAuth servers only: best-effort account/workspace name of the grant.
    - `auth_mode` string, required: How requests authenticate: 'headers' (static) or 'oauth'.
    - `catalog_slug` string, nullable, required: The curated-catalog entry this server came from; null for custom servers.
    - `created_at` string, date-time, required
    - `enabled` boolean, required
    - `header_names` string[], required: The names of the configured request headers. Values are credentials and are never returned by the API.
    - `id` string, uuid, required
    - `name` string, required
    - `oauth_status` string, nullable, required: OAuth servers only: 'active' or 'needs_reconnect'; null for static-header servers and never-connected rows.
    - `updated_at` string, date-time, required
    - `url` string, required
  - `verify` McpServerVerifyResponseSchema, required: A live probe's result; an unreachable server is data, not an error.
    - `error` string, nullable, required
    - `ok` boolean, required
    - `tools` McpToolSchema[], required
      - `description` string, nullable, required
      - `input_schema` object, required
      - `name` string, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Unknown catalog entry
- `422`: The sign-in attempt expired or was rejected
- `500`: Internal server error.
- `502`: The authorization service is unreachable
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
