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

# Authenticate with the Cortex XCOR MCP server

> Learn how to authenticate with the Cortex XCOR MCP server so you can interact with resources in Palo Alto Networks Cortex XCOR.

Palo Alto Networks Cortex XCOR provides two MCP servers:

* Cortex XCOR MCP server: Connects to your tenant and requires
  authentication.
* [Documentation MCP server](https://docs.chronosphere.io/mcp): Serves public
  Cortex XCOR documentation and does not require authentication.

Before you can use the Cortex XCOR MCP server, authenticate with the MCP
client you use to access a large language model (LLM). Use one of the following
options to configure authentication:

* Generate a Cortex XCOR API token, either through a personal access token or a
  service account.
* Use [OAuth](https://oauth.net/2/). To use the Cortex XCOR MCP server with OAuth,
  your MCP client must support OAuth.

  > [!NOTE]
  >
  > OAuth authentication with the Cortex XCOR MCP server has been tested with the
  > following MCP clients only.

The following steps explain how to authenticate with popular AI-powered code editors.
After authenticating, you can use the LLM features in your code editor to interact
with the [Cortex XCOR MCP server tools](https://docs-xcor.paloaltonetworks.com/integrate/mcp-server/resources.md).

## Prerequisites

If you're authenticating your MCP client with a Cortex XCOR API token, use one of
the following options to generate one:

* **Personal access**: Create a
  [personal access token](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/personal-access-tokens.md) to
  authenticate your user account with Cortex XCOR. When you authenticate with a
  personal access token, Cortex XCOR associates the actions
  you take with your identity and respects the permissions granted to your user
  account's team.
* **Programmatic access**: Create an
  [unrestricted service account](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/service-accounts.md#create-an-unrestricted-service-account)
  to create a persistent identity for a service or agent that you want to authenticate
  with your MCP client. You must have
  [administrative access](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/user-accounts.md#grant-system-administrator-sysadmin-privileges-to-users)
  to create a service account.

## Authenticating using Claude Code

To authenticate with the Cortex XCOR MCP server from Claude Code, add the MCP server
as a
[remote HTTP server](https://docs.claude.com/en/docs/claude-code/mcp#option-3%3A-add-a-remote-http-server).

1. From within Claude Code, run the following commands to add the Cortex XCOR MCP server
   and the public documentation MCP server:

   ```shell wrap /TENANT/ /API_TOKEN/ theme={null}
   claude mcp add --transport http chronosphere "https://TENANT.chronosphere.io/api/mcp/mcp" \
   --header "Authorization: Bearer API_TOKEN"
   claude mcp add --transport http chronosphere-docs "https://docs.chronosphere.io/mcp"
   ```

   Replace the following for the Cortex XCOR MCP server:

   * Replace *`TENANT`* with the name of your Cortex XCOR tenant.
   * Replace *`API_TOKEN`* with the API token generated from your [service account](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/service-accounts.md). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.

   > [!NOTE]
   >
   > To authenticate using OAuth instead of a Cortex XCOR API token, omit the
   > `--header` flag. You can also use the `/mcp` command to authenticate with OAuth
   > authentication.

2. Test your connection with the Cortex XCOR MCP server:

   ```shell theme={null}
   claude mcp get chronosphere
   ```

The command returns the details for the Cortex XCOR MCP server.

## Authenticating using Cursor

To authenticate with the Cortex XCOR MCP server from Cursor, modify the `mcp.json`
file to include the Cortex XCOR MCP server remote endpoint.

1. From within Cursor,
   [access the `mcp.json` file](https://cursor.com/docs/context/mcp#using-mcpjson).

2. Add the following configuration to the `mcp.json` file to add the Cortex XCOR MCP
   server and the public documentation MCP server:

   ```json /TENANT/ /API_TOKEN/ theme={null}
   {
     "mcpServers": {
       "chronosphere": {
         "url": "https://TENANT.chronosphere.io/api/mcp/mcp",
         "headers": {
           "Authorization": "Bearer API_TOKEN"
         }
       },
       "chronosphere-docs": {
         "url": "https://docs.chronosphere.io/mcp"
       }
     }
   }
   ```

   Replace the following for the Cortex XCOR MCP server:

   * Replace *`TENANT`* with the name of your Cortex XCOR tenant.
   * Replace *`API_TOKEN`* with the API token generated from your [service account](https://docs-xcor.paloaltonetworks.com/administer/accounts-teams/service-accounts.md). Cortex XCOR recommends storing your API token in a separate file or Kubernetes Secret and calling it using an environment variable, such as `$API_TOKEN`.

   > [!NOTE]
   >
   > To authenticate using OAuth instead of a Cortex XCOR API token, omit the
   > `headers` section from the configuration.

3. Save and close the `mcp.json` file.

4. Refresh the MCP server settings in Cursor.

The Cortex XCOR MCP server and documentation MCP server display in the list of
configured MCP servers.


## Related topics

- [Cortex XCOR MCP server tools](https://docs-xcor.paloaltonetworks.com/integrate/mcp-server/resources.md)
- [Cortex XCOR MCP server](https://docs-xcor.paloaltonetworks.com/integrate/mcp-server.md)
- [Integrate with Cortex XCOR](https://docs-xcor.paloaltonetworks.com/integrate.md)
- [Authenticate with Cortex XCOR as a user](https://docs-xcor.paloaltonetworks.com/overview/authenticating.md)
- [Install the Cortex XCOR Terraform provider](https://docs-xcor.paloaltonetworks.com/tooling/infrastructure/terraform/install.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.