Excel MCP Server

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

Connect your client

Local (once it is running)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http excel http://127.0.0.1:8017/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "excel": {
      "url": "http://127.0.0.1:8017/mcp"
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "excel": {
      "type": "http",
      "url": "http://127.0.0.1:8017/mcp"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.excel]
url = "http://127.0.0.1:8017/mcp"
Gemini CLITerminal
gemini mcp add --scope user --transport http excel http://127.0.0.1:8017/mcp
Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

Claude CodeTerminal
claude mcp add excel -- uvx excel-mcp-server stdio --allow-dir '<ABSOLUTE_PATH_TO_WORKBOOKS>'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "excel": {
      "command": "uvx",
      "args": [
        "excel-mcp-server",
        "stdio",
        "--allow-dir",
        "<ABSOLUTE_PATH_TO_WORKBOOKS>"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "excel": {
      "command": "uvx",
      "args": [
        "excel-mcp-server",
        "stdio",
        "--allow-dir",
        "<ABSOLUTE_PATH_TO_WORKBOOKS>"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "excel": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "excel-mcp-server",
        "stdio",
        "--allow-dir",
        "<ABSOLUTE_PATH_TO_WORKBOOKS>"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.excel]
command = "uvx"
args = ["excel-mcp-server", "stdio", "--allow-dir", "<ABSOLUTE_PATH_TO_WORKBOOKS>"]
Gemini CLITerminal
gemini mcp add --scope user excel uvx -- excel-mcp-server stdio --allow-dir '<ABSOLUTE_PATH_TO_WORKBOOKS>'

Settings 11

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. Default off.
EXCEL_MCP_TOOLS Optional: Comma-separated tool areas to offer beside the core tools (e.g. data,charts); an unknown area stops the server. Default all.
EXCEL_MCP_MAX_FILE_MB Optional: Largest workbook opened, in MB; also sets the unpacked-size cap (10x). Default 100.
EXCEL_MCP_MAX_CELLS Optional: Most cells one call may read, write or format. Default 100000.
EXCEL_MCP_MAX_PIVOT_CELLS Optional: Largest PivotTable source, in cells. Default 3000000. For create_pivot_table.
EXCEL_MCP_MAX_LOADED_CELLS Optional: Most cells and rows loaded into memory at once (about 0.5 KB each). Default 3000000.
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. Default off. For write_vba_module.
Set together: http
EXCEL_MCP_HOST Optional: HTTP listen address; a non-local host needs EXCEL_MCP_AUTH_TOKEN or --allow-unauthenticated. Default 127.0.0.1.
EXCEL_MCP_PORT Optional: HTTP port. Default 8017.
EXCEL_MCP_AUTH_TOKEN secret Optional: Bearer token clients must send in HTTP mode.

What it does

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).

What it needs

RuntimePython 3.11+
Runs onmacOS, Windows, Linux
Also
  • uv (for uvx), unless using the Claude Desktop bundle

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.

Limits

  • Not covered Legacy .xls files are not supported; CSV and TSV only through import_csv and export_csv.
  • Size cap Opens workbooks up to 100 MB by default (--max-file-mb); unpacked size is capped at ten times that.
  • Size cap One call reads, writes or formats at most 100,000 cells by default (--max-cells); reads come back in pages.
  • Size cap Since 2.2.5 chart ranges count against --max-cells too, and one set_sheet_layout call changes at most 10,000 rows (CHANGELOG).
  • Size cap PivotTable sources are capped at 3,000,000 cells (--max-pivot-cells); the largest take about a minute and 2 GB of memory.
  • Limit The built-in calculator covers about 260 functions; formulas it cannot reproduce return null and are listed as uncalculated, and RAND-style volatile functions are not calculated.
  • Limit goal_seek refuses formulas the calculator cannot evaluate and stores a result only when it converges within 0.001.
  • Not covered The server never runs macros; digitally signed VBA projects cannot be edited, and signatures are removed when a signed file changes.
  • Limit Without --allow-vba-write, create_workbook and import_workbook refuse .xlsm and .xltm paths, and uploads saved as .xlsx or .xltx lose their macros.
  • Limit Version 2.0 renamed tools and parameters, breaking 1.x clients and saved prompts; the changelog maps old names to new.

Who it suits

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.

Tools 48

8 only read, 29 change things, 11 can delete or overwrite.

create_workbook changes
Create a new workbook; .xlsm and .xltm only with --allow-vba-write
describe_workbook
Describe a workbook and its sheets
set_workbook_settings changes
Change workbook-wide settings
list_workbooks
List the workbooks the server may use
export_workbook
Send a workbook from the server to the client (HTTP mode)
import_workbook changes
Receive a workbook from the client (HTTP mode); macro-enabled paths only with --allow-vba-write
import_csv changes
Load a .csv or .tsv file into a sheet at a chosen cell
export_csv changes
Save a cell range as a CSV file
describe_sheet
Describe a worksheet, with its charts and images
create_sheet changes
Add a worksheet
rename_sheet changes
Rename a worksheet, updating references to it
copy_sheet changes
Duplicate a worksheet
delete_sheet deletes
Remove a worksheet
insert_rows_or_columns changes
Insert rows or columns and shift references
delete_rows_or_columns deletes
Remove rows or columns and shift references
read_range
Read cell values or formulas, paged for large sheets
write_range changes
Put values and formulas into cells
clear_range deletes
Empty a block of cells
copy_range changes
Copy a block of cells elsewhere
sort_range changes
Sort a block of cells
transform_range changes
Filter, remove duplicates, split text to columns, fill series and similar
find_cells
Search cells by their content
replace_cells changes
Find and replace text in cells
trace_formula
Show a formula's precedents and dependents, or step through its evaluation
goal_seek changes
Change an input cell until a formula hits a target value
format_range changes
Apply fonts, fills, borders and number formats
merge_cells changes
Merge a block of cells
set_sheet_layout changes
Set column widths, row heights, frozen panes, print setup and the like
add_conditional_format changes
Add a conditional formatting rule
add_data_validation changes
Add a validation rule such as a dropdown list
set_table changes
Create or change an Excel table
create_chart changes
Add a chart
delete_chart deletes
Remove a chart
create_pivot_table changes
Build a PivotTable from a data range
delete_pivot_table deletes
Remove a PivotTable
add_slicer changes
Add a slicer or timeline to a table or PivotTable
delete_slicer deletes
Remove a slicer
insert_image changes
Place an image on a sheet
delete_image deletes
Remove an image
add_sparklines changes
Add sparklines to cells
delete_sparklines deletes
Remove sparklines
set_defined_name changes
Create or change a defined name
delete_defined_name deletes
Remove a defined name
set_note changes
Add or change a note on a cell
delete_note deletes
Remove a cell note
read_vba
Read the VBA code stored in .xlsm and .xltm files
write_vba_module changes
Set the code of a VBA module (only with --allow-vba-write)
delete_vba_module deletes
Remove a VBA module (only with --allow-vba-write)

Similar servers