# xlsx-for-ai

MCP server with 52 tools for inspecting, recalculating, and editing .xlsx spreadsheets up to 100MB. It protects formulas, pivot tables, and formatting from corruption.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: senoff
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/senoff/xlsx-for-ai
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/mcp/xlsx-for-ai

## What it does

Standard tabular parsers often strip merged cells, named ranges, and embedded charts. The `xlsx-for-ai` server (shorthand `xfa`) exposes 52 tools to read, audit, diff, and write Excel spreadsheets without breaking complex topology. It preserves comments, VBA code, slicers, and conditional formatting.

The server includes diagnostic tools like `xlsx_doctor` and `xlsx_validate` to catch file corruption early. Calculations are handled by a dedicated hosted recalculation backend rather than local script sandboxes.

All file parsing runs through the remote endpoint, so the server fails immediately without an active internet connection and initial device login.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add xlsx-for-ai -- npx -y xlsx-for-ai
```

### Codex

**Platform CLI**
```bash
codex mcp add xlsx-for-ai -- npx -y xlsx-for-ai
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "xlsx-for-ai": {
            "command": "npx",
            "args": [
                "-y",
                "xlsx-for-ai"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "xlsx-for-ai": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "xlsx-for-ai"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add xlsx-for-ai npx -y xlsx-for-ai
```

## When to use it
- inspect complex .xlsx workbooks up to 100MB without dropping charts or macros
- recalculate spreadsheet formulas through a server-side engine
- detect corrupted references and workbook structure issues
- diff two spreadsheets to track cell-level modifications

## Example prompts
- Use xfa to run xlsx_doctor on annual_report.xlsx and summarize the structure.
- Recalculate the formulas in quarterly_model.xlsx and export the verified values.

## Similar
- [Excel MCP Server](https://affpapa.org/en/nevibecode/mcp/excel-mcp-server.md) — MCP server · ★ 4268
- [kordoc](https://affpapa.org/en/nevibecode/mcp/kordoc.md) — MCP server · ★ 2795
- [Power BI Authoring MCP Server (Local)](https://affpapa.org/en/nevibecode/mcp/power-bi-authoring-mcp-server-local.md) — MCP server · ★ 1248
- [Microsoft 365 MCP Server](https://affpapa.org/en/nevibecode/mcp/microsoft-365-mcp-server.md) — MCP server · ★ 1085
- [anymd](https://affpapa.org/en/nevibecode/mcp/anymd.md) — MCP server · ★ 1054
- [Docling MCP](https://affpapa.org/en/nevibecode/mcp/docling-mcp.md) — MCP server · ★ 779

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
