mcpField
X
xlsx-audit-mcp

xlsx-audit-mcp

Local
github.com/arose26Data & Analytics0Updated 2w ago

About xlsx-audit-mcp

xlsx-audit-mcp is an MCP server for auditing Excel workbook formulas and model risks. It helps spreadsheet reviewers trace dependencies and find fragile constructs while keeping files local.

Key features

  1. 01Workbook sheets, dimensions, and formula overview
  2. 02Formula listing with addresses and cached values
  3. 03Cell precedent and dependent tracing
  4. 04Ranked audit of workbook risks
  5. 05Detection of cycles and formula smells

Use cases

  1. 01Trace the inputs and downstream effects of a cell
  2. 02Review a financial model for fragile formulas
  3. 03Locate external links and volatile functions

MCP support

Exposes workbook inspection, formula tracing, and audit tools to MCP clients. It works with local files and does not send them off the machine.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"arose26-xlsx-audit": {
"command": "npx",
"args": [
"-y",
"xlsx-audit-mcp"
]
}
}
}
Run commandnpx -y xlsx-audit-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmxlsx-audit-mcp0.1.0

Tools

4

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
pathstringYesPath to an .xlsx workbook

Details

From the project README

xlsx-audit-mcp

An MCP server that audits Excel workbooks. Other Excel MCP servers read and write your data — this one reviews your model:

  • "What feeds the Total cell on the Summary sheet?" — precedent tracing
  • "If I change this assumption, what breaks?" — dependent tracing, including cells that consume it through ranges like SUM(A1:A40)
  • "Audit this workbook" — circular references with example chains, volatile functions (INDIRECT, OFFSET, NOW, RAND...), hardcoded constants buried inside formulas, external workbook links, merged cells, extra-long formulas

Spreadsheet mistakes are famously expensive. This is the "trace precedents" discipline auditors apply by hand, exposed to an LLM for a whole workbook at once. Local files only; nothing leaves your machine.

Quick start

Claude Code

claude mcp add xlsx-audit -- npx -y xlsx-audit-mcp

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "xlsx-audit": {
      "command": "npx",
      "args": ["-y", "xlsx-audit-mcp"]
    }
  }
}

Then: "Audit C:\models\budget-2026.xlsx and tell me what looks fragile."

Tools

ToolWhat it does
workbook_overviewSheets, dimensions, formula counts, defined names, external links
list_formulasFormulas with addresses and cached values, filterable (INDIRECT, VLOOKUP, ...)
trace_cellOne cell's formula, value, precedents, and dependents (direct + via ranges)
audit_workbookRanked risk report across the whole model

How it works

  • Reference tokenizer that understands real formulas: string literals are stripped first (the "A1" in INDIRECT("A1") is not a reference), function names can't collide (the G10 in LOG10(...) is not a cell), $ absolutes, quoted sheet names ('My Data'!A1), and ranges are handled.
  • Shared formulas are materialized. Excel stores filled formulas once with an offset scheme; the loader translates them per-cell (relative refs shifted, absolutes preserved), so dependency queries see what each cell actually computes.
  • Ranges are never expanded for storage — dependents queries use range-containment tests, and cycle detection caps range fan-out (a SUM(A:A) can't explode the graph; capped ranges are reported, not silently dropped).
  • No formula evaluation. Cached values from the file are shown instead — no spreadsheet engine dependency.

Known limitations: R1C1 notation and structured table references ([@Column]) are counted but not resolved into the graph.

Development

npm install
npm test                 # offline tests — synthetic workbooks built in-suite
npm run build            # tsc → dist/
node scripts/smoke.mjs   # end-to-end: generates a workbook, drives the server over stdio

Architecture: src/xlsx.ts (zip + XML → workbook model) and src/formulas.ts (tokenizer, graph, smells) are pure logic; src/index.ts is the MCP wiring.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.