Tableau Graphql Mcp

io.github.tdries由 GitHub 账号 tdries 发布v0.2.0更新于 Oct 24, 2026

Ask any Tableau lineage question, in any MCP client, through the Tableau Metadata API.

已验证STDIO仅桌面数据库数据与分析

概览

AI 生成的概览

把 Tableau 站点的 Metadata API 封装成只读 MCP 工具,让助手用自然语言回答血缘与影响范围问题。

可以做什么
  • 执行任意只读的 Metadata API GraphQL 查询,触及节点上限时标记结果不完整
  • 实时查看 schema,并调用内置查询模板与示例
  • 查询指定列、字段或表被哪些工作簿和数据源使用
  • 追踪列、字段或表的多跳影响范围,含受影响的表、仪表板、工作簿及需通知的负责人
  • 按名称子串搜索工作簿、数据源和表,并给出扫描覆盖数
  • 查看所连服务器、站点、版本、端点与认证状态
适用场景
适合在修改 Tableau 列、字段或表之前确认会影响哪些内容、某个工作簿依赖哪些数据源,以及该通知谁;答案来自实时元数据而非固定报表。
运行要求
通过 uvx 以 stdio 在本地运行(Python 包,需安装 uv)。需设置 TABLEAU_SERVER、TABLEAU_PAT_NAME 和 TABLEAU_PAT_SECRET,非默认站点还需 TABLEAU_SITE_CONTENT_URL;SSO 租户可改用 TABLEAU_AUTH_TOKEN 或 TABLEAU_COOKIE。需能通过 HTTPS 访问 Tableau 主机;Tableau Server 上需管理员启用 Metadata API。
安装前请注意
TABLEAU_PAT_SECRET 或会话 Cookie 可访问该 Tableau 账号可见的全部内容,应放在客户端 env 配置中并限制账号权限。结果受你的 Tableau 权限限制。设计上只读,但查询与元数据会经 HTTPS 发送到你的 Tableau 主机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Tableau Graphql Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[tableau-graphql-mcp]

tableau-graphql-mcp

Ask any Tableau lineage question, in any MCP client, through the Tableau Metadata API.

[CI] [CodeQL] [OpenSSF Best Practices] [OpenSSF Scorecard] [Ruff] [PyPI] [Python versions] [MCP compatible] [MIT License] [Server + Cloud] [Minimal dependencies]

[Add to Cursor]

[Asking lineage questions in Claude]


tableau-graphql-mcp turns your Tableau site's Metadata API into a set of MCP tools, so an AI assistant (Claude, Cursor, Cline, and others) can answer lineage questions in plain language:

  • "If I drop the column SALES, which workbooks break?"
  • "What tables does the Sales Overview workbook depend on?"
  • "Which calculated fields reference Profit, and on which dashboards?"
  • "Who should I notify before changing the DIM_CUSTOMER table?"

It ships seven curated tools: a universal GraphQL passthrough, live schema introspection, an embedded library of correct query templates, a robust where_used resolver, a multi-hop impact_analysis, a substring content search, and a connection probe. Together they let the model answer any lineage question, not just a fixed menu.

Why it's different

  • Any question, done right. graphql_query runs any read-only GraphQL; introspect_schema and a built-in cheat-sheet plus 28 worked examples keep the model's queries correct.
  • True impact analysis (multi-hop). impact_analysis follows the whole dependency chain (a calc built on a calc built on a column is included) and returns the full blast radius plus the de-duplicated owners to notify, not just direct references.
  • Works everywhere. Tableau Server and Cloud. The REST API version and the GraphQL endpoint (/api/metadata/graphql, with a /relationship-service-war/graphql fallback) are auto-detected.
  • Robust lineage without Catalog. where_used resolves workbooks via core lineage (referencedByFields -> sheets -> workbook), so it works even when the Data Management add-on's downstreamWorkbooks is empty.
  • No silent truncation. graphql_query flags partial_results when a query hits the node limit, and search_content reports scanned/total coverage, so a truncated answer is never mistaken for a complete one.
  • Tiny and safe. Read-only, stdio-only (no inbound port), secrets from env only, and no dependencies beyond the MCP SDK (stdlib urllib for HTTP).

Quickstart

You need uv (curl -LsSf https://astral.sh/uv/install.sh | sh) and a Tableau Personal Access Token.

Claude Code, one line:

bash
claude mcp add tableau-graphql \  -e TABLEAU_SERVER=https://10ax.online.tableau.com \  -e TABLEAU_SITE_CONTENT_URL=YourSite \  -e TABLEAU_PAT_NAME=my-token \  -e TABLEAU_PAT_SECRET=the-full-secret \  -- uvx tableau-graphql-mcp

That's all. uvx fetches the package from PyPI and runs it in an isolated environment; nothing to clone or install (and no git required). Then ask Claude a lineage question.

Configuration

All configuration is via environment variables (set them in your client's env block, never on the command line).

Env varRequiredDefaultDescription
TABLEAU_SERVERyesn/ahttps://tableau.company.com (Server) or https://<pod>.online.tableau.com (Cloud).
TABLEAU_SITE_CONTENT_URLno""Site slug (the part after /#/site/). Empty = Default site (Server only); Cloud always has one.
TABLEAU_PAT_NAMEyes¹n/aPersonal Access Token name.
TABLEAU_PAT_SECRETyes¹n/aPAT secret: the whole string, do not split on :.
TABLEAU_TIMEOUTno60Per-request timeout (seconds).
TABLEAU_API_VERSIONnoautoREST API version; else read from /api/serverinfo.
TABLEAU_METADATA_PATHnoautoOverride the GraphQL path; else auto-detected.
TABLEAU_ALLOW_HTTPnooffSet to 1 to allow a plain http:// server on a trusted internal network. Otherwise only HTTPS (or loopback) is accepted, so credentials never travel unencrypted.
TABLEAU_LOG_LEVELnoINFODEBUG logs each HTTP call (method + URL; never headers, bodies or secrets) to stderr.
TABLEAU_AUTH_TOKENnon/aAdvanced: a pre-obtained X-Tableau-Auth token (SSO tenants where PATs are disabled).
TABLEAU_COOKIEnon/aAdvanced: a browser session cookie (SSO fallback).

¹ Provide a PAT (TABLEAU_PAT_NAME + TABLEAU_PAT_SECRET) or an advanced TABLEAU_AUTH_TOKEN / TABLEAU_COOKIE.

Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\):

json
{  "mcpServers": {    "tableau-graphql": {      "command": "uvx",      "args": ["tableau-graphql-mcp"],      "env": {        "TABLEAU_SERVER": "https://10ax.online.tableau.com",        "TABLEAU_SITE_CONTENT_URL": "YourSite",        "TABLEAU_PAT_NAME": "my-token",        "TABLEAU_PAT_SECRET": "the-full-secret"      }    }  }}

Fully quit and reopen Claude Desktop, then check the tools menu.

Cursor · Cline · Windsurf

Every client uses the same mcpServers schema shown above. Add the same block to:

  • Cursor: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
  • Cline: the MCP Servers panel, then Configure, into cline_mcp_settings.json.
  • Windsurf: ~/.codeium/windsurf/mcp_config.json.

On Windows, if uvx isn't found by the GUI app, use its absolute path (e.g. %USERPROFILE%\.local\bin\uvx.exe).

Tools

ToolWhat it doesKey args
graphql_queryRun any read-only Metadata API GraphQL query. The general tool for any lineage question.query, variables
introspect_schemaLive schema introspection: list entry points, or a type's exact fields.type_name
lineage_examplesA schema cheat-sheet plus 28 curated question-to-GraphQL templates (8 categories).category
where_usedWhich workbooks/datasources use given column / field / table names (robust one-hop core-lineage resolution).names
impact_analysisFull transitive multi-hop blast radius of a column/field/table: every dependent field, plus affected sheets, dashboards, workbooks, and owners to notify.name
search_contentFind content whose name contains a term (case-insensitive substring), across workbooks, datasources, tables (and optionally fields/columns), with coverage numbers.term, types
server_infoConnected server, site, versions, endpoint, auth, and whether Catalog lineage is available.none

All tools are read-only. The Metadata API has no mutations.

Example prompts

Once connected, try:

  • "Use server_info to confirm what you're connected to."
  • "Search for anything with 'revenue' in the name."
  • "Which workbooks use the columns SALES, PROFIT and DISCOUNT? Group by owner."
  • "Show me the field-to-source-column map for the 'Sales Overview' workbook."
  • "List every calculated field in that workbook with its formula."
  • "Which published datasources feed workbooks in the Analytics project, and which are uncertified?"
  • "Run impact_analysis on the 'Profit Ratio' field: every dependent sheet, dashboard, workbook, and owner to notify."
  • "What is the blast radius of dropping the DIM_CUSTOMER table: workbooks, sheets, and owners to notify?"

Architecture

[Architecture]

The server speaks MCP over stdio to the client and HTTPS to Tableau: it signs in with your PAT to get an X-Tableau-Auth token (auto-refreshed on expiry), auto-detects the REST API version and the GraphQL endpoint, then forwards queries to the Metadata API. Nothing is stored; every answer is live.

Security

  • Read-only, enforced. Only GraphQL queries: no writes, no shell. graphql_query rejects mutation/subscription operations, and the Metadata API is query-only regardless.
  • Declared read-only. Every tool carries the MCP readOnlyHint annotation, so clients can verify it without reading the code.
  • Local and stdio-only. No inbound network port is opened.
  • Secrets from env only. Never passed as tool arguments, never logged, never returned in output.
  • Credentials go only to your Tableau host. HTTPS is required, certificates are verified, and redirects are refused.
  • Least privilege. The PAT inherits your Tableau permissions; the API only returns content you can see.
  • Verifiable releases. Every GitHub release carries Sigstore signatures and a CycloneDX SBOM, and PyPI uploads use Trusted Publishing.
  • Pin a version in production: uvx tableau-graphql-mcp==0.2.0.

See SECURITY.md for the threat model, data handling, disclosure policy and how to verify a release.

Troubleshooting

SymptomFix
Server doesn't appearFully quit and relaunch the client; check the config path and JSON validity.
spawn uvx ENOENTInstall uv, or use the absolute path to uvx.
Sign-in fails (401)Check the PAT name/secret and TABLEAU_SITE_CONTENT_URL. On SSO tenants PATs may be disabled; use TABLEAU_AUTH_TOKEN/TABLEAU_COOKIE.
"Could not reach the Metadata API"On Tableau Server, an admin must enable it: tsm maintenance metadata-services enable. On Cloud it is always on.
Empty downstreamWorkbooksExpected without the Data Management add-on; use the where_used tool, which resolves via core lineage.

Inspect the server directly with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector uvx tableau-graphql-mcp

Development

bash
git clone https://github.com/tdries/tableau-graphQL-mcp && cd tableau-graphQL-mcpuv sync --all-extrasuv run tableau-graphql-mcp                     # run from sourceuv run pytest --cov=tableau_graphql_mcp        # tests + coverage (offline; no Tableau needed)uv run ruff check .                            # lintuv run ruff format --check .                   # format

The same gates run in CI (Linux/macOS/Windows, Python 3.10 to 3.13): ruff check, ruff format --check, mypy --strict, and pytest with a coverage floor. The package ships a PEP 561 py.typed marker, so importing it gives your type checker full types. CodeQL scans every push, and a weekly fuzzing job (fuzz/) attacks the read-only guard.

Contributions welcome: see CONTRIBUTING.md and the Code of Conduct.

Roadmap

Shipped: published on PyPI and listed on the official MCP registry. Next:

  • Optional Data Management path: richer downstreamWorkbooks when Catalog is present
  • More curated query templates in lineage_examples
  • Optional response caching for repeated introspection within a session

Ideas and votes welcome in Discussions.

License

MIT © Tim Dries. Built at Biztory.

来源:README.md,提交 992a1e6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.0最新Oct 14, 2026
  2. v0.1.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分