MCP Servers
MCP server connections and their OAuth lifecycle.
Get the caller’s OAuth connection status for an MCP server
Reports whether the server requires a per-user OAuth connection and, when it does, the state of the caller’s stored tokens (`not_connected`, `connected`, `expiring_soon` or `expired`). Use `GET /api/v1/mcp-servers/oauth/authorize/` to start a new connection.
Disconnect the caller’s OAuth connection for an MCP server
Deletes the caller’s stored OAuth tokens for the server. The assistant then skips the server’s tools until the user reconnects via `GET /api/v1/mcp-servers/oauth/authorize/`. Succeeds even when no connection exists.
List the caller’s OAuth connection statuses for all MCP servers
Covers every MCP server of the caller’s company that is configured for OAuth, servers with other auth methods are omitted. Each entry matches the `GET /api/v1/mcp-servers/{mcpServerId}/connection/` response shape.
Test connectivity to an MCP server
Opens a real client session against the server and lists its tools, so it exercises the configured transport, credentials and, for OAuth servers, the caller’s stored connection. Discovery failures answer `400` with the error message in the same response shape.
Start the OAuth authorization flow for an MCP server
Builds a signed OAuth `state` and answers the provider authorization URL as JSON for the client to redirect to, the endpoint itself never issues a `302`. After consent the provider redirects back to `/api/oauth/mcp/callback`, which stores the tokens read by `GET /api/v1/mcp-servers/{mcpServerId}/connection/`.