# xlsx-for-ai [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/senoff/xlsx-for-ai  
**GitHub Stars:** 6  
**npm Downloads (last month):** 6565  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xlsx-for-ai

## Description
MCP server for production-grade Excel/.xlsx tooling. Read, write, diff, redact. Free tier.

## Tools
Capabilities this server exposes over MCP:

- **xlsx_read** — read an .xlsx file by path and return a rendered markdown/JSON/SQL representation. Also reads a **live Google Sheet**: pass `source:"gsheets"` with the `spreadsheet_id` and a read-only Google OAuth token you supply (token-injected — read-only, no write; the server never mints or brokers Google cred…
- **xlsx_read_handle** — read a workbook that has already been uploaded to the server via the chunked upload flow, by its server-side cache handle, WITHOUT re-transferring the bytes. Returns the same shape as xlsx_read (text / json / markdown) but skips the file_b64 round-trip.
- **xlsx_validate** — soundness check on a LOCAL .xlsx file — parses the workbook with the server's own OOXML engine and reports whether it loads cleanly (truncated zip, encrypted container, no worksheets, or a damaged sheet body each fail), with a per-sheet structural summary.
- **xlsx_charts** — List every chart in a LOCAL .xlsx file with type (bar / line / pie / scatter / area / doughnut / radar / stock / surface / bubble), title, axis titles, and per-series formula refs (the cell ranges the chart pulls from). Sheet attribution via the OOXML drawing rel chain.
- **xlsx_comments** — list every cell comment in a workbook — both legacy notes (yellow stickies, cell.note) AND modern threaded comments (multi-author conversations stored separately in the OOXML zip). Per entry: kind, sheet, cell, author, text, plus any reply thread.
- **xlsx_conditional_formats** — list every conditional formatting rule in a workbook — color scales, data bars, icon sets, formula-based highlights, top-N, duplicate / unique values, contains-text, time-period, above-average. Per rule: range, type, operator, formulae, priority, stopIfTrue.
- **xlsx_data_validations** — list every cell-level data validation rule (dropdowns, numeric/date bounds, text-length caps, custom formulas) defined in a workbook — the constraints that Excel enforces when a human types into the cell.
- **xlsx_describe** — pandas-style df.describe() per column — count, nulls, unique, min/max/mean/std for numerics, dtype with purity score.
- **xlsx_external_links** — list every external workbook reference this file depends on — `=[Budget.xlsx]Sheet1!A1` style formulas. Per link: target path (decoded), classification (http / network share / absolute / relative), sheets pulled from the external workbook, count of cached cell values, and defined-name references.
- **xlsx_form_controls** — list every form control (Check Box, Button, Drop-down, List Box, Option Button, Scroll Bar, Spinner, Label, Group Box) in a workbook with the linked cell, current value, dropdown source range, and min/max/step bounds where applicable.
- **xlsx_formulas** — extract every formula in a LOCAL .xlsx workbook — cell coord (A1), formula text, cached result. openpyxl-style read-only metadata.
- **xlsx_hyperlinks** — list every hyperlink in a workbook with its anchor cell, target URL/anchor, display text, tooltip, and a kind classifier (external / internal / mailto / unknown).
- **xlsx_images** — List every embedded image in a LOCAL .xlsx file with format (png / jpg / gif / svg / bmp / tiff / emf / wmf), size in bytes, sheet attribution, and anchor cell range (the cells the image floats over). Reads xl/media/* + xl/drawings/* directly.
- **xlsx_list_sheets** — list sheet names, dimensions, and visibility for a LOCAL .xlsx file.
- **xlsx_macros** — Inspect xlsm / xlsb workbooks for VBA macro presence, vbaProject.bin size, and likely module names (ThisWorkbook / Sheet<N> / Module<N> / Class<N> / UserForm<N> via heuristic UTF-16LE scan). Returns short safety advice the LLM should relay to the user.
- **xlsx_merged_cells** — list every merged-cell region with master-cell value, range, span dimensions, and kind heuristic ("header" / "horizontal" / "vertical" / "block"). Pandas reads merged cells by dropping the relationship — it sees one value in the master cell and three blanks alongside. xlsx_merged_cells is the layou…
- **xlsx_named_ranges** — list all defined names (named ranges) in a LOCAL .xlsx workbook — name, scope (workbook or sheet), kind (cell / range / formula), reference.
- **xlsx_pivot_tables** — List every PRE-EXISTING pivot table definition in a LOCAL .xlsx file (the ones an Excel user already built). Per pivot: sheet, name, location range, source range (or named-range / table reference), row / column / page fields, and data fields with their agg function (sum / count / average / max / mi…
- **xlsx_print_settings** — surface "what would Excel print right now" per worksheet — print area, orientation, paper size (A4 / Letter / Legal / Tabloid / etc.), scale or fitToPage, margins, headers/footers split into Excel's L/C/R zones, print titles (rows / columns repeated on every page), manual page breaks, plus B&W / dr…
- **xlsx_properties** — Surface the workbook's identity card from a LOCAL .xlsx file. Core: creator, last_modified_by, created/modified/lastPrinted timestamps, title, subject, company, manager, keywords, category, description. Application: app name + version, doc security label, hyperlink base. Custom: every user-defined…
- **xlsx_protection** — Surface every protection setting in a LOCAL .xlsx file so an agent knows what it can and cannot edit. Workbook-level (lockStructure, lockWindows), per-sheet (protected? password? hidden state?), per-action allow/block list (formatCells, sort, insertRows, pivotTables, etc.), and per-cell unlocked /…
- **xlsx_schema** — infer column schema of a LOCAL .xlsx file — types, nullable flags, header row, sample values.
- **xlsx_slicers_timelines** — List every slicer (interactive filter button) and timeline (date-range filter visual) in a LOCAL .xlsx file with their captions, source bindings (table column or pivot table), and timeline granularity (years / quarters / months / days) plus the currently-selected date range.
- **xlsx_styles** — surface cell formatting (number formats, fonts, fills, alignment) so an agent knows what a cell LOOKS like, not just its raw value. Default mode: per-sheet rollup of top-N number formats / fonts / fills with counts. Detailed mode (opt-in, capped at 1000 cells): per-cell breakdown for narrow queries.
- **xlsx_tables** — list every Excel ListObject ("Format as Table" structures) in a LOCAL .xlsx workbook — name, sheet, range, header/totals flags, columns.
- **xlsx_workbook_views** — Surface the UI state of a LOCAL .xlsx file — what a human sees when they open it in Excel. Per sheet: visibility (visible / hidden / veryHidden), view state, zoom, active cell + selection, frozen-pane breakdown, gridlines / row-col headers / ruler / RTL flags, tab color. Workbook level: which sheet…
- **xlsx_aggregate** — pandas-style df.groupby([cols]).agg({col: func}) on a LOCAL .xlsx file. funcs: sum / mean / min / max / count / count_distinct.
- **xlsx_diff** — compute a semantic diff between two LOCAL .xlsx files — cell-level deltas, formula changes, added/removed rows.
- **xlsx_eval** — evaluate Excel formulas against a LOCAL .xlsx file with our own recalc engine. xlwings-style.
- **xlsx_filter** — pandas-style row filter on a LOCAL .xlsx file with predicates AND-combined: eq/ne/gt/gte/lt/lte/contains/in/is_null/not_null.
- **xlsx_pivot** — pandas-style pivot_table() on a LOCAL .xlsx file — reshape a flat table into a 2D matrix where rows are unique values of `index`, columns are unique values of `columns`, and cells are an aggregation of `values`.
- **xlsx_sort** — pandas-style df.sort_values() on a LOCAL .xlsx file with multi-column sort and per-column direction (asc/desc, default asc).
- **xlsx_topology** — one-call workbook orientation. Returns sheets × dimensions × formulas × named ranges × tables × validations × hyperlinks × merges in one shot, plus feature flags (macros / external refs / pivots / LAMBDA / dynamic arrays).
- **xlsx_value_counts** — pandas-style Series.value_counts() on one column of a LOCAL .xlsx file — count each unique value, sorted by frequency desc, with percentage.
- **xlsx_data_clean** — AI-native data cleaning for a LOCAL .xlsx file. Scans for the seven most common data-grime issues — NA variants (N/A, NA, null, -), merged-cell residue, type-coercion mistakes (numeric-as-text / date-as-serial / leading-zero stripped), trailing-row noise (footers / totals), header-row-not-first (pr…
- **xlsx_convert** — universal spreadsheet format converter. Reads ANY of 25+ input formats (xlsx, xlsb, xlsm, xls, ods, fods, numbers, csv, tsv, dbf, lotus 1-2-3, quattro pro, sylk, dif, html, rtf, etc.) and emits ANY supported output format (xlsx, csv, json, md, html, etc.).
- **xlsx_redact** — redact PII and sensitive values from a LOCAL .xlsx file before sharing or archiving.
- **xlsx_write** — create or update a LOCAL .xlsx file from a structured spec.
- **xlsx_healer_cure** — Apply ONE specific cure operation against a diagnosed workbook. Operations: rename_move (rewrite ref paths), pattern_bulk (regex-style ref rewrites), source_deleted_freeze (replace broken refs with cached values), source_deleted_redirect (point at a replacement file), source_deleted_localize (snaps…
- **xlsx_healer_diagnose** — produce a structured diagnostic report of external references that are broken or at risk in a workbook. Returns five classes of finding: (1) external-workbook references that can't resolve, (2) defined-name external refs, (3) Power Query connections with embedded credentials, (4) #REF! propagation…
- **xlsx_healer_intent** — Goal-driven healing. Caller declares an INTENT (`make-it-work`, `make-standalone`, or `migrate`) instead of a specific cure operation; Healer plans the operation sequence + applies it. make-it-work: minimum surgery to clear errors. make-standalone: fully de-externalize (snapshot every external dep)…
- **xlsx_healer_simulate** — simulate recipient-side accessibility of a workbook's external references. Given a list of paths the recipient CAN see (`accessible_paths`), returns which references will still resolve at the recipient end and which will break (and why). Read-only; produces no output workbook.
- **xlsx_receipt** — Attach an AI-generation receipt to a LOCAL .xlsx file — a cryptographic attestation embedded in docProps/custom.xml that says "this file was generated by THIS agent, at THIS time, against THESE inputs." Returns the receipted workbook as base64 in _meta.file_b64; pass out_path to write to disk.
- **xlsx_stamp** — Sign a LOCAL .xlsx file with a "workbook integrity verification" stamp — a cryptographic attestation embedded in docProps/custom.xml that says "this file was generated by these tools, passed these N specific checks, signed at this time, and hasn't been tampered with since." Factual claims only (nev…
- **xlsx_verify_receipt** — verify a workbook's embedded AI-generation receipt. Returns whether the signature is valid, whether the recomputed content hash matches the hash IN the receipt, and the full caller-declared claims (agent identity, generation timestamp, source-file hashes, prompt hash, MCP tools called, description).
- **xlsx_verify_stamp** — verify a workbook's embedded integrity-verification stamp. Returns whether the cryptographic signature is valid, whether the workbook bytes match what was signed (recomputed hash vs hash IN the stamp), and the full check-result content of the stamp.
- **xlsx_post_slack** — upload a local .xlsx file to a Slack channel as a file attachment, with an optional accompanying message.
- **xlsx_post_teams** — Upload a local .xlsx file to a Microsoft Teams channel as a file attachment, with an optional accompanying message.
- **xlsx_session_set_validations** — configure per-session data-validation rules the server will apply to subsequent calls in the same session (e.g., reject rows missing required columns, enforce enum values on a category column, range-bound numeric inputs). Stateful — affects this session only.
- **xlsx_doctor** — ONE-CALL workbook health report for a LOCAL .xlsx file. Scans for macros, external workbook references, hidden / veryHidden sheets, missing creator metadata, large embedded images, and surfaces interesting feature flags (LAMBDA, dynamic arrays, pivot cache, slicers, threaded comments). Findings ran…

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "xlsx-for-ai": {
    "command": "npx",
    "args": ["-y","xlsx-for-ai"]
  }
}
```

## Documentation

## What xlsx-for-ai MCP server does

The xlsx-for-ai MCP server exposes a broad set of MCP tools for working with Excel workbooks. It can read local `.xlsx` files into text, JSON, or Markdown representations, create or update workbooks from structured specifications, compare two files, redact personal information, clean data, convert between spreadsheet and tabular formats, and evaluate formulas with its own recalculation engine.

The server also inspects workbook features that ordinary dataframe workflows often omit. Agents can examine sheets, schemas, formulas, named ranges, tables, styles, merged cells, charts, images, hyperlinks, comments, conditional formatting, data validations, pivots, slicers, print settings, workbook views, protection, properties, external links, form controls, and macro indicators. A live Google Sheet can be read by passing its spreadsheet ID and a read-only Google OAuth token; the service does not mint or broker that token.

## How it works

Install the package globally with npm. The installation provides the `xlsx-for-ai-mcp` stdio binary, which MCP clients launch as a local process. For repeated operations, an upload handle allows an already uploaded workbook to be read again without sending the file bytes a second time.

Initial inspection can use `xlsx_list_sheets`, `xlsx_schema`, `xlsx_topology`, or `xlsx_doctor`. Analysis tools such as `xlsx_describe`, `xlsx_filter`, and `xlsx_aggregate` provide dataframe-style views, while structural tools expose details needed to understand how Excel will display or process the file. `xlsx_validate` compares independent renderers and reports cell-level divergences for local workbooks.

## Setup and configuration

Run `npm install -g xlsx-for-ai`, then configure the `xlsx-for-ai-mcp` command in the MCP client. The documented configurations cover Claude Code, Cursor, Continue, Codex CLI, Zed, and Windsurf. Custom agents can use the same stdio binary. `XLSX_FOR_AI_API` can override the API base URL for local development against `http://localhost:3000`.

The raw HTTP API is also available. Anonymous client registration returns an API key, which is then supplied as a bearer token. The documented free tier allows 10,000 calls per month and files up to 10 MB. Larger files and higher usage return typed errors with upgrade information.

## Tools and capabilities

- Read, write, convert, clean, redact, and diff workbooks.
- Extract formulas, cached results, schemas, descriptions, and filtered or aggregated data.
- Inspect workbook layout, formatting, views, print configuration, protection, and metadata.
- Enumerate charts, images, comments, links, controls, validations, pivots, slicers, and external references.
- Detect VBA project presence in `.xlsm` and `.xlsb` files and return safety guidance.
- Read local Excel files and live Google Sheets in read-only mode.

## Limitations and notes

Google Sheets access is read-only and requires a read-only OAuth token supplied by the caller. Several inspection tools are specifically for local `.xlsx` files, so the input source matters. The free HTTP tier has a 10 MB file limit and monthly call quota. Macro inspection reports presence and likely module names; it does not describe execution or provide a security guarantee. The server can redact and return a copy, but the input workbook is not described as being mutated in place by that operation.

_Full upstream README: https://allmcps.com/mcp/xlsx-for-ai/readme_

