Tableau MCP Server
A Model Context Protocol (MCP) server for Tableau Cloud that provides dashboard access, data querying, and export capabilities through Cursor IDE.
Features
๐ Discovery & Search - Find workbooks, views, and data sources
๐ Data Access - Query view data with filters as CSV or JSON
๐ค Export - Export dashboards as PDF, PNG, or PowerPoint
๐ Data Refresh - Trigger extract refreshes for data sources
Prerequisites
Node.js 18.x or later
Google Cloud Platform account with:
Cloud Run enabled
Secret Manager enabled
Cloud Storage bucket for exports
Tableau Cloud/Server with:
Personal Access Token (PAT) credentials
API access enabled
Quick Start
1. Clone and Install
2. Configure Environment Variables
Create a .env file (or set environment variables):
3. Run Locally
The server starts on http://localhost:8080:
Health check:
GET /healthSSE endpoint:
GET /sseandPOST /sse
4. Configure Cursor
Add to your .cursor/mcp.json:
Note: Replace
<your-api-key>with your actual API key from Secret Manager (tableau-mcp-api-key).
Available Tools
Utility Tools
Tool | Description |
| Get guidance on using Tableau MCP tools |
| Search content across Tableau |
Dashboard Tools
Tool | Description |
| List all accessible workbooks |
| Get workbook details |
| List views in a workbook |
| Get available filters for a view |
| Store filters for query/export |
Data Tools
Tool | Description |
| Export view data as CSV/JSON |
| List published data sources |
| Trigger extract refresh |
Export Tools
Tool | Description |
| Export view as PDF |
| Export view as PNG |
| Export view as PowerPoint |
Usage Examples
Find and Export a Dashboard
Query Filtered Data
Deployment
Cloud Run Deployment
Create GCS Bucket
gsutil mb -l australia-southeast1 gs://tableau-mcp-exportsCreate Secrets in Secret Manager
echo -n "your-pat-name" | gcloud secrets create tableau-pat-name --data-file=- echo -n "your-pat-secret" | gcloud secrets create tableau-pat-secret --data-file=- echo -n "your-api-key" | gcloud secrets create tableau-mcp-api-key --data-file=-Grant Service Account Permissions
# Secret Manager access gcloud secrets add-iam-policy-binding tableau-pat-secret \ --member="serviceAccount:YOUR_SA@PROJECT.iam.gserviceaccount.com" \ --role="roles/secretmanager.secretAccessor" # GCS access gsutil iam ch serviceAccount:YOUR_SA@PROJECT.iam.gserviceaccount.com:objectCreator,objectViewer \ gs://tableau-mcp-exportsConfigure Cloud Build Trigger
Source: Your GitHub repository
Event: Push to
mainbranchConfiguration:
cloudbuild.yamlSubstitution variables:
_TABLEAU_SERVER_URL: Your Tableau Cloud URL_TABLEAU_SITE_ID: Your site content URL_GCS_EXPORT_BUCKET: Your export bucket name
Deploy Push to
mainbranch to trigger automatic deployment.
Manual Deployment
Configuration Reference
Environment Variables
Variable | Required | Description |
| โ | Tableau Cloud/Server URL |
| โ | Site content URL |
| โ | Personal Access Token name |
| โ | Personal Access Token secret |
| โ | API key for MCP authentication |
| โ | GCS bucket for exports |
| โ | Google Cloud project ID |
| โ | Server port (default: 8080) |
| โ | API version (default: 3.21) |
Cloud Run Settings
Setting | Value |
Region | australia-southeast1 |
Memory | 1Gi |
CPU | 1 |
Timeout | 300s |
Min instances | 1 |
Max instances | 10 |
Concurrency | 80 |
Limitations
Filters: Cannot apply filters to live dashboard views - only at query/export time
PPTX Export: Generated from PNG images, not native Tableau export
Data Query: Maximum 100,000 rows per request
Export URLs: Valid for 1 hour only
Rate Limits: Throttled to 10 requests/second to Tableau API
Project Structure
Troubleshooting
Authentication Errors
Verify PAT credentials are correct
Check that PAT has not expired
Ensure site ID matches the site content URL (not the site name)
Export Failures
Check GCS bucket exists and is accessible
Verify service account has
objectCreatorandobjectViewerrolesLarge exports may timeout - try smaller views or increase Cloud Run timeout
Rate Limiting
The server throttles to 10 requests/second
Batch operations may be slower due to throttling
Consider increasing throttle limit for Tableau Server (not Cloud)
License
MIT
Author
Agile Market Intelligence