连接器指南阅读约 7 分钟42 个 MCP 工具7 种语言

如何通过 MCP 将 Tableau 连接到 Gemini

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

HC作者:HelpCode 团队更新于 7 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Tableau

Tableau

Tableau Cloud and Server: find workbooks, views and data sources, read view data as CSV, images and PDFs, query published data sources, trace lineage, manage projects, tags, group members and extract refreshes.

个工具

42

区域

INTL

类别

数据分析

身份验证

Sign-in token

所需环境变量

TABLEAU_SERVER_URLTABLEAU_PAT_NAMETABLEAU_PAT_SECRET
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 Tableau,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

试试这样问

Tableau 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Tableau · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Tableau、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Tableau + Gemini

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

TABLEAU_SERVER_URL、TABLEAU_PAT_NAME、TABLEAU_PAT_SECRET(可选:TABLEAU_SITE)

步骤 1 — 获取凭证

配置大约需要 5 分钟。你需要一个 Tableau Cloud 站点或 Tableau Server 2024.2 及以上版本,以及一个能看到 AI 所需内容的 Tableau 用户。

  1. 在 Tableau 中打开 Account Settings 的 Personal Access Tokens 部分,输入令牌名称并点击 Create Token。在 Tableau Server 上,可能需要管理员先允许使用个人访问令牌。
  2. 把令牌名称复制到 TABLEAU_PAT_NAME,把只显示一次的密钥复制到 TABLEAU_PAT_SECRET。两者都区分大小写。
  3. 在 TABLEAU_SERVER_URL 中填写不带路径的地址:Tableau Cloud 填浏览器中看到的 pod 主机,例如 https://prod-useast-a.online.tableau.com;Tableau Server 填它自己的地址,例如 https://tableau.example.com。
  4. 在 TABLEAU_SITE 中填写站点的内容 URL,即浏览器地址中 /site/ 之后的部分(#/site/acme/home 对应 acme)。Tableau Server 的 Default 站点留空即可。
  5. 安装连接器并运行 tableau_get_current_session:它会显示站点和用户并确认登录成功。其中的 site.id 就是每个站点工具都需要的 site_id。

连接器用令牌登录并复用会话,会话过期后会重新登录。Tableau 每个令牌同一时间只允许一个会话,所以不要在其他工具中使用同一个令牌。Tableau Cloud 会吊销 15 天未使用的令牌,届时请新建一个。

以谁的权限运行:AI 只能看到和更改该令牌用户按其站点角色和权限可以看到和执行的内容。

读取的内容:服务器版本和最新的 REST API 版本、站点及其设置。跨工作簿、视图、数据源、项目、流程、指标、表和数据库的关键词搜索。项目、带视图和数据连接的工作簿,以及带访问次数的视图。仪表板显示的内容:视图背后的数据(CSV)、模型可以查看的 PNG 图片、单个视图或整个工作簿的 PDF,以及 Excel 文件形式的交叉表,均可按需用视图筛选器缩小范围。已发布的数据源及其连接、认证和数据提取信息,它们的字段(tableau_read_datasource_metadata),以及使用维度、聚合度量、筛选和排序的查询(tableau_query_datasource)。通过 Metadata API 上的 GraphQL 查看数据沿袭(tableau_metadata_query):哪些工作簿使用某个数据源,上游的数据库、表和列,计算字段,所有者和数据质量警告。用户、组和组成员,后台作业以及计划的数据提取刷新任务。

写入的内容:立即刷新工作簿或已发布数据源的数据提取,在计划时间之外运行计划的数据提取刷新任务,创建和修改项目,重命名工作簿或开关其标签页,把工作簿移到另一个项目(其权限可能随目标项目的设置变化),为工作簿和数据源添加标签,以及把站点用户加入本地组(Active Directory 组从目录同步)。刷新会返回一个作业,AI 用 tableau_get_job 跟踪其进度。

安装时关闭:tableau_cancel_job,因为取消的作业无法继续,只能重新启动。团队需要时由管理员开启。

数据格式:ID 是 LUID(UUID)。列表以 {"pagination": {"pageNumber", "pageSize", "totalAvailable"}, "workbooks": {"workbook": [...]}} 的形式返回,项目、视图、数据源、用户、组和作业也一样。时间为 UTC 的 ISO 8601。tableau_get_view_data 返回带标题行的 CSV 文本,数字格式与视图中一致。tableau_query_datasource 把 data 作为对象列表返回,键是带函数的字段标题,例如 SUM(Sales)。视图筛选器使用 vf_ 前缀加视图中显示的字段名,例如 {"vf_Region": "West"},多个值用逗号分隔。作业的 finishCode 为 0 表示成功,1 表示失败,2 表示已取消。

分页、筛选和排序:列表工具接受 page_size(最多 1000)和 page_number;只要 pageNumber * pageSize 小于 totalAvailable,AI 就继续翻页。tableau_search_content 用 limit 和 page 分页,响应中包含总数。filter 的格式为 field:operator:value,多个条件用逗号连接,例如 projectName:eq:Finance,updatedAt:gt:2026-01-01T00:00:00Z;in 接受 [a,b]。sort 为 field:asc 或 field:desc。

前提条件:tableau_read_datasource_metadata 和 tableau_query_datasource 需要开启了 VizQL Data Service 的 Tableau Cloud 或 Tableau Server 2025.1,并且数据源上要有 API Access 功能。tableau_metadata_query 需要 Metadata API,它在 Tableau Cloud 上默认开启,在 Tableau Server 上由管理员启用。tableau_search_content 需要 Tableau Cloud 或 Tableau Server 2022.3 及以上版本。

常见错误:Tableau 以 {"error": {"code", "summary", "detail"}} 应答。401(代码 401001 和 401002)表示令牌错误或已过期,或站点内容 URL 错误。403 表示令牌用户没有相应权限。404 表示 ID 错误或使用了其他站点的 site_id;登录时出现则表示 TABLEAU_SERVER_URL 有误(只填协议和主机)或服务器版本低于 2024.2。400 表示筛选器或参数无效,409 表示名称重复或刷新已在队列中。

该连接器不会发布、下载或删除工作簿和数据源,不会删除项目,不会向站点添加用户或更改站点角色,也不会移除标签或组成员。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Gemini 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 gemini。
  3. 在 Gemini CLI 中运行 /mcp(或在终端运行 gemini mcp list),anythingmcp 应显示为已连接。
  4. 开始输入提示,Gemini CLI 现在可以调用 Tableau 的工具。

可用工具

ToolWhat it does
tableau_get_current_sessionThe signed-in session: site (id, name, contentUrl) and user (id, name, site role)
tableau_get_server_infoProduct version, build and the newest REST API version of the Tableau Server or Tableau Cloud pod
tableau_list_sitesSites the signed-in user can reach (on Tableau Cloud usually only the signed-in one): id, name, contentUrl, state, admin mode
tableau_get_siteSettings of a site: name, contentUrl, state, storage quota, user quota, and which features (subscriptions, flows, Ask Data, ...) are on
tableau_search_contentSearch the site's content by words: workbooks, views, data sources, projects, flows, metrics, tables, databases
tableau_list_projectsProjects (folders) of the site: id, name, description, parent project id, owner, content permissions mode
tableau_list_workbooksWorkbooks of the site: id, name, contentUrl, project, owner, size, tags, created and updated time, webpageUrl
tableau_get_workbookOne workbook: name, description, project, owner, tags, views, data acceleration and freshness settings, webpageUrl
tableau_list_workbook_viewsViews (sheets and dashboards) of a workbook: id, name, contentUrl, and with include_usage_statistics the total view count
tableau_list_workbook_connectionsData connections of a workbook: type, server address, port, user name, and the published data source behind each
tableau_list_viewsViews of the whole site: id, name, contentUrl, workbook, owner, project, tags, and with include_usage_statistics the view count
tableau_get_viewOne view: name, contentUrl, workbook, owner, project, tags, and with include_usage_statistics the view count
tableau_get_view_dataThe data behind a view as CSV text (the summary data of its marks), optionally filtered with vf_ filters
tableau_get_view_imageA PNG image of a view, returned as an image the model can look at, optionally filtered with vf_ filters
tableau_get_view_pdfA PDF of one view, returned as a file, with paper size and orientation, optionally filtered with vf_ filters
tableau_download_view_crosstab_excelThe crosstab of a view as an Excel file (.xlsx), returned as a file, optionally filtered with vf_ filters
tableau_get_workbook_pdfA PDF of all views of a workbook, returned as a file, with paper size and orientation
tableau_list_datasourcesPublished data sources of the site: id, name, type (database type), project, owner, tags, certification, whether it has an extract, created…
tableau_get_datasourceOne published data source: name, description, type, project, owner, certification note, extract and refresh information
tableau_list_datasource_connectionsConnections of a published data source: type, server address, port, user name
tableau_read_datasource_metadataFields of a published data source through the VizQL Data Service: fieldCaption (the name to use in queries), dataType, role (dimension or…
tableau_query_datasourceQuery a published data source through the VizQL Data Service: pick fields (dimensions and aggregated measures), filters and sorting, get…
tableau_metadata_queryRun a GraphQL query on the Tableau Metadata API for lineage: which workbooks use a data source, upstream databases and tables, columns…
tableau_list_usersUsers of the site: id, name, full name, e-mail, site role (Creator, Explorer, Viewer, SiteAdministratorCreator, Unlicensed, ...), last…
tableau_get_userOne user: name, full name, e-mail, site role, last login, external auth id
tableau_list_user_groupsGroups a user belongs to: group id, name, domain and minimum site role
tableau_list_groupsGroups of the site: id, name, domain, minimum site role and user count
tableau_list_group_usersMembers of a group: user id, name, full name, site role and last login
tableau_list_jobsBackground jobs of the site (extract refreshes, subscriptions, flows): id, type, status, progress, created, started and ended time
tableau_get_jobStatus of one job: progress (0 to 100), finishCode (0 success, 1 failed, 2 cancelled), notes with the error text, and the workbook or data…
tableau_list_extract_refresh_tasksScheduled extract refresh tasks of the site: task id, priority, type (full or incremental), schedule (frequency and next run time), and the…
tableau_refresh_workbookRefresh the extracts of a workbook now
tableau_refresh_datasourceRefresh the extract of a published data source now
tableau_run_extract_refresh_taskRun a scheduled extract refresh task now instead of waiting for its schedule
tableau_cancel_jobCancel a running or queued job (an extract refresh, a subscription or a flow run)
tableau_create_projectCreate a project, at the top level or inside a parent project
tableau_update_projectRename a project, change its description or content permissions, or move it under another parent
tableau_update_workbookRename a workbook or switch its tabs on or off
tableau_move_workbookMove a workbook to another project (its permissions may follow the target project's settings)
tableau_add_workbook_tagsAdd tags to a workbook; existing tags stay, the answer lists all tags of the workbook
tableau_add_datasource_tagsAdd tags to a published data source; existing tags stay, the answer lists all of them
tableau_add_user_to_groupAdd a user of the site to a group (local groups only; Active Directory groups sync from the directory)

示例提示

  • “Finance 项目中哪些工作簿在过去 30 天内更新过?所有者分别是谁?”
  • “给我看 Sales Overview 仪表板背后的数字,只看 West 区域。”
  • “在 Superstore 数据源中,2026 年上半年各区域的销售总额是多少?”
  • “哪些工作簿使用了已发布的数据源 Orders?我想知道修改它会影响什么。”
  • “昨晚的数据提取刷新成功了吗?把失败的连同错误信息列出来。”

FAQ

Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。

下一步

这份指南对你有帮助吗?

你的 Tableau 智能体只差一次点击。

安装连接器,粘贴密钥,向 Gemini 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 Tableau 连接到 ChatGPT

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

连接器

如何通过 MCP 将 Tableau 连接到 Claude

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

连接器

如何通过 MCP 将 Tableau 连接到 Cursor

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

连接器

如何通过 MCP 将 Tableau 连接到 Meta Muse

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

连接器

Tableau 接入 MCP:在任意 AI 智能体中使用工作簿、视图、视图数据、数据源查询和数据沿袭

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。

连接器

如何通过 MCP 将 Tableau 连接到 Microsoft Copilot

在任意 AI 智能体中使用 Tableau Cloud 和 Tableau Server:查找工作簿、视图和数据源,以 CSV、图片、PDF 和 Excel 交叉表读取视图数据,通过 VizQL Data Service 查询已发布的数据源,用 Metadata API 追踪数据沿袭,并管理项目、标签、组成员和数据提取刷新。使用个人访问令牌登录。