On This Page
Tableau Studio offers two ways to drive authoring actions for workbooks and extensions headlessly, without using the Tableau Agent interface:
- Configure the agent of your choice to use the Tableau MCP and connect that agent to Tableau Studio.
- Directly call the Tableau External Client API
REST endpoints using standard methods from tools like cURL or Postman, scripts, or apps.
While driving Studio headlessly does not get the benefit of Tableau Agent’s guardrails and management of Tableau MCP’s behavior, it enables you to author using natural language or programmatic tooling of your choice.
Use Your Agent to Author with Tableau MCP
Internal Beta Only: Using an external AI tool (Claude Code, Cursor, Codex . . .) to drive Tableau Studio is only available if you have an internal build of Tableau Studio.
In Claude Code, Cursor, Copilot, or any MCP-capable client you choose, download and build the tableau-mcp repo locally to drive Tableau Studio authoring using natural language.
Get started with Tableau MCP
Tip: You may be able to copy/paste this Get Started section into your AI IDE and have it complete setup and testing for you.
- Install Node.js 22.7.5 or later (npx will install the needed server).
- Install Tableau Studio.
-
Clone and build the MCP locally.
- Clone the
tableau-mcprepo:
git clone https://github.com/tableau/tableau-mcp cd tableau-mcp git checkout feature/desktop- Install dependencies and build the Desktop profile:
npm ci npm run build- Configure your MCP client to point at the built server:
{ "mcpServers": { "tableau-desktop": { "type": "stdio", "command": "node", "args": ["<path to your tableau-mcp clone>/tableau-mcp/build/index.desktop.js"], "env": { "TRANSPORT": "stdio", "TABLEAU_EXTERNAL_API": "true" } } } } - Clone the
- Open Tableau Studio.
- Try a query prompt like: “What workbooks are available in Tableau Studio?”
- Try an action prompt like “Change the font color of all dashboard titles in the workbook to green.”
Directly call the Tableau External Client API
For automation scenarios you may choose to create scripts or other programmatic content that drives Tableau Studio through the Tableau External Client API
. For instance, you may want to apply a style guide to a workbook, check a batch of workbooks for accessibility features, or search and replace a string in a set of Tableau projects.
Get Started with direct calls to the Tableau External Client API
- Install Tableau Studio.
- Open Tableau Studio.
-
Find your Tableau External Client API discovery file.
This file is recreated with fresh values on each launch of Tableau Studio and is only available once the app has fully started. The basename of the file is the OS process ID Tableau is running in.
macOS
~/Library/Application Support/Tableau/Tableau/ExternalApi/<pid>.jsonWindows
%LOCALAPPDATA%/Tableau/Tableau/ExternalApi/<pid>.jsonThe two important values it contains are:
baseUrl- typicallyhttp://127.0.0.1:<xxxxx>token- looks like:af1129c44d5dcd8bd9206a8641133c91eed66c76b5f562633a37fd186e5ccac1
A full typical discovery file looks like:
{ "schemaVersion": 1, "instanceId": "td_a8f1bf61-9194-49e8-8205-6ae7e831d5c2", "pid": 28814, "baseUrl": "http://127.0.0.1:62197", "tokenType": "Bearer", "token": "af1129c44d5dcd8bd9206a8641133c91eed66c76b5f562633a37fd186e5ccac1", "applicationVersion": "0.0.0", "apiVersion": "0.2.6", "startedAt": "2026-08-14T16:14:52Z" }A model call looks like:
curl -sS -H "Authorization: Bearer <token value>" \ <baseURL>/v0/workbook -
Check the presence of the client (no authorization is needed for this one call). Run:
curl -sS http://127.0.0.1:62197/v0/healthThis should return:
{"status":"OK"} (HTTP 200) -
Try a call to list all available workbooks. Run:
curl -sS -H "Authorization: Bearer af1129c44d5dcd8bd9206a8641133c91eed66c76b5f562633a37fd186e5ccac1" \ http://127.0.0.1:62197/v0/workbookThis should return something like:
{ "title": "Book1", "location": null, "unsavedChanges": false, "worksheets": [ { "id": "{9BBEEE50-4AF9-46C2-BB36-1DAC6793FE4B}", "name": "Sheet 1", "hidden": false, "isActiveSheet": true, "index": 0, "isAutoUpdatesPaused": false, "datasources": [] } ], "dashboards": [], "storyboards": [] }
API call helper script
call-studio-api.py (download) is an example script for Windows and macOS that does the discovery and authentication work on your behalf each time you call. Rather than reading the discovery file yourself and pasting a baseUrl and token into every cURL call, you supply a simplified URI and a JSON payload:
python call-studio-api.py <METHOD> <path> [json-body] [--workbook <name or path>]
There is nothing to configure first. Each run finds the running copies of Tableau Studio, confirms the Tableau External Client API is responding, and supplies the current baseUrl and token.
For long-running operations that return HTTP 202 instead of a result, the script waits and delivers the full response when it arrives, for up to 30 seconds.
The script writes the response body to stdout and status lines, prompts, and errors to stderr, so python call-studio-api.py GET v0/health | jq .status works. It writes no files, sets no environment variables, and saves no token between runs. Because each run rediscovers the current session, it keeps working after Tableau Studio restarts with a new process ID and a new token.
Prerequisite
The script needs Python 3.9 or later.
Arguments
| Argument | Required | Description |
|---|---|---|
METHOD |
Yes | HTTP method: GET, POST, PUT, PATCH, or DELETE. |
path |
Yes | Simplified API path. The leading slash is optional, so v0/workbook and /v0/workbook are equivalent. |
json-body |
No | JSON string for write methods. Checked for valid JSON before anything is sent. |
--workbook |
No | Drive the window holding this workbook. Accepts a file name (lab.twb), a path (~/books/lab.twb, resolved from your current directory), or the title shown in Tableau Studio (Book1). A workbook that has never been saved has no file name or path, so its title is the only way to name it. |
Choose which window to drive
If more than one instance of Tableau Studio is open, the script will prompt:
Multiple Tableau Studio instances are open. Choose one:
1) lab.twb (/Users/me/books/lab.twb)
2) sales.twb (/Users/me/books/2026/sales.twb)
3) Book1 (unsaved)
Enter 1-3:
--workbook skips that prompt. If the value matches nothing that is open, the script will prompt you to select an open instance.
Examples
Focus Sheet 1 in the current workbook:
python call-studio-api.py POST v0/workbook:goToSheet '{"id":"{9BBEEE50-4AF9-46C2-BB36-1DAC6793FE4B}"}'
Read the structure of a specific open workbook:
python call-studio-api.py GET v0/workbook --workbook ~/books/lab.twb
List the workbooks on the site, waiting for the operation to finish:
python call-studio-api.py GET v0/site/workbooks
Exit codes
Useful when calling the script from other automation:
| Code | Meaning |
|---|---|
0 |
The instance answered with a 2xx, and any operation the script waited on succeeded. |
1 |
Tableau Studio is not running or stopped responding, no workbook matched your selector, the prompt was cancelled, or an operation outlived its timeout. |
2 |
The command itself was malformed, such as a missing argument or a body that is not valid JSON. |
3 |
The instance returned an error status, or the operation it started failed. |
Check the Tableau External Client API
reference for the Tableau authoring operations you can call.