Read a .twbx with Claude Code or Cursor.
Inspect the workbook in your browser, or unpack its XML for your coding agent. See the authored calculations and a result from the packaged sample CSV. Host operation remains unverified.
Updated
Read locally in this browser.
What does the sample report say?
The four-record synthetic sales example has two regions. Its workbook contains one authored FIXED calculation.
“Show Revenue by Region and explain Fixed Revenue.”
Illustrative MCP sequence · not a captured host session
- xmetric.openCreate the file board
- xmetric.schemaRead fields and authored definitions
- xmetric.queryRequest a bounded aggregate
- xmetric.resultRead completed result and evidence
Authored calculation in this workbook
{ FIXED [Region] : SUM([Revenue]) }Opening the labelled sample…
Expected values from the labelled sample; the browser recomputes them.
| Group | Result |
|---|---|
| East | 150 |
| West | 225 |
Drop one file anywhere on this page. It is read in your browser; no file is uploaded.
Nothing is uploaded.
Read locallyThe original file stays in the browser.
Share deliberatelyMCP shares supported metadata and requested results with the chat host.
Separate actionsOnline saves and support uploads require their own actions.
How does this workflow work?
What is the direct answer to this workbook question?
A .twbx file is a ZIP archive containing a .twb XML workbook and packaged data files or a .hyper/.tde extract. To let Claude Code or Cursor read it, unzip the .twbx so the agent can parse the .twb XML, or drop the .twbx into the xmetric workbook inspector to list sheets, formulas, and packaged data files locally.
Why can’t a coding agent read a raw .twbx as text?
If you ask Claude Code or Cursor to read sales_dashboard.twbx directly, the agent sees a binary archive. A .twbx (Tableau Packaged Workbook) bundles two different artifacts inside a standard ZIP container:
- The
.twbXML file: Contains all worksheet definitions, dashboard layouts, shelf placements, filter rules, and calculated field formulas. - The
Data/directory: Holds packaged.hyperor.tdedata extract files, or embedded CSV and Excel sources.
Large .twb files contain verbose formatting XML; reading the raw file from line 1 fills the coding agent's context window with font colors and coordinate offsets before it ever reaches your formulas.
How do I unpack a .twbx in my terminal?
Have your coding agent unpack the archive into a temporary folder so it can inspect the XML structure without binary noise:
mkdir -p unpacked_twbx
unzip -q report.twbx -d unpacked_twbx
ls -lh unpacked_twbxOnce unpacked, tell Claude Code or Cursor to ignore <style>, <layout>, and <cards> blocks and target only <datasources> and <worksheets>.
How do I extract calculated fields with an agent script?
Give Claude Code or Cursor this short Python snippet to pull every calculated field name, caption, and formula out of the .twb XML in seconds:
import xml.etree.ElementTree as ET
tree = ET.parse("unpacked_twbx/report.twb")
root = tree.getroot()
for col in root.findall(".//datasource/column"):
calc = col.find("calculation")
if calc is not None and calc.attrib.get("formula"):
name = col.attrib.get("caption") or col.attrib.get("name")
formula = calc.attrib.get("formula")
print(f"{name}: {formula}")Filter for <column> tags that contain a <calculation> child to focus on calculation definitions rather than formatting XML.
How do I inspect and open the workbook in xmetric?
Extracting raw formulas from XML still leaves internal field IDs like [Calculation_9481029384] hard to trace across views and dependencies.
Drop the same .twbx file into the xmetric workbook inspector (/inspect/) in your browser:
- Lists data sources, sheets, dashboards, and calculated fields with internal IDs resolved to readable names, plus broken or unused calculations.
- Saves packaged data files locally in the browser with no server upload, so you can save or chart a CSV inside a
.twbx. - Runs Level of Detail and table calculations in the formula playground (/play/) on sample data and shows the SQL, so you can compare the logic against the queries your coding agent writes.
- Opens the workbook in the xmetric app (/app/), where you can keep building on its sheets with shelves and calculated fields.
The public xmetric MCP server is live at https://getxmetric.com/mcp with no authentication or API key. Anonymous initialize, tool discovery and widget-resource checks passed on 2026-10-29. ChatGPT and Claude host rendering and tool selection remain unverified; their directory listings remain coming. The local-file flow needs a host that renders the xmetric board; a coding client that only reads MCP text cannot open a local file in that board.
How do internal Tableau field IDs map to readable formulas?
In .twb XML, a calculated field that refers to another calculated field uses its internal bracketed ID rather than its display caption:
// Raw formula inside .twb XML
IIF([Calculation_104928374] > 0, [Sales] / [Calculation_104928374], NULL)
// Resolved human-readable formula shown in xmetric
IIF([Total Orders] > 0, [Sales] / [Total Orders], NULL)-- Equivalent SQL for your agent's dbt or DuckDB query
CASE
WHEN total_orders > 0 THEN sales / total_orders
ELSE NULL
END AS revenue_per_orderWhat is live, and what is still coming?
The public xmetric MCP server is live at https://getxmetric.com/mcp with no authentication or API key. Anonymous initialize, tool discovery and widget-resource checks passed on 2026-10-29. ChatGPT and Claude host rendering and tool selection remain unverified; their directory listings remain coming. See the dated public protocol receipt and setup and evidence limits.
The public server is available; host operation and directory approval are separate checks.
| Capability | Current status |
|---|---|
| Public remote HTTPS MCP server | Live; anonymous initialize, tools and widget assets checked |
| ChatGPT and Claude host rendering and tool selection | Unverified |
| ChatGPT and Claude directory listings | Coming |
| Live Postgres and BigQuery connections in xmetric | Coming |
The file board parses supported .pbix, .twbx/.twb, CSV, Excel and Parquet files in your browser. Choosing a file shares supported schema, source names and calculation definitions with xmetric and the chat host; requested result cells, filters and SQL or DAX evidence are shared when answering. The original file is not uploaded by this flow. Small aggregates and labels can still be sensitive. Privacy details.
Can Claude Code or Cursor read a .hyper file inside a .twbx?
Not as plain text, because .hyper is Tableau's binary extract format. You can drop the .twbx into the xmetric workbook inspector in your browser to save the packaged data files (and save or chart a CSV inside a .twbx), or ask your coding agent to query the unpacked .hyper file using Python (tableauhyperapi).
Does dropping a .twbx into xmetric upload my company data?
No. xmetric reads .twbx and .twb workbooks locally in your browser. Nothing is uploaded unless you sign in and choose to save a workbook online.
Why are calculated field names written as [Calculation_12345] in the XML?
Tableau assigns an immutable internal name attribute when a calculation is first created and stores the user-facing label in the caption attribute. Always map name to caption before translating formulas to SQL.
Is there an xmetric MCP server for Cursor and Claude Code?
The public xmetric MCP server is live at https://getxmetric.com/mcp with no authentication or API key. Anonymous initialize, tool discovery and widget-resource checks passed on 2026-10-29. ChatGPT and Claude host rendering and tool selection remain unverified; their directory listings remain coming. Claude Code and Cursor host behavior has not been independently verified. The browser inspector remains a direct way to inspect a workbook and share selected formulas.
Drop your workbook into the workbook inspector, or open it in the xmetric app to build on it.
What data does this worked example use?
The initial view uses authored synthetic data, not customer data or a captured agent session.
The example record lists its file, calculation or SQL and expected values. The live browser result is computed by xmetric’s existing engine or workbook inspector. Samples are excluded from own-data activation reporting.