Tableau MCP Starter Kit
An implementation of Tableau MCP with LangChain for providing AI functionality Tableau Server or Cloud
Ask AI about Tableau MCP Starter Kit
Powered by Claude ยท Grounded in docs
I know everything about Tableau MCP Starter Kit. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Tableau MCP Starter Kit
A powerful integration that brings AI functionality to Tableau Server or Tableau Cloud using MCP and LangChain, enabling natural language interactions with the data you trust in Tableau.
This repo is an implementation of tableau-mcp using the MCP tools with LangChain, building on the tableau_langchain_starter_kit.
๐ Features
- Natural language querying of Tableau data
- Available via Web interface or Dashboard extension
- Support for both Tableau Server and Tableau Cloud
๐ Prerequisites
Before you begin, ensure you have the following:
- Tableau Server Version 2025.1 or later OR Tableau Cloud, a free Tableau Cloud trial is available via the Tableau Developer Program
- Python 3.12+ - Download Python
- Git - Download Git
- API credentials for your chosen AI model (OpenAI, etc.)
โ ๏ธ Warning
When using this code, data from Tableau will be sent to an external AI model (by default, OpenAI). For learning and testing, it is strongly recommended to use the Superstore dataset included with Tableau.
If you need to process sensitive or proprietary information, consider configuring the tool to use a local AI model instead of an external service. This approach ensures your data remains within your organisationโs infrastructure and reduces the risk of data exposure.
๐บ Quickstart Tableau MCP Guides
If you haven't tried Tableau MCP yet I recommend testing it out using desktop applications like Claude Desktop and VSCode. You can find links to my quickstart tutorials below.
๐บ Step Up Guide
๐ ๏ธ Installation
1. Install Tableau MCP
git clone https://github.com/tableau/tableau-mcp.git
cd tableau-mcp
From the Install Guide
Install Node.js (tested with 22.15.0 LTS)
npm install
npm run build
2. Clone the Starter Kit Repository
git clone https://github.com/TheInformationLab/tableau_mcp_starter_kit.git
cd tableau_mcp_starter_kit
3. Create Virtual Environment
Creating a virtual environment helps isolate project dependencies:
python -m venv .venv
4. Activate Virtual Environment
Windows:
.venv\Scripts\activate
macOS/Linux:
source .venv/bin/activate
๐ก Tip: You should see (.venv) at the beginning of your command prompt when the virtual environment is active.
5. Install Dependencies
pip install -r requirements.txt
If you encounter any installation issues, try upgrading pip first:
pip install --upgrade pip
โ๏ธ Configuration
Environment Variables Setup
- Copy the template environment file:
cp .env_template .env
- Open the
.envfile in your preferred text editor and configure the following variables:
# Tableau MCP Server Config
TRANSPORT='stdio'
SERVER='https://my-tableau-server.com'
SITE_NAME='TableauSiteName'
PAT_NAME='Tableau Personal Access Token (PAT) Name'
PAT_VALUE='Tableau Personal Access Token (PAT) Secret Key'
# Tableau MCP Server Optional Configs
DATASOURCE_CREDENTIALS=''
DEFAULT_LOG_LEVEL='debug'
INCLUDE_TOOLS=''
EXCLUDE_TOOLS=''
MAX_RESULT_LIMIT=''
DISABLE_QUERY_DATASOURCE_FILTER_VALIDATION=''
# Local Filepath Config
TABLEAU_MCP_FILEPATH='your/local/filepath/to/tableau-mcp/build/index.js'
# Model Providers
OPENAI_API_KEY='from OpenAI developer portal'
# Langfuse
LANGFUSE_PUBLIC_KEY = 'Public key from https://langfuse.com/'
LANGFUSE_SECRET_KEY = 'Secret key from https://langfuse.com/'
LANGFUSE_HOST = 'https://cloud.langfuse.com'
# Custom MCP Tool Extra Configs
# from: https://github.com/wjsutton/tableau-mcp-experimental
FIXED_DATASOURCE_LUID='unique identifier for a data source found via the graphql metadata API'
โ ๏ธ Security Note: Never commit your .env file to version control. It's already included in .gitignore.
๐โโ๏ธ Running the Application
Web Interface Mode
Launch the full web application with dashboard extension support:
python web_app.py
Once running, open your browser and navigate to:
- Local development:
http://localhost:8000 - The application will display the correct URL in the terminal
You will now be able to ask questions in natural language:
- "What are the trends in customer satisfaction?"
- "Compare revenue between Q1 and Q2"
- "Show me outliers in the sales data"
You can also run this web application with dashboard extension support.
Once running, open your Tableau workbook, or the Superstore Dashboard
On a dashboard page, in the bottom left menu, drag a dashboard extension, local extension, and select tableau_langchain.trex from the dashboard_extension folder.
Custom Dashboard Extension
The script dashboard_app.py is configured to use only a single datasource, using custom tools from https://github.com/wjsutton/tableau-mcp-experimental.
To do
- Install the custom tools:
git clone https://github.com/wjsutton/tableau-mcp-experimental.git
cd tableau-mcp-experimental
- With Node.js (tested with 22.15.0 LTS) execute:
npm install
npm run build
- Return to the Tableau MCP Starter Kit:
cd ..
cd tableau_mcp_starter_kit
-
In dashboard_app.py, update:
Line 36: mcp_locationto the local file path of tableau-mcp-experimental -
Find your datasource luid, you can use the utilities/find_datasource_luid.gql to query your Tableau Server / Cloud's Metadata API.
-
In .env add your datasource luid to the FIXED_DATASOURCE_LUID environment variable.
-
Run the dashboard_app script
python dashboard_app.py
Verify the app is running, open your browser and navigate to:
- Local development:
http://localhost:8000 - The application will display the correct URL in the terminal
Once running, open your Tableau workbook, or the Superstore Dashboard
On a dashboard page, in the bottom left menu, drag a dashboard extension, local extension, and select tableau_langchain.trex from the dashboard_extension folder.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ค Get Involved
- Check out the Tableau MCP repo for further developments
- Join the #tableau-ai-solutions conversation on Slack. Sign up to the DataDev Slack channel here.
๐ Acknowledgments
- Tableau MCP the team developing the tools
- The Tableau LangChain Starter Kit the prequel to this project
- LangChain for the AI framework
- Tableau for the visualisation platform
- All contributors who have helped improve this project
โญ If you find this project helpful, please consider giving it a star!
