A hosted MCP server and npm client that lets LLMs read, write, validate and analyze Excel files without losing structure. It live-recalculates formulas and hands back the computed value — not the stale value last saved in the file. Hardened against malformed input. Free — all 50 tools.
Try the demoLLMs choke on real spreadsheets — a naive one-shot read flattens merged cells, drops named ranges, reads formulas as stale cached values, and can't tell a header row from a data row. xlsx-for-ai exposes a tool surface designed for agents.
Recompute formulas to their actual values with a portable engine — no Excel or LibreOffice in the loop. It hands back the computed value, not the stale value last saved in the file.
Parse any .xlsx into LLM-friendly text. Per-column type inference with confidence. Describe, filter, and aggregate.
Named ranges, merged cells, formulas, data validations, and conditional formatting are first-class — not collapsed by a naive one-shot read.
Run a workbook through two independent engines and report divergences. Catches corruption a naive read silently masks.
XXE blocking, zip-bomb caps, buffer limits, entity-expansion limits. Every file is sanitized before parsing.
Anonymous UUID registration — no email, no name. Per-request strict mode disables any error capture. Read the policy.
Standard MCP stdio. One install, one tool surface, works in every MCP-compatible host.
Below is a simple demo. Just copy/paste the prompts in after each header. We have sample spreadsheets that you'll download, but you can use any Excel file on your desktop, too.
Install — one terminal command
Get the sample workbooks — drops reporting-pack-v1.xlsx and reporting-pack-v2.xlsx into the current folder:
xfa samples
Confirm it's wired — ask Claude:
"What xfa tools do you have? (you should see ~50)"
Then ask Claude — the interesting stuff first, each is one prompt vs. the usual Excel work:
Clean up messy data
"Using xfa, clean up reporting-pack-v1.xlsx — fix the inconsistent dates, stray whitespace, and columns where numbers are stored as text — and tell me what you changed."
Find and fix broken links
"With xfa, find the broken external links in reporting-pack-v1.xlsx and show me the fix."
Compute pivots and aggregates — no Excel open
"Using xfa, build a pivot of revenue by entity and department from reporting-pack-v1.xlsx."
"Group by department and give me sum and average spend from reporting-pack-v1.xlsx, with xfa."
Convert formats
"Use xfa to convert reporting-pack-v1.xlsx to CSV / JSON for our pipeline."
Cross-engine validate
"With xfa, render reporting-pack-v1.xlsx through two independent engines and flag any cell where they disagree."
Redact PII before sharing
"Using xfa, redact the PII in reporting-pack-v1.xlsx and give me the audit manifest of what was removed."
Send it where the team works
"Have xfa post reporting-pack-v1.xlsx to our #reporting Slack channel."
Slack and Teams need a one-time token setup — see Setting up Slack & Teams.
Prove your spreadsheet wasn't changed
"Stamp reporting-pack-v1.xlsx so anyone downstream can confirm it wasn't altered, with xfa."
See what changed between two versions
"Diff reporting-pack-v1.xlsx against reporting-pack-v2.xlsx — cell and formula level — with xfa."
Dig into a workbook
"With xfa, pull every formula, named range, table, validation rule, chart, comment, and macro flag from reporting-pack-v1.xlsx, infer the column types, and give me a one-call health report."
Those are some of the headline moves, but they're only part of the surface — there are currently 50 tools in all. The rest handle the everyday spreadsheet work you'd otherwise do by hand: reading any sheet, range, or single cell as clean text the model can actually parse; dumping a workbook's full structure in one call; inferring each column's type and whether it allows blanks; searching, filtering, and sorting across the file; writing edits back into cells and ranges; aggregating and grouping the numbers; converting between xlsx, JSON, CSV, and plain text; opening the same file two independent ways and confirming the numbers agree; and posting a finished result straight into Slack or Teams (one-time token setup — see Setting up Slack & Teams).
Each one is a single prompt, just like the moves above — nothing to configure (Slack and Teams delivery is the one exception, and it's a one-time setup). A volume cap (10,000 calls / month) keeps the hosted API healthy — that's the only limit.
All 50 tools, grouped by what you're trying to do. Each one has a paste-ready example prompt
that runs against the workbooks from xfa samples above.
Most tools are invoked just by asking Claude in plain English (examples below). A handful also
have a direct xfa terminal command — shown as Or run: where available.
xlsx_read — Read a workbook and return it as markdown, JSON, or SQL.
"Read reporting-pack-v1.xlsx and show me the Summary sheet, with xfa."
Or run: xfa <file.xlsx> [--md|--json] [--sheet <name>] [--evaluate]
xlsx_list_sheets — List sheet names, sizes, and which are hidden.
"What sheets are in reporting-pack-v1.xlsx and how big is each, with xfa?"
xlsx_describe — Per-column summary: count, nulls, unique, min/max/mean.
"Give me a column-by-column summary of the Transactions sheet in reporting-pack-v1.xlsx, with xfa."
xlsx_schema — Infer each column's type, nullability, and a confidence score.
"What are the column types in the Transactions sheet of reporting-pack-v1.xlsx, with xfa?"
xlsx_topology — One-call map of the whole workbook: sheets, formulas, names, tables, flags.
"Give me the full topology of reporting-pack-v1.xlsx in one shot, with xfa."
xlsx_doctor — One-call health report, findings ranked HIGH / MEDIUM / LOW.
"Run a health check on reporting-pack-v1.xlsx and tell me what to worry about, with xfa."
xlsx_filter — Return only the rows matching your conditions.
"Show me the rows in Transactions where Revenue is over 10,000, from reporting-pack-v1.xlsx, with xfa."
xlsx_sort — Sort rows by one or more columns.
"Sort the Transactions sheet of reporting-pack-v1.xlsx by Revenue, highest first, with xfa."
xlsx_aggregate — Group by a column and sum / average / count.
"Group by department and give me sum and average spend from reporting-pack-v1.xlsx, with xfa."
xlsx_pivot — Build a 2-D pivot (rows × columns × aggregation).
"Build a pivot of revenue by entity and department from reporting-pack-v1.xlsx, with xfa."
xlsx_value_counts — Count how often each value appears in a column.
"What's the distribution of Department in reporting-pack-v1.xlsx, with xfa?"
xlsx_eval — Compute live Excel-formula results (not the stale cached value).
"Evaluate =SUM(Transactions!E2:E151) against reporting-pack-v1.xlsx, with xfa."
xlsx_diff — Deterministic cell- and formula-level diff between two workbooks.
"Diff reporting-pack-v1.xlsx against reporting-pack-v2.xlsx — cell and formula level, with xfa."
xlsx_formulas — Extract every formula with its cell and cached result.
"Pull every formula in the Summary sheet of reporting-pack-v1.xlsx, with xfa."
xlsx_named_ranges — List all defined names and what they point at.
"What named ranges are defined in reporting-pack-v1.xlsx, with xfa?"
xlsx_tables — List every Excel Table (ListObject) with its range and columns.
"List the Excel tables in reporting-pack-v1.xlsx, with xfa."
xlsx_pivot_tables — Surface pre-built pivot tables and what they compute.
"What pivot tables already exist in reporting-pack-v1.xlsx and what do they aggregate, with xfa?"
xlsx_merged_cells — List merged regions with the master-cell value.
"Show me the merged cells in reporting-pack-v1.xlsx and what each one says, with xfa."
xlsx_charts — List every chart with type, title, and the cells it plots.
"What charts are in reporting-pack-v1.xlsx and which cells do they pull from, with xfa?"
xlsx_comments — Extract legacy notes AND modern threaded comments, with authors.
"Pull every reviewer comment in reporting-pack-v1.xlsx, with xfa."
xlsx_conditional_formats — List every conditional-formatting rule.
"What conditional formatting rules does reporting-pack-v1.xlsx use, with xfa?"
xlsx_data_validations — List dropdowns and input constraints per cell.
"What data-validation rules (dropdowns, bounds) are in reporting-pack-v1.xlsx, with xfa?"
xlsx_form_controls — List checkboxes, buttons, dropdowns and their linked cells.
"List the form controls in reporting-pack-v1.xlsx and what cells they're tied to, with xfa."
xlsx_slicers_timelines — List slicers and timelines with their bindings.
"What slicers or timelines does reporting-pack-v1.xlsx have, with xfa?"
xlsx_hyperlinks — List every hyperlink, classified (external / internal / mailto).
"List all hyperlinks in reporting-pack-v1.xlsx, with xfa."
xlsx_images — List embedded images with format, size, and anchor cell.
"What images are embedded in reporting-pack-v1.xlsx, with xfa?"
xlsx_styles — Surface number formats, fonts, and fills (what a cell looks like).
"What number formats does the Summary sheet of reporting-pack-v1.xlsx use, with xfa?"
xlsx_print_settings — Show "what would Excel print" per sheet.
"What would print if I hit Cmd+P on reporting-pack-v1.xlsx, with xfa?"
xlsx_workbook_views — Show UI state: active cell, frozen panes, hidden sheets, zoom.
"When someone opens reporting-pack-v1.xlsx, what do they see — active cell, frozen panes, hidden sheets, with xfa?"
xlsx_properties — Surface author, timestamps, and custom Info properties.
"Who created reporting-pack-v1.xlsx and what custom properties does it carry, with xfa?"
xlsx_protection — Show which sheets/cells are locked and what edits are allowed.
"What's protected in reporting-pack-v1.xlsx and which cells can I still edit, with xfa?"
xlsx_macros — Detect VBA macro presence and likely module names (never extracts code).
"Does reporting-pack-v1.xlsx contain macros? Should I trust it, with xfa?"
xlsx_external_links — List external workbook references and flag the ones that'll break.
"Find the broken external links in reporting-pack-v1.xlsx and show me the fix, with xfa."
xlsx_data_clean — Diagnose or fix the seven common data-grime issues (you approve each fix).
"Clean up reporting-pack-v1.xlsx — fix inconsistent dates, stray whitespace, and numbers stored as text — and tell me what you changed, with xfa."
Or run: xfa <file.xlsx> --clean [--execute] [--detectors <list>] [--sheet <name>]
xlsx_convert — Convert 25+ spreadsheet formats in or out (xls, xlsb, ods, Numbers, csv, json…).
"Convert reporting-pack-v1.xlsx to CSV and JSON for our pipeline, with xfa."
xlsx_write — Create or edit a workbook from a structured spec (server-validated).
"Create a new workbook summary.xlsx with a Totals sheet summing revenue by entity, with xfa."
xlsx_redact — Detect and redact only the PII; everything else is preserved, with a manifest.
"Redact the PII in reporting-pack-v1.xlsx and give me the audit manifest of what was removed, with xfa."
xlsx_healer_diagnose — Structured report of broken / at-risk external references.
"Diagnose the external-reference problems in reporting-pack-v1.xlsx, with xfa."
xlsx_healer_simulate — Predict which references will break when you send the file to someone.
"If I send reporting-pack-v1.xlsx to someone who can't see our network share, what breaks, with xfa?"
xlsx_healer_intent — Describe the goal in plain English; Healer plans and applies the fix.
"Make reporting-pack-v1.xlsx fully self-contained so it works for an outside recipient, with xfa."
xlsx_healer_cure — Apply one specific repair operation to a diagnosed workbook.
"Freeze the broken external refs in reporting-pack-v1.xlsx to their last cached values, with xfa."
Or run: xfa heal <path> [--mode as_copy|in_place] [--out <path>] [--format text|json]
xlsx_validate — Render the workbook through two independent engines and flag disagreements.
"Render reporting-pack-v1.xlsx through two independent engines and flag any cell where they disagree, with xfa."
xlsx_stamp — Sign a file with the checks it passed; travels with the file.
"Stamp reporting-pack-v1.xlsx so anyone downstream can confirm it wasn't altered, with xfa."
Or run: xfa stamp <path> --checks <file.json> [--out <path>] [--exclude <sheet>…]
xlsx_verify_stamp — Verify a stamp: signature valid? bytes unchanged? what checks passed?
"Verify the integrity stamp on reporting-pack-v1.xlsx, with xfa."
Or run: xfa verify-stamp <path>
xlsx_receipt — Attach an AI-generation receipt (who made it, when, from what inputs).
"Attach a generation receipt to reporting-pack-v1.xlsx recording that I produced it, with xfa."
Or run: xfa receipt <path> --agent <name> [--display-name …] [--out <path>] [--mcp-tool …]
xlsx_verify_receipt — Verify a generation receipt and surface the declared provenance.
"Verify the AI-generation receipt on reporting-pack-v1.xlsx, with xfa."
Or run: xfa verify-receipt <path>
xlsx_post_slack — Upload a workbook to a Slack channel.
"Post reporting-pack-v1.xlsx to our #reporting Slack channel, with xfa."
xlsx_post_teams — Upload a workbook to a Microsoft Teams channel.
"Post reporting-pack-v1.xlsx to our finance Teams channel, with xfa."
xlsx_read_handle — Re-read an already-uploaded workbook by handle, without re-sending bytes.
"Read the workbook I uploaded earlier again, by its handle, with xfa."
xlsx_session_set_validations — Set validation rules the server enforces for the rest of a session.
"For this session, require every row in Transactions to have an Entity and a positive Revenue, with xfa."
xlsx_eval recalculates formulas with HyperFormula v3.2.0 —
382 Excel functions. The engine has no INDIRECT, WEBSERVICE, RTD, DDE:
there is no dynamic-reference, network, or external-data function in the set, so a recalc can’t reach off-workbook.
The absent functions are the sandbox boundary.
ABS ACOS ACOSH ACOT ACOTH ARABIC ASIN ASINH ATAN ATAN2 ATANH AVERAGE AVERAGEA AVERAGEIF CEILING CEILING.MATH CEILING.PRECISE COMBIN COMBINA COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUNTUNIQUE CSC CSCH DEGREES EVEN EXP FACT FACTDOUBLE FLOOR FLOOR.MATH FLOOR.PRECISE GCD INT ISO.CEILING LCM LN LOG LOG10 MAX MAXA MAXIFS MIN MINA MINIFS MOD MROUND MULTINOMIAL ODD PI POWER PRODUCT QUOTIENT RADIANS RAND RANDBETWEEN ROMAN ROUND ROUNDDOWN ROUNDUP SEC SECH SERIESSUM SIGN SIN SINH SQRT SQRTPI STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STDEVS SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 TAN TANH TRUNC VAR VAR.P VAR.S VARA VARP VARPA VARS
AVEDEV BESSELI BESSELJ BESSELK BESSELY BETA.DIST BETA.INV BETADIST BETAINV BINOM.DIST BINOM.INV BINOMDIST CHIDIST CHIDISTRT CHIINV CHIINVRT CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHITEST CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CORREL COVAR COVARIANCE.P COVARIANCE.S COVARIANCEP COVARIANCES CRITBINOM DEVSQ ERF ERFC EXPON.DIST EXPONDIST F.DIST F.DIST.RT F.INV F.INV.RT F.TEST FDIST FDISTRT FINV FINVRT FISHER FISHERINV FTEST GAMMA GAMMA.DIST GAMMA.INV GAMMADIST GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GEOMEAN HARMEAN HYPGEOM.DIST HYPGEOMDIST LARGE LOGINV LOGNORM.DIST LOGNORM.INV LOGNORMDIST LOGNORMINV MEDIAN NEGBINOM.DIST NEGBINOMDIST NORM.DIST NORM.INV NORM.S.DIST NORM.S.INV NORMDIST NORMINV NORMSDIST NORMSINV PEARSON PHI POISSON POISSON.DIST POISSONDIST RSQ SKEW SKEW.P SKEWP SLOPE SMALL STANDARDIZE STEYX T.DIST T.DIST.2T T.DIST.RT T.INV T.INV.2T T.TEST TDIST TDIST2T TDISTRT TINV TINV2T TTEST WEIBULL WEIBULL.DIST WEIBULLDIST Z.TEST ZTEST
CUMIPMT CUMPRINC DB DDB DOLLARDE DOLLARFR EFFECT FV FVSCHEDULE IPMT IRR ISPMT MIRR NOMINAL NPER NPV PDURATION PMT PPMT PV RATE RRI SLN SYD TBILLEQ TBILLPRICE TBILLYIELD XNPV
DATE DATEDIF DATEVALUE DAY DAYS DAYS360 EDATE EOMONTH HOUR INTERVAL ISOWEEKNUM MINUTE MONTH NETWORKDAYS NETWORKDAYS.INTL NOW SECOND TEXT TIME TIMEVALUE TODAY WEEKDAY WEEKNUM WORKDAY WORKDAY.INTL YEAR YEARFRAC
CHAR CLEAN CODE CONCATENATE EXACT FIND FORMULATEXT HYPERLINK LEFT LEN LOWER MID N PROPER REPLACE REPT RIGHT SEARCH SPLIT SUBSTITUTE T TRIM UNICHAR UNICODE UPPER VALUE
AND CHOOSE FALSE IF IFERROR IFNA IFS NOT OR SWITCH TRUE XOR
ADDRESS ARRAYFORMULA ARRAY_CONSTRAIN FILTER HLOOKUP MATCH MAXPOOL MEDIANPOOL MMULT OFFSET TRANSPOSE VLOOKUP XLOOKUP
COLUMN COLUMNS INDEX ISBINARY ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT NA ROW ROWS SHEET SHEETS
BASE BIN2DEC BIN2HEX BIN2OCT BITAND BITLSHIFT BITOR BITRSHIFT BITXOR COMPLEX DEC2BIN DEC2HEX DEC2OCT DECIMAL DELTA HEX2BIN HEX2DEC HEX2OCT IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN OCT2BIN OCT2DEC OCT2HEX
Posting a workbook into Slack or Teams is the only part of xfa that needs a one-time setup — a token that lets the tool act in your workspace. You only do this once.
xfa-poster) and pick your workspace.files:write.xoxb-).export SLACK_BOT_TOKEN=xoxb-your-token-here
(Add that line to your ~/.zshrc or ~/.bashrc so it persists across terminals.)/invite @xfa-poster in that channel.#name) in your prompt. To get it: in Slack, click the channel name → View channel details → the ID (starts with C or G) is at the bottom.Now "Have xfa post <file> to <channel-id> on Slack" works.
Reference: Slack — bot tokens & basics ·
the files:write scope.
Files.ReadWrite.All and ChannelMessage.Send.export TEAMS_GRAPH_TOKEN=your-graph-token-hereGET /teams/{team-id}/channels (docs).Now "Have xfa post <file> to <channel-id> on Teams" works.
Reference: Microsoft Graph permissions.
Security note: xfa reads these tokens from your environment so they never appear in your chat history. You can pass a token inline as a tool argument, but then it would show up in the conversation log — the env-var path is recommended.
Install the npm client; it auto-registers an anonymous client_id on first use. No signup form.
npm install -g xlsx-for-ai
xfa path/to/workbook.xlsx
Or wire it as an MCP server. In Claude Code, the global install auto-registers a server named xfa — no extra step:
npm install -g xlsx-for-ai
If your install skipped scripts (--ignore-scripts, CI, or a sudo install), register it manually:
claude mcp add xfa -- xlsx-for-ai-mcp
In any other MCP-aware agent (Cursor, Cline, Gemini), add this to its server config:
{
"mcpServers": {
"xfa": { "command": "xlsx-for-ai-mcp" }
}
}
No install needed for one-off use:
npx xlsx-for-ai path/to/workbook.xlsx
Full docs and tool reference at the GitHub repository and the npm package page.
Questions, bug reports, sales, anything else — email support@xlsx-for-ai.dev.
We answer everything within two business days. For security disclosures, please use the same address with subject line beginning [security].
By installing the xlsx-for-ai npm package or using the API at api.xlsx-for-ai.dev ("the Service"), you agree to these terms.
xlsx-for-ai is software that processes Excel (.xlsx and related) files on behalf of LLM agents. The npm client is open-source. The hosted API is operated by xlsx-for-ai.
The Service registers an anonymous client_id on first use. You are responsible for any activity originating from your client_id. We may rate-limit, suspend, or revoke access if usage violates these terms or appears abusive.
We aim for high availability but do not guarantee uninterrupted service.
The Service is provided "as is" without warranty of any kind. xlsx-for-ai is not liable for indirect, consequential, or incidental damages arising from your use of the Service.
You may stop using the Service at any time. We may terminate or suspend access for violations of these terms, with or without notice.
We may update these terms. Material changes will be announced on this page with a revised "last updated" date. Continued use after changes constitutes acceptance.
These terms are governed by the laws of the State of Texas, United States, without regard to conflict-of-laws principles. Disputes will be resolved in courts located in Travis County, Texas.
Questions about these terms: support@xlsx-for-ai.dev.
This page describes what data the xlsx-for-ai Service collects, how it is used, and how you can opt out. The full developer-oriented version lives at PRIVACY.md in the GitHub repository.
For every API call: file bytes (base64-encoded, in memory only — not stored after the request completes), an anonymous client_id (UUID generated locally; not linked to any identifying information), platform and version strings (e.g., darwin-arm64, 2.0.0), and the tool name and parameters of the request.
We do not collect your email, name, file names, file paths, or any cell content beyond what flows through a single request.
Data is used to operate the Service: rate-limiting, abuse prevention, and aggregate engineering metrics (call counts, error rates, file size distributions). We do not sell or share your data with third parties.
When a request results in an error (5xx, hardening rejection, engine exception), we may retain a redacted copy of the workbook for up to 30 days for debugging. "Redacted" means cell values are stripped before storage. Captures auto-delete after 30 days. You can disable this for any request by sending the header X-XFA-Privacy: strict or by setting XFA_PRIVACY=strict in your environment.
We use Fly.io for compute and database hosting and Cloudflare R2 for redacted error captures.
To delete your registration, remove ~/.xlsx-for-ai/config.json on your machine. The next call generates a new anonymous client_id. To request deletion of any associated audit logs, email us — anonymous IDs make most users untraceable; we'll honor any request we can identify.
The Service is not directed to children under 13 and we do not knowingly collect personal data from them.
support@xlsx-for-ai.dev for any privacy question.