Tableau MCP

A suite of tools for developers to build AI applications that integrate with Tableau.

Tableau MCP

Tableau Supported

Build and Test

Overview

Tableau MCP is a suite of developer primitives, including tools, resources and prompts, that will make it easier for developers to build AI-applications that integrate with Tableau.

Key features:

  • Provides access to Tableau published data sources through the VizQL Data Service (VDS) API
  • Supports collecting data source metadata (columns with descriptions) through the Tableau Metadata API
  • Supports access to Pulse Metric, Pulse Metric Definitions, Pulse Subscriptions, and Pulse Metric Value Insight Bundle through the Pulse API
  • Usable by AI tools which support MCP Tools (e.g., Claude Desktop, Cursor and others)
  • Works with any published data source on either Tableau Cloud or Tableau Server

The following MCP tools are currently implemented:

VariableDescription
list-datasourcesRetrieves a list of published data sources from a specified Tableau site (REST API)
list-fieldsFetches field metadata (name, description) for the specified datasource (Metadata API)
query-datasourceRun a Tableau VizQL query (VDS API)
read-metadataRequests metadata for the specified data source (VDS API)
list-all-pulse-metric-definitionsList All Pulse Metric Definitions (Pulse API)
list-pulse-metric-definitions-from-definition-idsList Pulse Metric Definitions from Metric Definition IDs (Pulse API)
list-pulse-metrics-from-metric-definition-idList Pulse Metrics from Metric Definition ID (Pulse API)
list-pulse-metrics-from-metric-idsList Pulse Metrics from Metric IDs (Pulse API)
list-pulse-metric-subscriptionsList Pulse Metric Subscriptions for Current User (Pulse API)
generate-pulse-metric-value-insight-bundleGenerate Pulse Metric Value Insight Bundle (Pulse API)

Note: The Tableau MCP project is currently in early development. As we continue to enhance and refine the implementation, the available functionality and tools may evolve. We welcome feedback and contributions to help shape the future of this project.

Getting Started

Install Prerequisites

Follow these steps to install Tableau MCP for the first time:

  1. Clone the repository
  2. Install Node.js (tested with 22.15.0 LTS)
  3. npm install
  4. npm run build

To keep up with repo changes:

  1. Pull latest changes: git pull
  2. npm install
  3. npm run build
  4. Relaunch your AI tool or 'refresh' the MCP tools

Docker Build

To use the Docker version of Tableau MCP, build the image from source:

$ docker build -t tableau-mcp .
$ docker images
REPOSITORY    TAG       IMAGE ID       CREATED        SIZE
tableau-mcp   latest    c721228b6dd3   15 hours ago   260MB

Remember to build the Docker image again whenever you pull the latest repo changes. Also you'll need to relaunch your AI tool so it starts using the updated image.

Claude Desktop Extension Build

Anthropic recently added support for Desktop Extensions (DXT) that can simplify loading and configuring MCP servers in Claude Desktop. A Desktop Extension is self-contained and the end-user doesn't need to worry about git, command lines, or Node.

To build the DXT file for this project:

  1. Pull latest changes: git pull
  2. npm install
  3. npm run build:dxt
  4. Use the output file tableau-mcp.dxt and install into Claude Desktop

:warning: If you build this from your local repo, all files will be included. Make sure you don't have any environment files that contain sensitive data like personal access tokens. :warning:

For more information about Desktop Extensions, see the June 2025 Anthropic blog post and the Anthropic DXT GitHub project.

Tableau Configuration

Tableau MCP works with both Tableau Server and Tableau cloud data with these prerequisites:

  • Only published data sources are supported
  • VDS (VizQL Data Service) must be enabled (Tableau Server users may need to enable it)
  • Metadata API must be enabled (Tableau Server users may need to enable it)
  • You may need to enable Tableau Pulse on your Tableau Cloud site to use Pulse API tools (Tableau Server is unable to use Tableau Pulse)

Tableau Authentication

Tableau MCP requires authentication in order to connect with your Tableau Server or Tableau Cloud site. This authenticated user must have access to the published data source(s) you plan to access.

There are several ways to authenticate to Tableau. See Environment Variables for more information.

  1. Provide your Tableau Personal Access Token by setting the PAT_NAME and PAT_VALUE environment variables.
  2. Use Tableau Connected Apps by setting the AUTH environment variable to direct-trust. See Direct Trust Configuration for additional required configuration.

Configuring AI Tools

AI tools can connect to Tableau MCP in two different ways:

  • Running locally: the tool runs Tableau MCP as needed using node build/index.js
  • Running in Docker: the tool runs Tableau MCP as a Docker container

Either method will work. The Docker path is slightly easier because all the environment variables are stored in one file rather than in each AI tool's config section.

Environment Variables

All environment variables specified in a .env file will be available to the MCP server. Creating a .env file is not required though since environment variables can also be provided by AI tools via their MCP configuration or to the Docker container running the MCP server via env.list file.

Depending on your desired mode, create your environment configuration as follows:

For running locally, create an mcpServers JSON snippet using config.stdio.json or config.http.json as a template, depending on your desired transport type. For stdio transport, it should look similar to this:

{
  "mcpServers": {
    "tableau": {
      "command": "node",
      "args": ["/full-path-to-tableau-mcp/build/index.js"],
      "env": {
        "TRANSPORT": "stdio",
        "SERVER": "https://my-tableau-server.com",
        "SITE_NAME": "",
        "PAT_NAME": "",
        "PAT_VALUE": "",
        ... etc
      }
    }
  }
}

For running with Docker, create an env.list file in the root of the project using env.example.list as a template. Also create an mcpServers JSON snippet like config.docker.json. It should look similar to this:

{
  "mcpServers": {
    "tableau": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--env-file",
        "/full-path-to-tableau-mcp/env.list",
        "tableau-mcp"
      ]
    }
  }
}

These config files will be used in tool configuration explained below.

Required Environment Variables

VariableDescription
SERVERThe URL of the Tableau server.
SITE_NAMEThe name of the Tableau site to use. For Tableau Server, set this to an empty string to specify the default site.

Optional Environment Variables

VariableDescriptionDefaultNote
TRANSPORTThe MCP transport type to use for the server.stdioPossible values are stdio or http. For http, see HTTP Server Configuration below for additional variables. See Transports for details.
AUTHThe authentication method to use by the server.patPossible values are pat or direct-trust. See below sections for additional required variables depending on the desired method.
DEFAULT_LOG_LEVELThe default logging level of the server.debug
DATASOURCE_CREDENTIALSA JSON string that includes usernames and passwords for any datasources that require them.Empty stringFormat is provided in the DATASOURCE_CREDENTIALS section below.
DISABLE_LOG_MASKINGDisable masking of credentials in logs. For debug purposes only.false
INCLUDE_TOOLSA comma-separated list of tool names to include in the server. Only these tools will be available.Empty string (all are included)For a list of available tools, see toolName.ts.
EXCLUDE_TOOLSA comma-separated list of tool names to exclude from the server. All other tools will be available.Empty string (none are excluded)Cannot be provided with INCLUDE_TOOLS.
MAX_RESULT_LIMITIf a tool has a "limit" parameter and returns an array of items, the maximum length of that array.Empty string (no limit)A positive number.
DISABLE_QUERY_DATASOURCE_FILTER_VALIDATIONDisable validation of SET and MATCH filter values in query-datasource tool.falseWhen true, skips validation that checks if filter values exist in the target field.

HTTP Server Configuration

When TRANSPORT is http, below are the additional, optional environment variables that can be used to configure the HTTP server.

VariableDescriptionDefaultNotes
HTTP_PORT_ENV_VAR_NAMEThe environment variable name to use for the HTTP server port.PORT
Value of HTTP_PORT_ENV_VAR_NAMEThe port to use for the HTTP server.3927
SSL_KEYThe path to the SSL key file to use for the HTTP server.
SSL_CERTThe path to the SSL certificate file to use for the HTTP server.
CORS_ORIGIN_CONFIGThe origin or origins to allow CORS requests from.trueAcceptable values include true, false, *, or a URL or array of URLs. See cors config options for details.

Personal Access Token Configuration

When AUTH is pat, the following environment variables are required:

VariableDescription
PAT_NAMEThe name of the Tableau Personal Access Token to use for authentication.
PAT_VALUEThe value of the Tableau Personal Access Token to use for authentication.

Direct Trust Configuration

When AUTH is direct-trust, the MCP server will use the provided Tableau Direct Trust Connected App info to generate a scoped JSON Web Token (JWT) and use it to authenticate to the Tableau REST APIs. The generated JWT will have the minimum set of scopes necessary to invoke the methods called by the tool being executed. For example, for the query-datasource tool, since it internally calls into VizQL Data Service, the JWT will only have the tableau:viz_data_service:read scope.

The following environment variables are required:

VariableDescription
JWT_SUB_CLAIMThe username for the sub claim of the JWT.
CONNECTED_APP_CLIENT_IDThe client ID of the Tableau Connected App.
CONNECTED_APP_SECRET_IDThe secret ID of the Tableau Connected App.
CONNECTED_APP_SECRET_VALUEThe secret value of the Tableau Connected App.

The optional JWT_ADDITIONAL_PAYLOAD environment variable is a JSON string that includes any additional user attributes to include on the JWT. The following is an example:

{ "region": "West" }
DATASOURCE_CREDENTIALS

The DATASOURCE_CREDENTIALS environment variable is a JSON string that includes usernames and passwords for any datasources that require them. The format is:

{"ds-luid1":[{"luid":"ds1-connection-luid1","u":"username1","p":"password1"},{"luid":"ds1-connection-luid2","u":"username2","p":"password2"}],"ds-luid2":[{"luid":"ds2-connection-luid1","u":"username3","p":"password3"}]}

This is a JSON-stringified version of the following object:

{
  "ds-luid1": [
    { luid: "ds1-connection-luid1", u: "username1", p: "password1" },
    { luid: "ds1-connection-luid2", u: "username2", p: "password2" }
  ],
  "ds-luid2": [
    { luid: "ds2-connection-luid1", u: "username3", p: "password3" }
  ]
}

The connection LUIDs can be determined using the Query Data Source Connections REST API. Future work will include a tool to automate this process. For more information, see Connect to your data source.

Running the MCP Inspector

The MCP Inspector is a helpful tool to confirm your configuration is correct and to explore Tableau MCP capabilities.

  • Non-Docker users using stdio transport should create a config.json file in the root of the project using config.stdio.json as a template.
  • Non-Docker users using http transport should create a .env file in the root of the project using env.example.list as a template.
  • Docker users should create an env.list file using env.example.list as a template.

After building the project and setting the environment variables, you can start the MCP Inspector using one of the following commands:

CommandTransportDescription
npm run inspectstdioStart the MCP Inspector which runs the server locally using Node.js.
npm run inspect:dockerstdioStart the MCP Inspector which runs the server within a Docker container using Node.js.
npm run inspect:httphttpStart the MCP Inspector which runs the server locally using Express.
npm run inspect:docker:httphttpStart the MCP Inspector which runs the server within a Docker container using Express.

Claude Desktop

For Claude, open the settings dialog, select the Developer section, and click Edit Config.

Add the tableau MCP server to the mcpServers object in the config using config.stdio.json, config.http.json, or config.docker.json as a template.

Cursor

For Cursor, create a configuration file .cursor/mcp.json in your project directory (for project-specific access) or ~/.cursor/mcp.json in your home directory (for global access across all projects).

Add the tableau MCP server configuration using config.stdio.json, config.http.json, or config.docker.json as a template. For more details, see the Cursor MCP documentation.

TypeInstall link
NodeInstall MCP Server
DockerInstall MCP Server

VSCode

For VSCode, create a .vscode/mcp.json file in your workspace folder (for project-specific access) or add the server configuration to your user settings (for global access across all workspaces).

Add the tableau MCP server configuration using config.stdio.json, config.http.json, or config.docker.json as a template. For more details, see the VSCode MCP documentation.

Developers

Contributing

We are following the fork and pull model where contributors will make their own fork of this repo, implement their changes, and then submit a pull request here.

Refer to the Contribution Checklist for more details on the steps.

Debugging

You can use the VS Code Run and Debug Launcher to run and debug the server.

To set up local debugging with breakpoints:

  1. Store your environment variables in the VS Code user settings:

    • Open the Command Palette (F1 or Cmd/Ctrl + Shift + P).

    • Type Preferences: Open User Settings (JSON).

    • This should open your user's settings.json file.

    • Copy the environment variables from .vscode/settings.example.json, append them to the JSON blob in your user's settings.json file, and update their values accordingly:

      "tableau.mcp.SERVER": "https://my-tableau-server.com",
      ...
      
  2. Set breakpoints in your TypeScript files.

  3. Locate and click the Run and Debug button in the Activity Bar.

  4. Select the configuration labeled "Launch MCP Server" in the dropdown.

  5. Click the Start Debugging ▶️ button, or press F5.

Related Servers