This feature is available for Cortex cloud.
Prerequisites
Before you get started:- Make sure you have an MCP client that supports remote MCP servers with OAuth, such as Claude Code or Glean.
- Have your Cortex MCP server URL ready. See Choosing your MCP server URL below.
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:- In the main sidebar, go to Integrations > MCP Authorization.
- Copy the Endpoint. Your region and tenant code are already filled in.
<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.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.
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.
/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.
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.