> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP OAuth authentication

> Connect MCP clients to Omni with OAuth. Omni creates and manages the API key for you.

OAuth lets MCP clients connect to Omni without requiring you to manually create and manage API keys. When you connect, Omni creates an API key on your behalf and links it to your user account.

> [!NOTE]
>
> PATs generated through MCP OAuth are different from standard PATs. See the [MCP OAuth PATs section](#mcp-oauth-pats) for more information.

## Requirements

To use OAuth authentication with the MCP, your organization must have the **MCP server** setting enabled. Organization Admins can enable this setting in [**AI Hub > MCP**](https://docs.omni.co/ai/settings/mcp.md#mcp-server).

OAuth does not depend on the **Personal tokens** setting in **Settings > API access > Personal tokens**. If an Organization Admin disables personal tokens, existing standard PATs are revoked, but MCP OAuth connections keep working.

## How it works

> [!NOTE]
>
> The OAuth flow will use the cookie of the last Omni instance you logged into when redirecting you to the authorization page. If you are a member of multiple organizations, log out and then log back in to the organization you want to connect to immediately before starting the OAuth flow.

When you first connect an MCP client to Omni using OAuth, the flow will look similar to the following:

1. You add the [connection URL](#connection-url) to your MCP client.
2. The MCP client will trigger the OAuth flow.
3. Your browser will open to an authorization page for your Omni organization.
4. Review the permissions on the authorization page.
5. Click **Authorize**.
6. Omni will automatically create an [**MCP OAuth PAT**](#mcp-oauth-pats) for the MCP client and link it to your Omni user account.

After authorization, all MCP queries use your Omni permissions and access controls. The flow uses OAuth 2.1 with PKCE for security.

## MCP OAuth PATs

When you authenticate with OAuth, Omni automatically creates a special PAT called an **MCP OAuth PAT**. These differ from standard PATs in a few ways:

**1. Any user can create one**

Standard PATs require **Restricted Querier** or higher permissions, but MCP OAuth PATs are created automatically for any user who completes the OAuth flow. This can include **Viewers**.

**2. Permissions reflect the user's in-app permissions**

MCP OAuth PATs inherit the creating user's in-app permissions.

Users can do the same things through MCP that their role allows for in Omni. For example:

* **Viewers** can only run queries from published content that they have access to in Omni.
* **Standard** users can run exploratory queries. The same access grants applied in Omni also apply to the MCP.

**3. View MCP tokens**

You can view MCP OAuth PATs by going to **Settings > API access > Personal tokens**.

> [!TIP]
>
> You can use the [List API tokens endpoint](https://docs.omni.co/api/api-tokens/list-api-tokens.md) to retrieve information about MCP-generated PATs.

To turn MCP access on or off for the whole organization, Organization Admins can use the **MCP server** setting in [**AI Hub > MCP**](https://docs.omni.co/ai/settings/mcp.md#mcp-server). Disabling it returns a `403` for new authorization requests and blocks existing grants from making tool calls.

For a full comparison of all API key types in Omni, refer to the [API authentication](https://docs.omni.co/api/authentication.md) documentation.

## Connection URL

Use this URL when setting up OAuth in your MCP client:

```text theme={null}
https://callbacks.omniapp.co/callback/mcp
```

This URL routes requests to your Omni organization after you identify yourself during the OAuth flow.

## Troubleshooting

> [accordion] MCP server access disabled (403 error)
>
> Your organization has disabled MCP server access. Ask an Organization Admin to enable it in [**AI Hub > MCP**](https://docs.omni.co/ai/settings/mcp.md#mcp-server).

> [accordion] Authorization flow doesn't start
>
> * Verify your MCP client supports OAuth 2.1 with PKCE
> * Check that you're using the correct URL: `https://callbacks.omniapp.co/callback/mcp`
> * Ensure your Omni instance is accessible from your browser

> [accordion] Authorization fails after clicking "Authorize"
>
> * Check that your browser allows redirects to the MCP client
> * Verify you have permission to create API keys in your organization
> * Try disconnecting and reconnecting the MCP client

## Next steps

Follow the setup guide for your MCP client:

> [card] [ChatGPT](https://docs.omni.co/ai/mcp/chatgpt.md)
>
> OpenAI's AI assistant with developer mode

> [card] [Claude Code](https://docs.omni.co/ai/mcp/claude-code.md)
>
> Command-line based version of Anthropic Claude

> [card] [Claude Desktop](https://docs.omni.co/ai/mcp/claude-desktop.md)
>
> App version of Anthropic Claude

> [card] [Codex](https://docs.omni.co/ai/mcp/codex.md)
>
> OpenAI's agentic coding tool

> [card] [Cursor](https://docs.omni.co/ai/mcp/cursor.md)
>
> AI-powered IDE designed for fast, agentic programming

> [card] [Microsoft Copilot](https://docs.omni.co/ai/mcp/microsoft-copilot.md)
>
> Microsoft's AI assistant, configured through Copilot Studio

> [card] [Visual Studio Code](https://docs.omni.co/ai/mcp/vscode.md)
>
> Popular open-source IDE with powerful AI features

## Related

* [MCP authentication](https://docs.omni.co/ai/mcp/authentication) - Compare the ways to authenticate MCP clients
* [MCP API key authentication](https://docs.omni.co/ai/mcp/authentication/api-key.md) - Authenticate with a key you create and manage
* [MCP Enterprise Managed Auth](https://docs.omni.co/ai/mcp/authentication/enterprise-managed-auth.md) - Let users sign in through your Okta organization
