Who’s Down With M.C.P.?

Some of you may be too young to catch the reference. But if you know me (see what I did there?), then you know that one of the things I love right up there with data analytics is Hip Hop (especially 80s and 90s). If data analytics is your thing, then you’ve no doubt heard about MCP (Model Context Protocol).

So What Exactly is MCP?

MCP is an open protocol that allows you to connect your LLM to external data sources and tools. Think of it as a universal adapter that lets your LLM communicate directly with your external applications such as Tableau.

By integrating MCP with Tableau, you can:

  • Query your datasources using natural language
  • Gain insights from your data without having to write SQL queries
  • Quicken your understanding of the fields in your data and related metadata
  • Ask ad-hoc questions of your data and receive immediate answers

The above list is ony scratching the surface. I decided to finally experiment with MCP using Claude and the famous Superstore dataset on my cloud instance. Minus some minor hiccups, setting up and testing an MCP connection with Tableau Server was surprisingly easy.

What You’ll Need

  1. A Tableau Server or Tableau Cloud account (Explorer or Creator role) with published data sources
  2. Access to Claude (preferably desktop: claude.ai)
  3. Node.js (version 18+: nodejs.org)
  4. Your Tableau site URL
  5. A personal access token set up on your Tableau instance

Setting Up Your Tableau-MCP Connection

Step 1: Create a Personal Access Token

  1. Log into your Tableau site
  2. Go to your account settings
  3. Scroll to the “Personal Access Tokens” section and create a new token
  4. Come up with a memorable name for the task (e.g. “MCP-demo”)
  5. Save the token name and secret in a secure location
  6. Copy both the token name and secret immediately! -You will only see your token secret once.

Step 2: Install Tableau MCP Server

Open Command Prompt (Win) or Terminal (Mac) and create your project directory:

# Create project directory
mkdir tableau-mcp-demo
cd tableau-mcp-demo

# Install MCP server
npm init -y
npm install @tableau/mcp-server

Note: Windows users, us Command Prompt rather than PowerShell (unless you have enabled script execution).

Expected Output:

added 108 packages, and audited 109 packages in 7s
23 packages are looking for funding
found 0 vulnerabilities

Step 3: Configure Claude Desktop

We now need to tell Claude Desktop how to connect to Tableau MCP server.

Locate Your Configuration File

The configuration file location depends on your operating system.

Windows:

%APPDATA%\Claude\claude_desktop_config.json

or for quick access… Press Win + R -> Type %APPDATA%\Claude -> Press Enter

Mac:

~/Library/Application Support/Claude/claude_desktop_config.json

If the file does not yet exist, don’t panic (like I did at first)…

  1. Right-click on your Claude folder
  2. Select “New -> Text Document”
  3. Name it exactly: claude_desktop_config.json
  4. Make sure the file type is .json and not .txt

Add Your Configuration

Open claude_desktop_config.json in a text editor (Notepad, VS Code, etc.) and add the following configuration. -Using npx is not the only way to add the configuration, but I found it to be less prone to errors.

{
  "mcpServers": {
    "tableau": {
      "command": "npx",
      "args": ["-y", "@tableau/mcp-server@latest"],
      "env": {
        "SERVER": "https://your-instance.online.tableau.com",
        "SITE_NAME": "your-site-name",
        "PAT_NAME": "MCP-demo",
        "PAT_VALUE": "your_actual_token_secret_here"
      }
    }
  }

Be sure to replace the .json above with your own instance values. Keep in mind that the “SERVER” information is not the entire server url, and the token name is case-sensitive. Here’s an example of what the values could look like given the following Tableau site url.

Your Tableau URL: https://10ax.online.tableau.com/#/site/datadevdiary/home
SERVER value: "https://10ax.online.tableau.com"
SITE_NAME value: "datadevdiary"

Step 4: Restart and Test

  • Be sure to restart Claude Desktop completely! Don’t just close the window. -This is where I initially went wrong. Wait at least 10 seconds before reopening.
  • Verify the connection: Click the “Search and Tools” menu from within the prompt window -> Check to make sure the Tableau connector is enabled (see below).

You should now be able to test your first query!

Example:

Using Tableau MCP tools, can you list the data sources available in my Tableau environment?

You should now see all your data sources organized by project…

Real Example: Analyzing Superstore Data

Example 1: Understanding your Data

Question:

Can you look specifically at the Sample-Superstore dataset and describe the fields available in the datasource?

What Claude does:

  • Finds the datasource
  • Pulls all 27 fields
  • Organizes them into categories (Order Info, Customer Info, Product Info, Financial Metrics, etc.).

Example 2: More Complex Business Analysis

Question:

What are the top 5 states with the highest profit per unit sold in the last 5 years?

Claude responds by:

  • Filtering the last 5 years
  • Calculating profit per unit for each state
  • Ranking the results

Claude’s additional insight:

  • Vermont leads with nearly $45 profit per unit despite low volume
  • Minnesota and Indiana show strong profitability with substantial volume
  • High-volume states like Texas and Ohio show negative profit per unit

One of the real transformative aspects of being able query in natural language, is that Claude maintains the context of the conversation. Claude recalls that we were discussing Texas, Ohio and Pennsylvania and automatically digs a bit deeper.

Real Benefits:

  • Management and Leadership: Can get answers quickly without leaving the conversation.
  • Analysts: Explore data faster, with more time available for analysis due to shortened query time. Instead of building a dashboard to answer every question, dialogue with your data and take advantage of quick wins.
  • Business Users: Access data and insights without requiring heavy technical skills.

Additional Resources

Ready to explore further? Here are the essential resources:

Official Documentation:

Discover More:

Get Help:

One response to “Who’s Down With M.C.P.?”

  1. […] Who’s down With M.C.P.? by Jhosua Vijeh […]