Prerequisites
The following are required prior to configuring the Cortex MCP:- Ensure that you have a compatible MCP client installed, such as Claude Desktop, Jetbrains AI Assistant, or Visual Studio Code (VSCode). Paid subscriptions to MCP clients generally give you a larger context window, but the free versions of these clients should suffice.
- If hosting the MCP server locally, Docker must be installed and running.
- Create a personal access token in Cortex. See Creating personal access tokens.
Configuring the Cortex MCP
Follow the steps below to configure the Cortex MCP.Hosting the Cortex MCP server locally
Follow the steps below if the MCP server is hosted locally.Step 1: Installing the Cortex MCP
Open terminal and run the following command:Step 2: Configuring your MCP client
Looking for IDE-specific setup? See the README
CORTEX_API_TOKEN argument:
Step 3: Restarting your MCP client
After updating your configuration, restart your MCP client.Hosting the Cortex MCP server remotely
The remote Cortex MCP uses the publiccortex-mcp package as a dependency, installed from GitHub. This configuration of the Cortex MCP enables:
- Faster setup - No need to install or maintain local binaries.
- Updated context - Cortex automatically keeps the service aligned with the latest MCP specification.
- Secure access - Tokens and access are managed in your Cortex workspace with security best practices.
- Seamless integration - It works out of the box with popular MCP clients like VSCode, Claude Code, and Cursor.
- More tools - The remote MCP implementation includes more tools, such as the
query_docstool that allows you to query Cortex’s documentation and knowledge base in natural language. Ask questions like How do I configure PagerDuty for my Cortex services?, or How can I use Cortex to drive AI maturity at my org? It also includes the ability to add private tools and integrations on top of the public functionality.
Step 1: Adding the remote MCP server to your MCP client
Follow the instructions below for Claude, VSCode, or Cursor. Make sure to replace<CORTEX_TOKEN> with the value of the personal access token you generated in Cortex.
Claude Code
Run the following command to add the Cortex remote MCP server:
.vscode/mcp.json file:
Step 2: Validating your remote MCP configuration
Validate that your remote Cortex MCP is working:- VSCode - Open the Command Palette and search for “MCP: List servers.” Confirm that
cortexappears as a connected server. - Claude - Run the command
claude mcp listand verify that cortex-remote is in the list of servers. - Cursor - Open Settings > MCP Servers and verify that
cortexis listed and connected.
Step 3: Restarting your MCP client
After updating your configuration, restart your MCP client.Self-managed additional configuration
If you are a self-managed Cortex customer, you must also setCORTEX_API_BASE_URL=https:// alongside the CORTEX_API_TOKEN variable.
Self-managed configuration example
Set the CORTEX_API_BASE_URL to your backend host URL: