Skip to main content
We’re excited to offer early access to a limited group of customers so we can incorporate feedback and ensure the experience scales well before making it generally available. If you would like to request access, please reach out to your account team.
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:
  • Make sure you have an MCP client that supports remote MCP servers with OAuth, such as Claude Code.
  • Have your Cortex tenant code ready. Your tenant code identifies your Cortex workspace and is part of the MCP server URL. See Finding your tenant code below.

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.

Choosing your MCP server URL

The OAuth-enabled MCP server URL includes your tenant code. 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.

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.
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 add the Cortex MCP server in Glean, you need the Glean Admin or MCP Server Moderator role, and you must also be a Cortex user. Glean signs in to Cortex as you to discover the available tools. To make the tools available to other users after setup, you need the Glean Admin role.
1

Add a new MCP server

In Glean, start the + MCP flow to add a remote MCP server, then open the Configuration tab.
2

Name the server

Enter an MCP server name and Description, for example Cortex MCP.
3

Enter the server URL

In MCP server URL, enter the MCP server URL for your region, including your tenant code. Leave Use Glean proxy cleared unless you have trouble connecting.
4

Choose the transport and authentication

Under Transport type, select Streaming HTTP. Under Authentication method, select Dynamic client registration. Glean fills in the Client ID automatically.
5

Connect to Cortex

Under Connect to server, sign in to Cortex when prompted. When the status shows Connected, click Refresh tools to load the Cortex MCP tools.
6

Enable the tools

Under Enable tools, click Edit settings and choose which teammates can use the Cortex tools. Then click Save.
After you enable the tools, each Glean user signs in to Cortex with their own account the first time they use a Cortex tool. Glean uses each user’s own Cortex identity, not the admin’s connection, so users can only see and do what their Cortex account allows. For more information, see the Glean documentation on connecting remote MCP servers to 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 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.
During Private Beta, OAuth sign-in works with a set of supported MCP clients. If you have trouble connecting your client, contact your account team.

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 your account team.
Last modified on October 16, 2026