# excel-mcp [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/wesseltl/excel-mcp  
**GitHub Stars:** 0  
**Views:** 19  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/excel-mcp

## Description
Read real, messy Excel files from an agent: multiple sheets, title rows, merged cells.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/wesseltl/excel-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
pip install "excel-agent-mcp[mcp]"
```

## Documentation

## What excel-mcp does

The excel-mcp MCP server gives an MCP client structured access to local Excel workbooks in `.xlsx` format. It is designed for files whose data does not begin at cell A1, including reports with title rows, notes, blank rows, multiple worksheets, and merged cells.

Instead of asking an agent to infer structure from pasted spreadsheet text, the server reads the workbook with code and returns the discovered table. It can identify the header row automatically or use an explicitly supplied row, then represent the table as records. The excel-mcp MCP server focuses on reading and inspecting workbooks; the documented tools do not provide spreadsheet editing operations.

## How it works

An MCP client starts the server as a local process using the `excel-agent-mcp` command. The agent supplies a workbook path and, where needed, a sheet name or row count. The server examines the workbook and returns sheet metadata, a layout preview, structured table data, or CSV text.

For automatic header detection, `read_table` reports the selected row, whether the header was explicit or detected, and a confidence value from 0 to 1. It also reports table-level warnings and whether the result looks clean. When a merged cell spans several rows, values may be copied downward; `forward_filled_columns` identifies columns containing those inferred values.

## Setup and configuration

Install the package with Python 3.10 or newer:

```bash
pip install "excel-agent-mcp[mcp]"
```

Configure an MCP client to launch `excel-agent-mcp` over stdio. Claude Desktop, Cursor, Windsurf, VS Code with GitHub Copilot, and Cline are documented examples. Configuration file names and JSON keys differ between clients; VS Code uses a `servers` key, `type: "stdio"`, and requires Copilot Agent mode.

The optional `EXCEL_MCP_ALLOWED_DIR` environment variable can restrict file access to a single directory. This is useful when the agent should not be able to open workbooks elsewhere on the machine. The server can also be called directly from Python through the `excel_mcp.reader` module.

## Tools and capabilities

The excel-mcp MCP server provides four documented tools:

- `list_sheets(path)` returns worksheet names and their dimensions.
- `preview_sheet(path, sheet, rows)` returns the first requested rows as a grid for layout inspection.
- `read_table(path, sheet)` returns the detected table as records, along with parsing decisions and warnings.
- `sheet_to_csv(path, sheet)` converts the table into CSV text.

An agent can use `list_sheets` and `preview_sheet` before selecting a worksheet or checking where its table begins. `read_table` is appropriate when structured rows are needed, while `sheet_to_csv` is useful when the next step expects plain CSV.

## Limitations and notes

Header detection is not guaranteed to be correct. A low `header_confidence` value indicates that the chosen header was uncertain; callers can provide an explicit `header_row` when the automatic result is wrong. Unnamed columns, mostly empty tables, and other issues appear through table warnings.

Forward-filled values from merged cells are inferred from the merged region rather than read independently from every row. Consumers should treat those values as derived. The provided examples and installation instructions target local `.xlsx` files and stdio-based MCP clients. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/excel-mcp/readme_

