Excel (.xlsx) MCP server: calculated/cached/missing labels on every value, formulas, verified writes
Read and edit Excel workbooks with your AI assistant, and know whether each formula result is fresh, cached or missing.
KitchenSink4XL is an MCP server that lets Claude Code, the Codex CLI, Copilot CLI, Claude Desktop and other local MCP clients work with .xlsx and .xlsm files: formulas, tables, formatting, structural edits and data checks. When it reads a formula cell, it tells your AI whether the value was just calculated, remembered from the last save, or never calculated at all, so a stale number does not end up in your report. This is the free Community edition, licensed under the AGPL-3.0.
Product page · llms.txt · Changelog
Platform: the file tools run on Windows, macOS and Linux. Recalculation, pivot tables, PDF export and the other Excel-powered features need Windows with Microsoft Excel installed.
The package needs Python 3.12 or newer. Run the commands below in PowerShell or a terminal, not in an AI chat.
Claude Code or Codex CLI. Install uv, run the line for your app, and start a new session:
claude mcp add xl -s user -- uvx kitchensink4xl
codex mcp add xl -- uvx kitchensink4xl
Claude Desktop. Install uv and restart Claude Desktop. Download the .mcpb file from the latest release, then open Settings > Extensions > Advanced settings > Install extension and choose the file. The first launch downloads the Python package, so it needs a network connection.
Any other local MCP client. Use uvx as the command and kitchensink4xl as its argument, or install the package and run kitchensink4xl as the server command:
pip install kitchensink4xl
The first launch through uvx builds the environment and can take 20 to 30 seconds; later launches start in about two. If your client times out on the first run, start it once from a terminal and try again.
The server offers 67 workbook tools covering 129 operations, plus two tools that switch capability packs on and off.
A workbook stores the last answer each formula produced, not a guarantee that the answer is current. If something upstream changed and nobody recalculated, the old number still looks like a real one. KitchenSink4XL labels every formula result it returns: freshly calculated, remembered from the last save, or not calculated yet. Values someone typed in carry no label, because there is nothing to recalculate. When it matters, the COM pack asks a private, hidden Excel to recalculate and returns results marked as calculated.
Inserting a column affects everything to its right: formulas, totals, charts, tables and named ranges on other sheets. KitchenSink4XL moves what should move and is tested against Excel's own behavior for formulas, tables, named ranges, charts and cross-sheet references. When an edit cannot be done safely, it refuses and says why instead of guessing.
A session starts with a core set of tools and loads larger capability packs only when a task needs them. All figures come from scripts/measure_surface.py and count the full tool entry the client receives.
| Pack | Tools | Approx. tokens | What it covers |
|---|---|---|---|
| lite (loaded at start) | 40 | ~15.5k | A grid view of the workbook, labeled reads, server-side query and aggregation, formula writing and auditing, row and column edits that carry their references, sort and filter, tables, formatting, import and export, backups, diagnostics, pack controls |
| design | 9 | ~4.3k | Named cell styles, format painter, style cleanup, conditional formatting, data validation, images, charts, table lifecycle, named ranges including LAMBDA definitions |
| io | 9 | ~3.0k | Page layout and printing, headers and footers, protection, legacy comments, multi-sheet export, and inspectors for external links, VBA, pivot tables and data connections |
| com | 11 | ~3.1k | A private hidden Excel, never your open session: recalculation, pivot tables, goal seek, PDF export, sheet rendering, format conversion, encryption, sparklines, autofit, an opens-clean check |
| Everything | 69 | ~25.8k | All packs plus enable_tools and disable_tools |
Your AI turns a pack on by name:
enable_tools(["design"])
enable_tools(["com"])
A request outside the lite core is refused with the exact pack and call that unlocks it. To load everything at start, set KS4XL_MODE=full, or give a comma-separated pack list. Administrators can fix the selection with KS4XL_PACK_POLICY=locked. Clients that load tool schemas on first use pay close to nothing until a tool is called.
.ks4xl-backups/ folder next to it. manage_backups lists, restores and prunes them. The slots capture changes made through this server only; an edit made in Excel or another program is not captured.verify_com=true (or KS4XL_VERIFY_COM=1 for every save), the saved file must also open cleanly in a hidden Excel.query_range, export_range and the aggregates include rows hidden by an autofilter. Excel's SUBTOTAL skips them, so totals on a filtered sheet can differ from Excel's status bar..ks4xl-backups/ from cloud sync tools; the backup files change on every edit and sync clients can hold locks that slow saves down.The server runs on your computer. KitchenSink4AI never receives your files or usage data. Your AI app may send prompts, file contents and tool results to its own provider under that app's settings and terms. The optional update check contacts PyPI and sends nothing beyond the request itself. The Privacy Policy covers the product, purchases and support.
| Variable | What it does |
|---|---|
KS4XL_MODE | Tools at startup: lite (default), full, or a comma-separated pack list |
KS4XL_PACK_POLICY | auto (default) or locked, which fixes the tool set at startup |
KS4XL_ALLOWED_ROOTS | Restricts every path the server reads or writes to these folders (separated by ; on Windows, : elsewhere) |
KS4XL_VERIFY_COM | 1 makes the hidden-Excel open check the default for every save |
KS4XL_VALIDATE_COM | 1 uses Excel's own verdict for validate's structure check |
KS4XL_COM_TIMEOUT | Maximum time for a COM call |
KS4XL_UPDATE_CHECK | off disables the update check completely (KS4XL_NO_UPDATE_CHECK=1 also works) |
Sandboxing. With KS4XL_ALLOWED_ROOTS set, the containment check runs on canonical paths, so ..\ traversal, symbolic links and junctions, short names, case tricks and lookalike folder names are all caught. A blocked call returns a typed error naming the path and the allowed roots before any file is opened.
Update check. The server checks PyPI for a newer release only when you call get_server_info: never at startup or on a timer, at most once every seven days, with a two-second limit. It never downloads or installs anything.
Claude Desktop extension settings. Verify every save with Excel turns on the hidden-Excel open check (off by default, since it adds a round trip through Excel on every write). Limit the server to one folder confines every path the server touches, reads included, to a folder you choose.
Point any MCP client at the installed executable:
{"mcpServers": {"xl": {"command": "kitchensink4xl", "env": {"KS4XL_MODE": "lite"}}}}
xl-mcp is an equivalent entry point, and python -m xlsx_mcp starts the same server. python -m xlsx_mcp.server also works and is the route for releases before 1.1. The COM pack is an optional extra (pip install kitchensink4xl[com]) and does nothing outside Windows.
From a clone on Windows:
git clone https://github.com/KitchenSink4AI/KitchenSink4XL
cd KitchenSink4XL
python -m venv .venv
.venv\Scripts\pip install -e ".[com]"
claude mcp add xl -s user -- <absolute-path>\.venv\Scripts\xl-mcp.exe
On macOS and Linux, use python3 -m venv .venv, .venv/bin/pip install -e ".[com]" and the path <absolute-path>/.venv/bin/xl-mcp.
com_render_sheet needs a signed-in desktop session. Rendering a sheet to an image goes through Excel's clipboard, which a hidden Excel in a non-interactive session cannot use. Every other COM tool runs unattended.#REF! when Excel opens the file. Audit references first if you are unsure.recalculate in the COM pack fixes them.The unit suite has about 1,300 tests and runs on every pull request. Structural edits are checked against Excel's own recalculation, formulas across every documented function family are written and reopened without repair prompts, and the fixture workbooks include features that only Excel can author, such as pivot tables, slicers and shapes. A separate test set that drives a real Excel runs on Windows.
Please open an issue when something fails, is refused unexpectedly or returns a wrong number. Rebuild the structure with placeholder data rather than attaching a private workbook, and include the output of get_server_info, which is designed to be safe to share. Feature ideas are welcome here. For security issues, follow SECURITY.md.
The Business edition pairs these tools with a Windows installer, a signed update channel and support under the Business terms. Update checks tell you when a covered release is available, and nothing installs on its own. See pricing. The Community edition stays free under the AGPL, including business use that meets its terms.
Bug reports, fixes, tests and documentation are welcome. See CONTRIBUTING.md; first-time contributors agree to the Contributor License Agreement.
KitchenSink4XL is dual-licensed.
Provided as is, without warranty of any kind, under the terms of the license.
Copyright (c) 2026 Alvut Consulting, LLC. KitchenSink4AI is a product line of Alvut Consulting, LLC. KitchenSink4AI tools are built with the help of AI coding assistants, and every release goes through the full test suite before it ships.
Not affiliated with, endorsed by, or sponsored by Microsoft Corporation. Microsoft and Excel are trademarks of the Microsoft group of companies.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
uvx kitchensink4xlMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-kitchensink4ai-kitchensink4xl": {
"command": "uvx",
"args": [
"kitchensink4xl"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencekitchensink4xlpypiKitchenSink4XL works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.