> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsiam/configure-cortex-xsiam/cortex-mcp-server/configure-the-mcp-client.md).

# Configure the MCP client

After you have downloaded and installed the Cortex MCP server, you need to configure your local MCP client to communicate with the Cortex MCP server. The instructions below use Claude Desktop, but any MCP client can be used.

1. In the Claude Desktop app, navigate to **Settings** → **Developer** → **Edit Config**. The configuration file opens in your default text editor.

   For reference, the file is located at:

   * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
   * Windows: `%APPDATA%\Claude\claude_desktop_config.json`
2. Add the `mcpServers` configuration to the file. The examples below are provided for container (Docker) and local client (Poetry virtual environment). The exact details of your `mcpServers` configuration depend on your specific installation.

   **Docker Container**

   ```programlisting
   {
     "mcpServers": {
       "Cortex MCP Server": {
         "command": "docker",
         "args": [
           "run",
           "--env-file",
           "/path/to/.env",
           "-i",
           "--rm",
           "cortex-mcp"
         ]
       }
     }
   }
   ```

   **Poetry virtual environment**

   ```programlisting
   {
     "mcpServers": {
       "Cortex MCP Server": {
         "command": "python",
         "args": [
           "/path/to/cortex-mcp/src/main.py"
         ],
          "env": {
             "CORTEX_MCP_PAPI_URL": "https://api.cortex.example.com",
             "CORTEX_MCP_PAPI_AUTH_HEADER": "<your_api_key>", 
             "CORTEX_MCP_PAPI_AUTH_ID": "<your_api_key_id",
             "MCP_TRANSPORT": "stdio/streamable-http"
      }
       }
     }
   }
   ```
3. Save the changes to the configuration file and restart Claude Desktop for the changes to take effect.
4. Verify the connection to the Cortex MCP server. You should see the Cortex MCP server running in the Developer settings and a hammer icon may appear in the input box, indicating the MCP tools are available.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xsiam/configure-cortex-xsiam/cortex-mcp-server/configure-the-mcp-client.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
