xlsx-for-ai

Short name: xfa — a real CLI command (xfa <file>, xfa samples, xfa --version) and the prompt shorthand (e.g. "use xfa to read this file"). Same entrypoint as xlsx-for-ai; matches the internal xfa_* / XFA_* brand surface.
Verified values, preserved structure, up to 100MB
The missing reliability layer for spreadsheet work in LLM agents. Read, write, diff, validate, and analyze .xlsx files end-to-end — with merged cells, formulas, named ranges, conditional formatting, pivots, and charts preserved.
xlsx-for-ai makes Claude reliable on real-world Excel files. Seventy-plus tools cover the structural surface that pandas-style sandboxes drop on the floor: merged cells, named ranges, formulas with results, conditional formatting, pivots, slicers, charts, comments, data validations, hyperlinks, cross-sheet topology, external links, form controls, VBA macros, document properties, and protection settings. A soundness check (xlsx_validate) flags corruption other readers silently mask. A hosted recalc engine computes served values in-house — no third-party formula engine in the serve path.
In Claude Code, one command:
claude plugin install xlsx-for-ai --marketplace senoff/xlsx-for-ai
Then, once:
- Restart Claude Code (quit it and start it again), so it loads the plugin.
- Ask Claude about a spreadsheet. The first request answers with a sign-in link and a short code: sign in through the link, check the code, approve, then ask again. There is no
/mcp step.
In short: restart Claude Code, then ask it about a spreadsheet. Needs Claude Code 2.1.292 or later (claude update if yours is older). If you installed before Nov 27, update the plugin with claude plugin update xlsx-for-ai@xlsx-for-ai (or in a session: /plugin, then Installed, then xlsx-for-ai, then Update now), then start a new session. More on the plugin is under Claude Code plugin below.
In the Claude app (claude.ai): find xlsx-for-ai in the connector directory at claude.ai/directory and click Connect.
The npm package (Claude Code, Cursor, Claude Desktop and others):
npm install -g xlsx-for-ai
The global install puts the xlsx-for-ai-mcp binary on your PATH — that's what the canonical configs below point at. A pinned global install launches fast (it still needs an internet connection, because the files are read by the hosted service); upgrade with npm install -g xlsx-for-ai@latest when a new version ships.
Upgrading from 1.5.x? This is a re-architecture, not a feature bump: the heavy local engine is gone from the npm package. All rendering happens server-side. The cursor-reads-xlsx alias still works. See Migration below.
MCP configuration
Add the server to your agent runtime under the name xfa (so "use xfa to read this" resolves). First run needs a one-time sign-in. In an editor or desktop app, your first request answers with a sign-in link and a short code: open the link, approve, then ask again. Or run xlsx-for-ai login in a terminal first (see First-run sign-in). Keys created by older versions keep working for now. When that changes, the sign-in link appears in the same place, so there is nothing to do ahead of time.
There are two ways in:
- Local package. The app starts
xlsx-for-ai-mcp on your computer (stdio). Install it once with npm install -g xlsx-for-ai. No key to paste: the first request gives a sign-in link and code. It can read files on your computer by path. If you would rather not install globally, use the command npx with the arguments -y -p xlsx-for-ai xlsx-for-ai-mcp wherever a section below says xlsx-for-ai-mcp.
- Hosted with sign-in. The app connects to
https://api.xlsx-for-ai.dev/mcp over HTTP and signs you in in the browser (OAuth). Nothing to install. It cannot read files on your computer: give it a link to the file (shared as "anyone with the link can view") or use the upload link it offers.