xlsx-tools-mcp
Read and edit Excel files from an AI agent while keeping styles, formulas and merges
xlsx-tools-mcp is an open-source MCP server for files and documents. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, macOS, Windows
- Runs
- Locally
- What it can do
- Can delete data (2 tools)
- Version
- 0.4.0
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add xlsx-tools-mcp -- uvx xlsx-tools-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"xlsx-tools-mcp": {
"command": "uvx",
"args": [
"xlsx-tools-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"xlsx-tools-mcp": {
"command": "uvx",
"args": [
"xlsx-tools-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"xlsx-tools-mcp": {
"command": "uvx",
"args": [
"xlsx-tools-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"xlsx-tools-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"xlsx-tools-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add xlsx-tools-mcp -- uvx xlsx-tools-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.xlsx-tools-mcp]
command = "uvx"
args = ["xlsx-tools-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"xlsx-tools-mcp": {
"command": "uvx",
"args": [
"xlsx-tools-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Or run: gemini mcp add -s user xlsx-tools-mcp uvx -- xlsx-tools-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "xlsx-tools-mcp": { "command": "uvx", "args": [ "xlsx-tools-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
XLSX_MCP_FILESComma or semicolon-separated alias=path pairs of workbooks to preload at startupXLSX_MCP_RECALC_TIMEOUTTimeout in seconds for the LibreOffice recalculation pass (default 60)XLSX_MCP_LOCK_TIMEOUTTimeout in seconds to acquire the per-file lock (default 10)XLSX_MCP_ALLOWED_DIRSComma or semicolon-separated list of allowed directories to restrict file access (supports case-insensitivity on Windows)XLSX_MCP_AUTO_BACKUPEnable automatic backup creation before workbook mutations (default true)XLSX_MCP_BACKUP_DIROptional custom directory to store backup files instead of beside the target fileXLSX_MCP_RECALC_MODEHow formula results are written back after LibreOffice recalculates: inject (default, keeps the file's structure) or roundtripXLSX_MCP_MAX_PART_BYTESLargest uncompressed XML part the server will parse, in bytes (default 268435456)XLSX_MCP_RIPPLEReport other formula results changed by a write (default true)XLSX_MCP_RIPPLE_MAX_CELLSSkip the ripple report above this many formula cells (default 200000)XLSX_MCP_CHANGE_LOGKeep a change log inside the workbook on a very hidden sheet (default false)XLSX_MCP_CHANGE_LOG_MAX_ROWSMaximum change-log rows kept per workbook (default 10000)XLSX_MCP_CHANGE_LOG_MAX_CELLS_PER_OPMaximum per-cell change-log entries per tool call (default 500)
About xlsx-tools-mcp
Editing a spreadsheet through an agent often wrecks what it did not touch. This server loads the existing workbook with openpyxl, changes only what was asked and saves it back so styles, merged cells and comments stay. Reads go through python-calamine for speed and type inference, falling back to openpyxl when formulas, styles or comments are needed.
It exposes 29 tools to list sheets, read ranges, search, aggregate and query with pandas, write cells and formulas, add or remove rows and columns, apply styles, build native Excel tables and bar, line, pie or scatter charts, copy and rename sheets and autofit widths. After value or formula writes it runs headless LibreOffice to recompute results and reports any Excel errors such as #REF! or #DIV/0!. The README admits this round trip can alter pivot tables, charts, data validation and some names, so recalculate=False skips it.
Safety features include per-file locks, an allowed-directories fence, automatic .bak backups with a restore tool, a guard against risky formulas such as WEBSERVICE or HYPERLINK, and XML-bomb protection. It runs over stdio from PyPI via uvx and needs Python 3.10 or newer; LibreOffice is optional.
Tools this server provides (15)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 15 tools delete data and 6 change data; 6 names don't say.
From the server's own tool labels and tool names; not verified by us.
- aggregate_sheet
- Group and aggregate sheet data with pandas
- query_sheetName suggests: reads
- Query sheet data with validated expressions
- create_tableName suggests: changes
- Create a formal Excel table with autofilter and styles
- create_chartName suggests: changes
- Create a bar, line, pie or scatter chart
- rename_sheetName suggests: changes
- Rename a sheet
- copy_sheet
- Duplicate a sheet with styles intact
- clear_range
- Clear a range of cells
- autofit_columns
- Auto-fit column widths
- restore_backup
- Atomically revert to a backup
- write_cellsName suggests: changes
- Write values and formulas to cells
- append_rows
- Append rows to a sheet
- insert_rowsName suggests: changes
- Insert rows
- delete_rowsName suggests: deletes
- Delete rows
- insert_columnsName suggests: changes
- Insert columns
- delete_columnsName suggests: deletes
- Delete columns
What it does
- Structure-preserving edits
- Keeps styles, merges and comments the edit does not touch.
- Formula recalculation
- Headless LibreOffice recomputes values and reports Excel errors.
- Aggregation and queries
- pandas-based grouping and filtering with expression validation.
- Tables and charts
- Creates native Excel tables and four chart types.
- Backups and restore
- Automatic .bak files and a restore tool.
- Path and formula guards
- Directory allowlist and rejection of exfiltration-prone formulas.
Good for
- Let an assistant fill a budget workbook without breaking formatting
- Summarise sales data by category from a spreadsheet
- Append rows to a tracker and check for formula errors
- Build a chart inside an existing workbook
Pricing
Open source
Open source; installs from PyPI
xlsx-tools-mcp FAQ
Does xlsx-tools-mcp need Excel installed?
No. LibreOffice is optional and used only for formula recalculation.
Can xlsx-tools-mcp overwrite my files safely?
It makes a .bak backup before writes by default and has a restore tool.
How do I restrict access?
Set XLSX_MCP_ALLOWED_DIRS to the directories it may use.
How many tools are there?
29.
Is xlsx-tools-mcp free?
Yes. xlsx-tools-mcp is open source, so you can use and self-host it for free.
How do I add xlsx-tools-mcp to Claude Code?
Run this command in your terminal: claude mcp add xlsx-tools-mcp -- uvx xlsx-tools-mcp
What are the best alternatives to xlsx-tools-mcp?
The closest alternatives to xlsx-tools-mcp are Agent-Native Analytics, dashboard-icons, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP and Pitot.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

