A Model Context Protocol server that lets AI assistants create, read and edit Excel workbooks. It needs no Microsoft Excel installation.
- Read and write cells, formulas and dates, with paging for large sheets and search
- Format fonts, fills, borders, number formats, column widths and frozen panes
- Structure sheets, rows and columns, merged cells, tables, charts and summary tables
- Rules: conditional formatting and data validation (dropdowns, number limits)
- Safe by design: optional folder confinement, a formula safety check, read-only mode, localhost-only HTTP by default, and atomic saves that never leave a half-written file
Works with .xlsx, .xlsm (macros are preserved), .xltx and .xltm files.
Quick start
You need uv. The server runs
with uvx excel-mcp-server stdio.
Claude Desktop: download excel-mcp-server-<version>.mcpb from the
latest release and open it.
Claude asks which folder the server may use.
Claude Code:
claude mcp add excel -- uvx excel-mcp-server stdio --allow-dir ~/Documents/Excel
Cursor, Windsurf, Claude Desktop (manual) and most other clients:
{
"mcpServers": {
"excel": {
"command": "uvx",
"args": ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/your/workbooks"]
}
}
}
VS Code (.vscode/mcp.json):
{
"servers": {
"excel": {
"type": "stdio",
"command": "uvx",
"args": ["excel-mcp-server", "stdio", "--allow-dir", "${workspaceFolder}"]
}
}
}
If your client cannot find uvx (common with desktop apps on macOS), use its full path,
which which uvx prints.
Choosing which files it can use
With --allow-dir DIR, the server only opens workbooks inside DIR (subfolders included)
and relative paths such as reports/q1.xlsx start there. Repeat the flag to allow several
folders, or set EXCEL_FILES_PATH (separate folders with : on macOS/Linux and ; on
Windows).
Without --allow-dir, any absolute path to an Excel file works. In every mode the server
only touches Excel files and never silently overwrites an existing workbook.
Remote use (Streamable HTTP)
uvx excel-mcp-server streamable-http --allow-dir /srv/workbooks
Clients connect to http://127.0.0.1:8017/mcp. Workbooks live in the --allow-dir folder
(default ./excel_files), and export_workbook / import_workbook move files between the
server and the client.
The server listens on localhost only. To accept other machines, set a token and a host:
EXCEL_MCP_AUTH_TOKEN=change-me uvx excel-mcp-server streamable-http --host 0.0.0.0
Clients then send Authorization: Bearer change-me. Put a TLS-terminating reverse proxy in
front of it for use across networks.
Docker
docker build -t excel-mcp-server .
docker run -p 8017:8017 -v "$PWD/workbooks:/data" -e EXCEL_MCP_AUTH_TOKEN=change-me excel-mcp-server
Configuration
| Flag | Environment variable | Default | Meaning |
|---|---|---|---|
--allow-dir DIR |
EXCEL_FILES_PATH |
none (stdio), ./excel_files (HTTP) |
Folders workbooks must be in |
--read-only |
EXCEL_MCP_READ_ONLY=1 |
off | Only offer tools that do not change files |
--max-file-mb N |
100 |
Largest workbook the server opens | |
--log-level LEVEL |
WARNING |
Logging on stderr | |
--host HOST |
EXCEL_MCP_HOST |
127.0.0.1 |
HTTP listen address |
--port PORT |
EXCEL_MCP_PORT |
8017 |
HTTP port |
EXCEL_MCP_AUTH_TOKEN |
none | Bearer token required on HTTP requests | |
--allow-unauthenticated |
off | Allow a non-local --host without a token |
Tools
| Area | Tools |
|---|---|
| Workbooks | create_workbook, describe_workbook, list_workbooks, export_workbook, import_workbook |
| Sheets | describe_sheet, create_sheet, rename_sheet, copy_sheet, delete_sheet, insert_rows_or_columns, delete_rows_or_columns |
| Cells | read_range, write_range, clear_range, copy_range, find_cells |
| Formatting | format_range, merge_cells, set_sheet_layout, add_conditional_format, add_data_validation |
| Objects | create_table, create_chart, create_summary_table |
Every parameter is documented in TOOLS.md.
Security
- Formulas are parsed before they are written. Functions that reach the network, other
programs or host information (
WEBSERVICE,HYPERLINK,IMAGE,RTD,CALL,INFO,INDIRECT, Google SheetsIMPORTXMLand others), DDE links and references to other workbooks are rejected. - Paths are resolved, including symlinks, before they are checked against the allowed folders.
- A single call processes at most 100,000 cells, and large reads are returned in pages.
- Cell contents are data from files. The server tells the model not to follow instructions found in them, but review what an assistant does with workbooks from untrusted sources.
Please report vulnerabilities privately; see SECURITY.md.
Limitations
- Formulas are stored, not calculated.
read_rangeinvaluesmode returns the results Excel last saved, so formulas written by this server read as empty until the file is opened and saved in Excel or LibreOffice. - Legacy
.xlsand.csvfiles are not supported. create_summary_tablewrites a static summary; openpyxl cannot create real PivotTables.- Inserting or deleting rows and columns does not update formulas, charts or tables that refer to the moved cells.
- Workbook features openpyxl does not understand, such as shapes, slicers and some
embedded objects, may be lost when a workbook is edited. Pictures, charts, tables and
macros in
.xlsmfiles are kept.
Upgrading from 0.x
Version 1.0 renames and redesigns the tools, removes the SSE transport and requires Python 3.11 or newer. The changelog maps every old tool to its replacement.
Contributing
Contributions are welcome. See CONTRIBUTING.md.
Star history
License
MIT. See LICENSE.
Metadata
Release files for excel-mcp-server 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| excel_mcp_server-1.0.0.tar.gz | 32.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| excel_mcp_server-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.0 kB
Release files / excel_mcp_server-1.0.0.tar.gz
| Download URL | excel_mcp_server-1.0.0.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b6dc894ac065424a9fb8c59030ada55cbda976140aa3ed91da9a1ed349bef2f
|
|
BLAKE2b-256 checksum How to use checksums |
904dbebb259c98501bd70ec30ee091f3f8a9e3c2c83724547dd8bb856a962ca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / excel_mcp_server-1.0.0-py3-none-any.whl
| Download URL | excel_mcp_server-1.0.0-py3-none-any.whl |
|---|---|
| Size | 45.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3396a552dfb1d80fdee9d2799b4a23943b7dfd5a5830a02669a2775b1d845aa1
|
|
BLAKE2b-256 checksum How to use checksums |
d267d79aea49a9dbc0550d68995e32d437f8cbea8887f632df7de0a34c81e627
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency log