The instructions below explain how to set up Palantir MCP with a supported IDE. Alternatively, use the AI development tools available in a VS Code workspace to access Palantir MCP.
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.
See instructions for:
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain. Do not prefix with "https://".Copied!1 2 3 4 5 6 7 8
export FOUNDRY_HOST="<enrollment>.palantirfoundry.com" export FOUNDRY_TOKEN=<token> claude mcp add palantir-mcp \ --scope user \ -e NPM_CONFIG_REGISTRY=https://$FOUNDRY_HOST/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/ \ -e "NPM_CONFIG_//$FOUNDRY_HOST/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken"='${FOUNDRY_TOKEN}' \ -e FOUNDRY_TOKEN=$FOUNDRY_TOKEN \ -- npx "-y" "@palantir/mcp@latest" "--foundry-api-url" "https://$FOUNDRY_HOST"
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain.Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "mcpServers": { "Palantir": { "command": "npx", "args": [ "-y", "@palantir/mcp@latest", "--foundry-api-url", "https://<enrollment>.palantirfoundry.com" ], "env": { "NPM_CONFIG_REGISTRY": "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/", "NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken": "${FOUNDRY_TOKEN}", "FOUNDRY_TOKEN": "<token>" }, "disabled": false } } }
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain.Copied!1 2 3 4 5 6 7 8 9 10 11 12
mcpServers: - name: Palantir command: npx args: - "-y" - "@palantir/mcp@latest" - "--foundry-api-url" - "https://<enrollment>.palantirfoundry.com" env: NPM_CONFIG_REGISTRY: "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/" NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken: "${FOUNDRY_TOKEN}" FOUNDRY_TOKEN: "<token>"
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain.For macOS:
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "mcpServers": { "Palantir": { "type": "stdio", "command": "npx", "args": [ "-y", "@palantir/mcp@latest", "--foundry-api-url", "https://<enrollment>.palantirfoundry.com" ], "env": { "NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken": "${FOUNDRY_TOKEN}", "NPM_CONFIG_REGISTRY": "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/", "FOUNDRY_TOKEN": "<token>" } } } }
For Windows:
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
{ "mcpServers": { "Palantir": { "type": "stdio", "command": "cmd /k npx", "args": [ "-y", "@palantir/mcp@latest", "--foundry-api-url", "https://<enrollment>.palantirfoundry.com" ], "env": { "NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken": "${FOUNDRY_TOKEN}", "NPM_CONFIG_REGISTRY": "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/", "FOUNDRY_TOKEN": "<token>" } } } }
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain.Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
"mcp": { "inputs": [ { "type": "promptString", "id": "foundry-token", "description": "Foundry user token", "password": true } ], "servers": { "Palantir": { "type": "stdio", "command": "npx", "args": [ "-y", "@palantir/mcp@latest", "--foundry-api-url", "https://<enrollment>.palantirfoundry.com" ], "env": { "NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken": "${FOUNDRY_TOKEN}", "NPM_CONFIG_REGISTRY": "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/", "FOUNDRY_TOKEN": "${input:foundry-token}" } } } }
<token>
in the code below.<enrollment>.palantirfoundry.com
with your Palantir domain.Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ "mcpServers": { "Palantir": { "command": "npx", "args": [ "-y", "@palantir/mcp@latest", "--foundry-api-url", "https://<enrollment>.palantirfoundry.com" ], "env": { "NPM_CONFIG_//<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/:_authToken": "${FOUNDRY_TOKEN}", "NPM_CONFIG_REGISTRY": "https://<enrollment>.palantirfoundry.com/artifacts/api/repositories/ri.artifacts.repository.discovered.foundry-mcp/contents/release/npm/", "FOUNDRY_TOKEN": "<token>" } } } }