Skip to main content
This feature is available for Cortex cloud.
The remote Cortex MCP supports OAuth, so you can connect your MCP client by logging in to Cortex in your browser. You don’t need to create a personal access token or add it to your client’s configuration. Your MCP client handles the sign-in flow and keeps your session authorized. This page covers how to connect with OAuth. For an overview of what the Cortex MCP can do, see Cortex MCP. To connect with a personal access token instead, see Configuring the Cortex MCP.

Prerequisites

Before you get started:

Choosing your MCP server URL

The OAuth-enabled MCP server URL includes your region and your tenant code. The easiest way to get it is from Cortex:
  1. In the main sidebar, go to Integrations > MCP Authorization.
  2. Copy the Endpoint. Your region and tenant code are already filled in.
The MCP Authorization page also has setup instructions for MCP clients such as Claude Code, Cursor, VS Code, and Glean, with your URL already added. To build the URL yourself, use the URL for the region your Cortex workspace is hosted in, and replace <TENANT_CODE> with your tenant code:
These URLs are different from the token-based remote MCP URLs. Make sure to include /t/<TENANT_CODE> in the path, or the OAuth sign-in flow won’t start.
To connect to a smaller set of tools, add a toolset to the end of the URL, for example https://mcp.cortex.io/t/<TENANT_CODE>/mcp?toolsets=common. See Limiting tools with toolsets.

Finding your tenant code

Your tenant code is the workspace name you enter in the Enter your workspace name field when you sign in to Cortex, e.g. cortex-labs. If you sign in from a bookmarked link, check the URL. Your tenant code is the value after tenantCode=. For example, in https://app.getcortexapp.com/login?tenantCode=cortex-labs, the tenant code is cortex-labs.
The Workspace name field under Settings > General is the display name shown next to your logo. It isn’t your tenant code.
If you don’t know your tenant code, contact your account team or Cortex support.

Connecting with Claude Code

1

Add the Cortex MCP server

Run the following command. If your workspace is in the EU region, use the EU URL instead. You can also copy this command with your URL already filled in from the Claude Code tab under Integrations > MCP Authorization.
2

Authenticate

Open Claude Code and run /mcp. Select cortex, then select Authenticate.
3

Log in to Cortex

A browser window opens to the Cortex login page. Log in to your Cortex account to authorize the connection, then return to Claude Code.
To confirm the connection, run /mcp again and check that cortex shows as connected.

Connecting with Glean

To connect Glean to the Cortex MCP and add the Cortex skill for Glean, see Using the Cortex MCP in Glean.

Connecting with other MCP clients

If your MCP client asks for connection details when you add a remote server, use the following settings:
  • Server URL - The Endpoint from Integrations > MCP Authorization in Cortex, or the MCP server URL for your region, including your tenant code.
  • Transport type - HTTP (streamable HTTP).
  • Authentication - OAuth with Dynamic Client Registration (DCR). You don’t need a client ID or client secret. Your MCP client registers itself with Cortex automatically.
After you add the server, start the sign-in flow from your client. A browser window opens where you log in to Cortex.

Staying signed in

After you sign in, your authentication lasts for multiple days. Your MCP client refreshes your access tokens automatically multiple times per day, so you don’t need to do anything to keep your session active. When your authentication expires, sign in to Cortex again from your MCP client. In Claude Code, run /mcp, select cortex, then select Authenticate.

Share your feedback

Have feedback or run into issues? Reach out to Cortex Customer Engineering.
Last modified on November 5, 2026