Tableau MCP Server

Tableau MCP Server

A production-grade MCP server that exposes Tableau Server/Cloud as a BI platform, enabling project, workbook, data source, user, group, job, lineage, and export operations via natural language, with role-based permissions and token optimization.

Category
访问服务器

README

Tableau MCP Server

A production-grade Model Context Protocol server that exposes Tableau Server/Cloud to Claude (Desktop, Code, and any other MCP-compatible client) as a real business-intelligence platform: projects, workbooks, worksheets/dashboards, published data sources, users and groups, background jobs and refresh schedules, Metadata API (GraphQL) lineage, Pulse metrics/insights, and CSV/PNG/PDF/Hyper exports — all constrained by the signed-in identity's actual Tableau site role and content permissions.

What this is (and isn't)

This is a deliberately-scoped core build: every tool listed below is a real, working implementation against tableauserverclient and Tableau's Metadata API — nothing is a stub that returns fake data. What's not included yet is documented explicitly in Roadmap below, rather than shipped as a half-finished tool that looks complete but isn't.

Quick start

python -m venv .venv
.venv/Scripts/activate        # .venv/bin/activate on macOS/Linux
pip install -e ".[dev]"       # add ",hyper" to also enable Hyper-extract tools

cp .env.example .env
python scripts/generate_keys.py   # paste FERNET_KEY / JWT_SECRET into .env
# then set TABLEAU_SERVER_URL, TABLEAU_SITE_NAME, TABLEAU_PAT_NAME, TABLEAU_PAT_SECRET

pytest                        # run the test suite
python -m src.server          # start over stdio (for Claude Desktop/Code)

Point Claude Desktop / Claude Code at it

A ready-to-use .mcp.json is already in the repo root for Claude Code (auto-discovered on open). For Claude Desktop, or to adapt the config for a different machine, see docs/CLAUDE_SETUP.md for copy-paste-ready configs and how to verify the connection.

Connecting to Tableau Cloud specifically

Works the same as Tableau Server, with two things to get right — both covered in docs/CONFIGURATION.md:

  1. TABLEAU_SITE_NAME must be your site's actual content URL — Cloud has no "Default" site (the server logs a warning at connect time if this looks misconfigured).
  2. Use a PAT (TABLEAU_PAT_NAME/TABLEAU_PAT_SECRET), not username/password — Cloud's MFA/SSO enforcement breaks password sign-in for automation.

TABLEAU_API_VERSION should also be left blank (the default) so the server auto-negotiates against Cloud's continuously-updating REST API version instead of drifting out of date against a pinned one.

Docker

docker compose up --build

Runs over HTTP (MCP_TRANSPORT=http) behind bearer-JWT auth, with a Redis sidecar for shared caching. See docs/SECURITY.md for how to issue tokens.

Deploy

The MCP server itself (above) runs locally over stdio for Claude Desktop/Code — there's nothing to deploy for that. For everything about deploying the web app (webapp/ + frontend/) — including a full free-tier walkthrough (Supabase + Render + Vercel) — see DEPLOY.md.

Documentation

Design principles

  • Clean layering (tools → services → repositories → tableau client), each layer only aware of the one below it — see docs/ARCHITECTURE.md.
  • Repository pattern: tableauserverclient/tableauhyperapi are only ever imported inside src/repositories/ and src/tableau/; everything above speaks in Pydantic domain models (src/models/).
  • Provider-agnostic token optimization (src/optimization/): every prompt is measured, deduplicated, compressed, and budget-checked before it reaches an LLM, and the savings are reported rather than assumed. New strategies plug in through a registry — see docs/TOKEN_OPTIMIZATION.md.
  • Manual dependency injection via a single composition root (src/services/container.py) — explicit and easy to trace, not a framework.
  • Defense in depth on authorization: Tableau's own REST API is always the final authority; src/security/permissions.py adds a fail-fast site-role check in front of it so a caller without the right role gets an immediate, clear error instead of an opaque Tableau 403.
  • Every write is audited (audit_log(...)) to a dedicated, structured log file, separate from general application logs.
  • Every tool response is uniform: {"success": true, "data": ...} or {"success": false, "error": ..., "error_type": ...} — raw tracebacks never reach an MCP client.
  • Async-first: the blocking Tableau SDKs run on a bounded thread pool (asyncio.to_thread/ThreadPoolExecutor) so the MCP event loop stays responsive under concurrent tool calls; the Metadata GraphQL client is native aiohttp.

Project structure

src/
  config/       Pydantic Settings — every value from the environment, nothing hardcoded
  security/     Fernet encryption, JWT issue/verify, Role→Permission matrix
  logging_config/  loguru setup: redacted app logs + dedicated audit trail
  cache/        In-memory or Redis-backed async cache, TTL + prefix invalidation
  tableau/      Connection lifecycle (sign-in, re-auth, retry) + Metadata GraphQL client
  models/       Pydantic domain models (framework-agnostic)
  optimization/ Provider-agnostic token optimizer: tokenizer, pricing, pluggable strategies
  repositories/ tableauserverclient/tableauhyperapi calls, translated to domain models
  services/     Business logic: authorization, caching, audit logging, DI container
  tools/        MCP @mcp.tool() functions — one module per Tableau resource type
  resources/    MCP @mcp.resource() — read-only context (site config, project tree, identity)
  prompts/      MCP @mcp.prompt() — reusable guided BI workflows
  server.py     FastMCP app assembly + stdio/HTTP transport entrypoint
tests/
  unit/         Fast, mock-based tests (config, security, cache, services, tool_helpers)
  integration/  TableauConnectionManager against a faked TSC.Server (no network needed)
  webapp/       Web app tests: auth, chat loop, artifacts, rate limiting
webapp/         Multi-user web app (FastAPI) — see docs/WEBAPP.md
frontend/       Web app UI (Next.js)
alembic/        Postgres schema migrations for webapp/ — see "Deploy" above
docs/           Architecture, tools reference, security, configuration, troubleshooting
scripts/        generate_keys.py / generate_webapp_keys.py — secret generation

Roadmap

Deliberately deferred to a follow-up phase rather than included as thin/undertested stubs (see the "Deep core first" scoping decision this build made):

  • Hyper extract writing — building new .hyper files from arbitrary data (tableauhyperapi.Inserter). Extract reading (list_hyper_tables, preview_hyper_extract) is implemented today.
  • Statistical/ML analytics tools — forecasting, anomaly detection, clustering, regression, root-cause analysis. pyproject.toml's analytics extra already pins the libraries (scipy, statsmodels, scikit-learn, polars, duckdb) these would build on.
  • Additional export formats — PowerPoint, Parquet, JSON (CSV, PNG, PDF, and Hyper are implemented).
  • Kubernetes manifests — Docker + docker-compose are provided; a Helm chart / raw manifests are not yet.
  • SSO/OIDC-federated Tableau auth flows beyond PAT and username/password (the auth_setting field on create_user supports federated site configuration, but this server doesn't itself broker an OIDC/SAML login).

License

Proprietary — internal enterprise use.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选