跳过安装。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 中,在该连接器上运行。
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 用户。
- 在 Tableau 中打开 Account Settings 的 Personal Access Tokens 部分,输入令牌名称并点击 Create Token。在 Tableau Server 上,可能需要管理员先允许使用个人访问令牌。
- 把令牌名称复制到
TABLEAU_PAT_NAME,把只显示一次的密钥复制到TABLEAU_PAT_SECRET。两者都区分大小写。 - 在
TABLEAU_SERVER_URL中填写不带路径的地址:Tableau Cloud 填浏览器中看到的 pod 主机,例如https://prod-useast-a.online.tableau.com;Tableau Server 填它自己的地址,例如https://tableau.example.com。 - 在
TABLEAU_SITE中填写站点的内容 URL,即浏览器地址中/site/之后的部分(#/site/acme/home对应acme)。Tableau Server 的 Default 站点留空即可。 - 安装连接器并运行
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" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
Tableau的工具。
可用工具
| Tool | What it does |
|---|---|
tableau_get_current_session | The signed-in session: site (id, name, contentUrl) and user (id, name, site role) |
tableau_get_server_info | Product version, build and the newest REST API version of the Tableau Server or Tableau Cloud pod |
tableau_list_sites | Sites the signed-in user can reach (on Tableau Cloud usually only the signed-in one): id, name, contentUrl, state, admin mode |
tableau_get_site | Settings of a site: name, contentUrl, state, storage quota, user quota, and which features (subscriptions, flows, Ask Data, ...) are on |
tableau_search_content | Search the site's content by words: workbooks, views, data sources, projects, flows, metrics, tables, databases |
tableau_list_projects | Projects (folders) of the site: id, name, description, parent project id, owner, content permissions mode |
tableau_list_workbooks | Workbooks of the site: id, name, contentUrl, project, owner, size, tags, created and updated time, webpageUrl |
tableau_get_workbook | One workbook: name, description, project, owner, tags, views, data acceleration and freshness settings, webpageUrl |
tableau_list_workbook_views | Views (sheets and dashboards) of a workbook: id, name, contentUrl, and with include_usage_statistics the total view count |
tableau_list_workbook_connections | Data connections of a workbook: type, server address, port, user name, and the published data source behind each |
tableau_list_views | Views of the whole site: id, name, contentUrl, workbook, owner, project, tags, and with include_usage_statistics the view count |
tableau_get_view | One view: name, contentUrl, workbook, owner, project, tags, and with include_usage_statistics the view count |
tableau_get_view_data | The data behind a view as CSV text (the summary data of its marks), optionally filtered with vf_ filters |
tableau_get_view_image | A PNG image of a view, returned as an image the model can look at, optionally filtered with vf_ filters |
tableau_get_view_pdf | A PDF of one view, returned as a file, with paper size and orientation, optionally filtered with vf_ filters |
tableau_download_view_crosstab_excel | The crosstab of a view as an Excel file (.xlsx), returned as a file, optionally filtered with vf_ filters |
tableau_get_workbook_pdf | A PDF of all views of a workbook, returned as a file, with paper size and orientation |
tableau_list_datasources | Published data sources of the site: id, name, type (database type), project, owner, tags, certification, whether it has an extract, created… |
tableau_get_datasource | One published data source: name, description, type, project, owner, certification note, extract and refresh information |
tableau_list_datasource_connections | Connections of a published data source: type, server address, port, user name |
tableau_read_datasource_metadata | Fields of a published data source through the VizQL Data Service: fieldCaption (the name to use in queries), dataType, role (dimension or… |
tableau_query_datasource | Query a published data source through the VizQL Data Service: pick fields (dimensions and aggregated measures), filters and sorting, get… |
tableau_metadata_query | Run a GraphQL query on the Tableau Metadata API for lineage: which workbooks use a data source, upstream databases and tables, columns… |
tableau_list_users | Users of the site: id, name, full name, e-mail, site role (Creator, Explorer, Viewer, SiteAdministratorCreator, Unlicensed, ...), last… |
tableau_get_user | One user: name, full name, e-mail, site role, last login, external auth id |
tableau_list_user_groups | Groups a user belongs to: group id, name, domain and minimum site role |
tableau_list_groups | Groups of the site: id, name, domain, minimum site role and user count |
tableau_list_group_users | Members of a group: user id, name, full name, site role and last login |
tableau_list_jobs | Background jobs of the site (extract refreshes, subscriptions, flows): id, type, status, progress, created, started and ended time |
tableau_get_job | Status 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_tasks | Scheduled extract refresh tasks of the site: task id, priority, type (full or incremental), schedule (frequency and next run time), and the… |
tableau_refresh_workbook | Refresh the extracts of a workbook now |
tableau_refresh_datasource | Refresh the extract of a published data source now |
tableau_run_extract_refresh_task | Run a scheduled extract refresh task now instead of waiting for its schedule |
tableau_cancel_job | Cancel a running or queued job (an extract refresh, a subscription or a flow run) |
tableau_create_project | Create a project, at the top level or inside a parent project |
tableau_update_project | Rename a project, change its description or content permissions, or move it under another parent |
tableau_update_workbook | Rename a workbook or switch its tabs on or off |
tableau_move_workbook | Move a workbook to another project (its permissions may follow the target project's settings) |
tableau_add_workbook_tags | Add tags to a workbook; existing tags stay, the answer lists all tags of the workbook |
tableau_add_datasource_tags | Add tags to a published data source; existing tags stay, the answer lists all of them |
tableau_add_user_to_group | Add 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 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?