$ show tableau/tableau-mcp
This is the official Tableau MCP server, a TypeScript application that bridges AI assistants with Tableau Cloud, Tableau Server, and Tableau Desktop via the Model Context Protocol (MCP). It exposes a comprehensive set of tools covering content exploration (workbooks, views, datasources), administration (users, flows, extract refresh tasks, jobs, license reclamation), advanced analytics (Pulse metrics, insights, knowledge graph), and human-in-the-loop confirmation workflows. The server is available in three variants: a web variant running over HTTP with OAuth 2.1 support (PKCE, token rotation, client registration), a desktop variant communicating with the local Tableau Desktop Agent over stdio, and a combined variant. Its architecture is modular: a core server layer registers tools and prompts against an MCP SDK instance, tools delegate to a Zodios-based Tableau REST API client or the desktop agent API, and cross-cutting concerns like authentication, feature gates, telemetry, and session stores are provided through pluggable provider interfaces. The codebase demonstrates strong engineering practices with extensive unit/e2e tests, typed schemas via Zod, consistent error handling patterns, and a clear separation between web and desktop concerns.
The LLM identified 5 files worth highlighting for reuse:
A generic pagination utility for iterating over REST API paginated responses. Supports both server-side page traversal and client-side filtering, returns structured results with truncation metadata. Used across multiple listing tools (workbooks, views, flows, users) to ensure consistent pagination behavior and limit handling.
Implements three confirmation strategies for destructive mutations: TagEvidence (server-generated nonce on the target), RegistryEvidence (looks up a nonce in a registry), and AppApprovalEvidence (single-use approval bound to previewed arguments). Composable via AllEvidence. This pattern is critical for the 'preview then confirm' safety workflow used by all write tools, and is well-isolated for reuse in other MCP servers needing human approval gating.
The abstract WebTool base class that standardizes MCP tool definition, parameter validation (Zod), execution logging, telemetry, role-based access control (minRequiredRole), feature gating (registrationConditions), and result formatting (constrained results). All web server tools extend this class, making it the central pattern for consistent tool behavior. The logAndExecute method wraps each tool call with error handling and audit logging.
A bidirectional converter between Tableau Workbook XML and a JSON representation, with DOM-based XML parser and JSON formatter. Handles CDATA preservation, namespace handling, and hierarchical structure. This is a self-contained library that could be extracted and used in any project needing to manipulate Tableau workbook files without the full MCP server context.
An embedded OAuth 2.1 authorization server implementation with PKCE, refresh token rotation, dynamic client registration, token revocation (RFC 7009), and well-known metadata endpoints. Includes redirect URI validation with loopback and custom scheme support. The provider is configurable and can be enabled/disabled, with session store abstraction for persisting codes and tokens. This is a complete, production-quality OAuth server suitable for reuse in other Node.js applications needing OAuth without external dependencies.