# Installation Open the **MCP Hub** application in Foundry and select the **Palantir MCP** tab for the recommended setup instructions. ![The MCP Hub welcome page displays Palantir MCP installation instructions.](../../../assets/9c568919360f84a4f93a494b5e732507588bb8cddedb276d087608b17df4c4b0.webp) :::callout{theme="warning"} The Palantir model context protocol (MCP) enables external AI systems to read data and metadata from Foundry and interact via AI-friendly API endpoints using the configured user token permissions. Once data is accessed by an external system through Palantir MCP, the governance of its use shifts from Palantir to the external system. Data security will then depend on your relationship with that external system. Using the Palantir MCP does not imply that a Palantir AI model will be used; the AI model provider is determined by the external system you connect to, such as Microsoft for GitHub Copilot, or Cursor. ::: Use the instructions below as a fallback to set up Palantir MCP with a supported IDE. Alternatively, use the [AI development tools](../../vs-code/ai-development-tools/index.md) available in a VS Code workspace to access Palantir MCP. [Tool search](../tool-search/index.md) is enabled by default, so your agent discovers tools as needed. If your MCP client does not support dynamic discovery, it may only use the initial tool list. In this case, add `--no-tool-search` to the server arguments in your configuration to load the full permitted catalog at startup. You can also [disable tool search with an environment variable](../tool-search/index.md#disable-tool-search). ## 1. Enable Palantir MCP in Control Panel Platform administrators must first enable Palantir MCP for use through Control Panel. Access can be configured for a specific subset of users or groups. Palantir MCP is in Control Panel under **Code Repositories**. ![The Palantir MCP in Control Panel](../../../assets/5029b35daa207aded86777358ca65d5dac95f4ac576aa776c3a1409cfed30b15.webp) ## 2. Configure your IDE to use Palantir MCP If you are working within a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. In this case, you do not need to generate or explicitly configure a user token. When using your Foundry Git token: * For Claude Code, omit the `export FOUNDRY_TOKEN` line and the `-e FOUNDRY_TOKEN` argument. * For the other IDEs, omit the `env` block that sets `FOUNDRY_TOKEN`. * For GitHub Copilot in VS Code, also omit the `inputs` array that prompts for a user token. See instructions for: * [Claude Code](#claude-code) * [Cline](#cline) * [Continue](#continue) * [Cursor](#cursor) * [VS Code Copilot](#github-copilot-in-vs-code) * [Windsurf](#windsurf) ### Claude Code 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir, then replace `` in the commands below with your token. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit both the `export FOUNDRY_TOKEN` line and the `-e FOUNDRY_TOKEN` argument below. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). Do not prefix with "https://". 3. Review the [Claude Code documentation ↗](https://code.claude.com/docs/en/mcp) to install Palantir MCP in your Claude Code CLI, particularly the documentation around scoping where MCP should be installed. We recommend installing the MCP at the [project scope ↗](https://code.claude.com/docs/en/mcp#project-scope) level so that the MCP server configuration is scoped to the current project. 4. Run the following commands in your terminal: ```bash export FOUNDRY_HOST="" # Only when not working in a Foundry repository: export FOUNDRY_TOKEN= # When working in a Foundry repository, omit the -e FOUNDRY_TOKEN argument. claude mcp add palantir-mcp \ --scope project \ -e FOUNDRY_TOKEN='${FOUNDRY_TOKEN}' \ -- npx "-y" "palantir-mcp" "--foundry-api-url" "https://$FOUNDRY_HOST" ``` ### Cline 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir, then replace `` in the configuration below with your token. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit the `env` block that sets `FOUNDRY_TOKEN`. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). 3. Review the [Cline documentation ↗](https://docs.cline.bot/mcp/configuring-mcp-servers) to install Palantir MCP into your Cline extension with the configuration below. ```json tab="json" { "mcpServers": { "palantir-mcp": { "command": "npx", "args": [ "-y", "palantir-mcp", "--foundry-api-url", "https://" ], "env": { "FOUNDRY_TOKEN": "" }, "disabled": false } } } ``` ### Continue 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir, then replace `` in the configuration below with your token. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit the `env` block that sets `FOUNDRY_TOKEN`. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). 3. Review the [Continue documentation ↗](https://docs.continue.dev/customize/deep-dives/mcp) to install Palantir MCP into your Continue extension with the configuration below. ```yaml tab="yaml" mcpServers: - name: palantir-mcp command: npx args: - "-y" - "palantir-mcp" - "--no-tool-search" - "--foundry-api-url" - "https://" env: FOUNDRY_TOKEN: "" ``` ### Cursor 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir, then replace `` in the configuration below with your token. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit the `env` block that sets `FOUNDRY_TOKEN` in either configuration below. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). 3. Review the [Cursor documentation ↗](https://docs.cursor.com/context/model-context-protocol) to install Palantir MCP into your Cursor IDE with the configuration below. For macOS: ```json tab="json" { "mcpServers": { "palantir-mcp": { "type": "stdio", "command": "npx", "args": [ "-y", "palantir-mcp", "--foundry-api-url", "https://" ], "env": { "FOUNDRY_TOKEN": "" } } } } ``` For Windows: ```json tab="json" { "mcpServers": { "palantir-mcp": { "type": "stdio", "command": "cmd /k npx", "args": [ "-y", "palantir-mcp", "--foundry-api-url", "https://" ], "env": { "FOUNDRY_TOKEN": "" } } } } ``` ### GitHub Copilot in VS Code 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir and enter it when VS Code prompts you. The configuration below has no `` placeholder to replace: `FOUNDRY_TOKEN` takes its value from the `foundry-token` input declared in the `inputs` array. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit both the `env` block that sets `FOUNDRY_TOKEN` and the `inputs` array that prompts for a user token. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). 3. Review the [VS Code documentation ↗](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) to install Palantir MCP into your VS Code IDE with the configuration below. ```json tab="json" "mcp": { "inputs": [ { "type": "promptString", "id": "foundry-token", "description": "Foundry user token", "password": true } ], "servers": { "palantir-mcp": { "type": "stdio", "command": "npx", "args": [ "-y", "palantir-mcp", "--foundry-api-url", "https://" ], "env": { "FOUNDRY_TOKEN": "${input:foundry-token}" } } } } ``` ### Windsurf 1. If you are not working in a Foundry repository, [generate a user token](../../platform-security-third-party/user-generated-tokens/index.md) from Palantir, then replace `` in the configuration below with your token. If you are working in a Foundry repository, Palantir MCP can use your Foundry Git token to bootstrap authentication. Skip token generation and omit the `env` block that sets `FOUNDRY_TOKEN`. 2. Replace `` with your Foundry hostname (for example, `mycompany.palantirfoundry.com`). 3. Review the [Windsurf documentation ↗](https://docs.windsurf.com/windsurf/cascade/mcp) to install Palantir MCP into your Windsurf IDE with the configuration below. ```json tab="json" { "mcpServers": { "palantir-mcp": { "command": "npx", "args": [ "-y", "palantir-mcp", "--foundry-api-url", "https://" ], "env": { "FOUNDRY_TOKEN": "" } } } } ```