MCP Server for Excel
Drives the real desktop Microsoft Excel on Windows through COM for workbooks, Power Query, DAX and VBA
Create, read and edit Excel workbooks, charts, PivotTables and formulas without Microsoft Excel
By Haris (individual) Python Local · stdio, Streamable HTTP Data and analyticsFiles and storageProductivity
88 popularity score ★ 4.3k ↓ 136k/mo
Opens the app, which asks before it adds the server.
claude mcp add --transport http excel http://127.0.0.1:8017/mcp{
"mcpServers": {
"excel": {
"url": "http://127.0.0.1:8017/mcp"
}
}
}{
"servers": {
"excel": {
"type": "http",
"url": "http://127.0.0.1:8017/mcp"
}
}
}[mcp_servers.excel]
url = "http://127.0.0.1:8017/mcp"gemini mcp add --scope user --transport http excel http://127.0.0.1:8017/mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
claude mcp add excel -- uvx excel-mcp-server stdio --allow-dir '<ABSOLUTE_PATH_TO_WORKBOOKS>'{
"mcpServers": {
"excel": {
"command": "uvx",
"args": [
"excel-mcp-server",
"stdio",
"--allow-dir",
"<ABSOLUTE_PATH_TO_WORKBOOKS>"
]
}
}
}{
"mcpServers": {
"excel": {
"command": "uvx",
"args": [
"excel-mcp-server",
"stdio",
"--allow-dir",
"<ABSOLUTE_PATH_TO_WORKBOOKS>"
]
}
}
}{
"servers": {
"excel": {
"type": "stdio",
"command": "uvx",
"args": [
"excel-mcp-server",
"stdio",
"--allow-dir",
"<ABSOLUTE_PATH_TO_WORKBOOKS>"
]
}
}
}[mcp_servers.excel]
command = "uvx"
args = ["excel-mcp-server", "stdio", "--allow-dir", "<ABSOLUTE_PATH_TO_WORKBOOKS>"]gemini mcp add --scope user excel uvx -- excel-mcp-server stdio --allow-dir '<ABSOLUTE_PATH_TO_WORKBOOKS>'EXCEL_FILES_PATH |
Optional: Folders workbooks must be in (same as --allow-dir); separate with : on macOS/Linux, ; on Windows. HTTP mode uses ./excel_files when unset. |
|---|---|
EXCEL_MCP_READ_ONLY |
Optional: Set to 1 to offer only tools that do not change files. |
EXCEL_MCP_TOOLS |
Optional: Comma-separated tool areas to offer beside the core tools (e.g. data,charts); an unknown area stops the server. |
EXCEL_MCP_MAX_FILE_MB |
Optional: Largest workbook opened, in MB; also sets the unpacked-size cap (10x). |
EXCEL_MCP_MAX_CELLS |
Optional: Most cells one call may read, write or format. |
EXCEL_MCP_MAX_PIVOT_CELLS |
Optional: Largest PivotTable source, in cells. |
EXCEL_MCP_MAX_LOADED_CELLS |
Optional: Most cells and rows loaded into memory at once (about 0.5 KB each). |
EXCEL_MCP_ALLOW_VBA_WRITE |
Optional: Set to 1 to add the VBA writing tools and let create_workbook and import_workbook make .xlsm/.xltm files. Ignored in read-only mode, and with EXCEL_MCP_TOOLS it needs the vba area. |
| Set together: http | |
EXCEL_MCP_HOST |
Optional: HTTP listen address; a non-local host needs EXCEL_MCP_AUTH_TOKEN or --allow-unauthenticated. |
EXCEL_MCP_PORT |
Optional: HTTP port. |
EXCEL_MCP_AUTH_TOKEN secret |
Optional: Bearer token clients must send in HTTP mode. |
Excel MCP Server gives an assistant in Claude, Cursor, VS Code Copilot, Codex, Gemini CLI and other clients the means to create, read and change Excel workbooks. It is a Python program built on openpyxl, so no copy of Microsoft Excel is needed, and it runs on Windows, macOS and Linux. It handles .xlsx, .xlsm, .xltx and .xltm files; as of 2.x, CSV and TSV files are brought in and written out with import_csv and export_csv, while legacy .xls files stay unsupported.
Its 48 tools (counted in the tool areas of server/areas.py, since the README gives no total, with two that appear only under --allow-vba-write) cover workbooks and sheets, reading and writing ranges, sorting, find and replace, formatting, conditional formats, data validation, tables, charts including the Excel 2016 types, PivotTables, slicers, sparklines, images, defined names and notes. A built-in calculator of about 260 functions returns values for formulas in files never opened in Excel. trace_formula follows a formula's inputs and goal_seek solves for a target value using that same calculator.
It runs locally through uv (uvx excel-mcp-server stdio), as a Claude Desktop bundle, or as a Streamable HTTP server on http://127.0.0.1:8017/mcp, which can also be built into a Docker image. --tools (or EXCEL_MCP_TOOLS) offers only the three core tools plus chosen areas to save context, and --max-file-mb and --max-cells set the size caps. In stdio mode without --allow-dir, the server prints a warning to stderr that any Excel file on the computer can be opened (cli.py).
| Runtime | Python 3.11+ |
|---|---|
| Runs on | macOS, Windows, Linux |
| Also |
|
The client command is uvx excel-mcp-server stdio, so uv must be installed; desktop apps that cannot see your shell PATH need the full path to uvx (which uvx). The Claude Desktop .mcpb bundle from the latest GitHub release needs no uv. For HTTP mode run uvx excel-mcp-server streamable-http --allow-dir <DIR>; the Docker image is built locally from the repository's Dockerfile and also serves HTTP on port 8017.
Suits someone who wants an assistant to build or edit real Excel files, with charts, PivotTables, formats and formulas, on a machine without Excel or on a server. It runs locally and needs no account; --allow-dir and --read-only make it reasonable to point at a folder of existing reports, and --tools keeps the tool list small for clients short on context. It writes files, so pick --read-only if you only want analysis. It is not a fit for .xls files, for live Excel sessions (it edits files on disk, not an open Excel window), or for running macros. Values it calculates come from its own engine, not Excel, so check results that matter in Excel itself.
8 only read, 29 change things, 11 can delete or overwrite.
create_workbook changesdescribe_workbookset_workbook_settings changeslist_workbooksexport_workbookimport_workbook changesimport_csv changesexport_csv changesdescribe_sheetcreate_sheet changesrename_sheet changescopy_sheet changesdelete_sheet deletesinsert_rows_or_columns changesdelete_rows_or_columns deletesread_rangewrite_range changesclear_range deletescopy_range changessort_range changestransform_range changesfind_cellsreplace_cells changestrace_formulagoal_seek changesformat_range changesmerge_cells changesset_sheet_layout changesadd_conditional_format changesadd_data_validation changesset_table changescreate_chart changesdelete_chart deletescreate_pivot_table changesdelete_pivot_table deletesadd_slicer changesdelete_slicer deletesinsert_image changesdelete_image deletesadd_sparklines changesdelete_sparklines deletesset_defined_name changesdelete_defined_name deletesset_note changesdelete_note deletesread_vbawrite_vba_module changesdelete_vba_module deletes