Connect Tableau Server to Claude Code via MCP + PAT
Wire Claude Code into Tableau Server using the official MCP server, authenticated with a Personal Access Token — list workbooks and views from chat.
You can connect Claude Code to Tableau Server using the official Tableau MCP server. Once set up, Claude Code can browse your published workbooks, query data sources, and pull view metadata from any session. Authentication uses a Personal Access Token (PAT), so you do not have to ship your password through environment variables.
MCP (Model Context Protocol) is how Claude Code talks to outside tools. The Tableau MCP server is an official npm package that translates MCP tool calls into Tableau REST API requests. You do not need to build the integration yourself.
What you’ll achieve
- Claude Code can list workbooks, views, and data sources on your Tableau Server.
- Authentication runs through a Personal Access Token, scoped to your user account.
- One user-scoped registration, available in every Claude Code session.
Tutorial setup 3 prerequisites · 5 values
- Claude Code — installed and working from your terminal.
- Node.js — the MCP server runs via
npx. The LTS version from nodejs.org is fine. - A Tableau Server account — with permission to create Personal Access Tokens. If the server admin has disabled PATs, ask them to enable them under Settings → Personal Access Tokens.
Step-by-step guide
Step 1: Create a Personal Access Token
In Tableau Server, click your avatar in the top-right and open My Account Settings. Scroll down to Personal Access Tokens, give the token a name (use the same value you entered in {{TABLEAU_PAT_NAME}} above), and click Create new token.
Tableau shows the secret value once. Copy it now — you will paste it into the command in Step 3. If you lose it, you have to create a new token.
PATs are scoped to your account, can be revoked individually, and never appear in shell history if you paste them once into a config. Tableau also requires PATs (or a trusted ticket flow) for any non-interactive REST API client — username and password sign-in is reserved for the browser.
Step 2: Find your site name
Tableau Server uses the content URL of a site as its identifier — not the human-readable display name. Open Tableau in your browser and look at the URL after /#/site/:
https://tableau.your-company.com/#/site/HR/views
^^
site name
If your URL has no /site/ segment, you are on the default site and the site name is an empty string ("").
Step 3: Register the MCP server
Run this in your terminal — your values from the boxes above are already substituted in. Replace your-very-long-pat-secret-here with the PAT secret you copied in Step 1:
claude mcp add-json tableau --scope user '{
"command": "npx",
"args": ["-y", "@tableau/mcp-server@latest"],
"env": {
"SERVER": "{{TABLEAU_SERVER}}",
"SITE_NAME": "{{TABLEAU_SITE}}",
"PAT_NAME": "{{TABLEAU_PAT_NAME}}",
"PAT_VALUE": "your-very-long-pat-secret-here"
}
}'
--scope user registers the server in your user-level Claude Code config so it shows up in every project. The npx -y runs the latest published @tableau/mcp-server without a global install.
Bash treats single-quoted strings as literal — no variable expansion, no
escaping needed for the inner double quotes. If you switch to double quotes
around the JSON, you have to escape every " inside it, which is painful
and error-prone.
Verification / Testing
Restart Claude Code and ask something like “list my Tableau workbooks” or “show me the data sources on the HR site”. You should see tool calls to the tableau server in the transcript, and the results should match what you see in the Tableau UI.
If nothing happens, run claude mcp list in a fresh terminal to confirm tableau is registered under your user scope.
Troubleshooting
401 Unauthorizedon every call. The PAT secret inPAT_VALUEis wrong, or the PAT name inPAT_NAMEdoes not match the token you created. Tableau requires both fields to match the token record exactly.Site not found. You used the site’s display name instead of its content URL. Re-check the URL bar after/#/site/(see Step 2). For the default site, leaveSITE_NAMEempty.- Tool calls work but return nothing. Your PAT inherits your user’s permissions. If you cannot see a workbook in the Tableau UI, the MCP server cannot see it either — ask the project owner to grant access.
PATs are disablederror. Your server admin has not enabled Personal Access Tokens at the server level. Send them to Settings → Personal Access Tokens and ask them to flip the switch.
What you learned
- How Claude Code’s
claude mcp add-jsonregisters MCP servers via inline JSON, with--scope usermaking them global. - Why Tableau’s PAT flow is the right auth model for non-interactive clients, and where to find the secret in My Account Settings.
- The difference between a Tableau site’s display name and its content URL — only the content URL works as
SITE_NAME.
Related articles
Connect Claude Code to BigQuery in 2 steps with MCP
Wire Claude Code into BigQuery with Google's prebuilt MCP toolbox in two steps — list datasets, inspect schemas, and run SQL from any session.
Give Claude Code system-wide memory with CLAUDE.md
Put your KPIs, role, and writing style in one file at ~/.claude/CLAUDE.md and Claude Code reads it on every prompt — across every project.
Connect Claude Code to Slack with the official plugin
Install the official Slack plugin for Claude Code with one command, then post to channels and read threads from any session — no custom MCP server needed.