PluginBench
MCP Server
Active
MIT

Excel MCP Server MCP Server

io.github.haris-musa/excel-mcp-server

Create, read and edit Excel workbooks without Microsoft Excel installation.

What is the Excel MCP Server MCP server?

The Excel MCP Server is a Model Context Protocol server that enables AI assistants to create, read, and edit Excel workbooks (.xlsx, .xlsm, .xltx, .xltm files) without requiring Microsoft Excel. It provides comprehensive tools for cell operations, formatting, structure management, macros, and data validation with built-in security features like formula safety checks and folder confinement.

This server gives Claude, Cursor, and other AI assistants full programmatic access to Excel workbooks. You can read and write cells with formulas, apply formatting, create tables and charts, manage sheets, add conditional formatting and data validation, and read VBA macros. It's designed to be safe by default with optional folder confinement, read-only mode, and formula validation that blocks network-accessing functions.

How to install Excel MCP Server

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "excel-mcp-server": {
      "command": "uvx",
      "args": [
        "excel-mcp-server",
        "stdio",
        "--allow-dir"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • create_workbook — Create a new Excel workbook
  • describe_workbook — Get metadata and structure of an existing workbook
  • list_workbooks — List available workbooks in allowed folders
  • export_workbook — Export a workbook from the server
  • import_workbook — Import a workbook to the server
  • describe_sheet — Get metadata about a specific sheet
  • create_sheet — Create a new sheet in a workbook
  • rename_sheet — Rename an existing sheet
  • copy_sheet — Copy a sheet within or between workbooks
  • delete_sheet — Delete a sheet from a workbook
  • insert_rows_or_columns — Insert rows or columns into a sheet
  • delete_rows_or_columns — Delete rows or columns from a sheet
  • read_range — Read cell values, formulas, and dates from a range with paging support
  • write_range — Write values and formulas to cells
  • clear_range — Clear cell contents in a range
  • copy_range — Copy cells within or between sheets
  • find_cells — Search for cells by content
  • format_range — Apply formatting (fonts, fills, borders, number formats, column widths)
  • merge_cells — Merge cells in a range
  • set_sheet_layout — Configure sheet layout including frozen panes

Use cases

  • Automate data entry and updates in Excel workbooks from AI conversations
  • Generate reports by creating workbooks with formatted tables, charts, and summaries
  • Parse and analyze Excel data by reading ranges and searching for specific cells
  • Apply bulk formatting, validation rules, and conditional formatting to spreadsheets
  • Preserve and inspect VBA macros in Excel files without executing them

Excel MCP Server MCP server FAQ

What is the Excel MCP Server?

It's an MCP server that lets AI assistants like Claude and Cursor create, read, and edit Excel workbooks programmatically without needing Microsoft Excel installed. It supports .xlsx, .xlsm, .xltx, and .xltm files.

Is it free?

Yes, the Excel MCP Server is open-source under the MIT license and free to use.

How do I install it in Cursor?

Add it to ~/.cursor/mcp.json with the command: uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

How do I install it in Claude Desktop?

Download the excel-mcp-server-<version>.mcpb bundle from the latest release and open it, or manually add the mcpServers configuration to claude_desktop_config.json.

Does it require authentication?

For stdio mode (local use), no authentication is required. For HTTP mode, you can optionally set EXCEL_MCP_AUTH_TOKEN for security.

What security features does it have?

It includes formula safety checks that block network-accessing functions, optional folder confinement, read-only mode, and atomic saves that prevent partial writes.

README (reference)

Source of truth, from the repository.

<!-- mcp-name: io.github.haris-musa/excel-mcp-server --> <p align="center"> <img src="https://raw.githubusercontent.com/haris-musa/excel-mcp-server/main/assets/logo.png" alt="Excel MCP Server" width="300"/> </p>

PyPI version Downloads CI License: MIT

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)
  • Macros: read the VBA code in .xlsm files, module by module (read-only, never run)
  • 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. Every client runs the server with uvx excel-mcp-server stdio; replace /path/to/workbooks with the folder the server may use.

Claude Desktop (Chat): download excel-mcp-server-<version>.mcpb from the latest release and open it. Claude asks which folder the server may use.

Claude Code (the CLI, and the Code tab in Claude Desktop):

claude mcp add excel --scope user -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

Cursor (~/.cursor/mcp.json), and most clients that use an mcpServers config:

{
  "mcpServers": {
    "excel": {
      "command": "uvx",
      "args": ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/workbooks"]
    }
  }
}

VS Code with GitHub Copilot (.vscode/mcp.json, note the servers key):

{
  "servers": {
    "excel": {
      "type": "stdio",
      "command": "uvx",
      "args": ["excel-mcp-server", "stdio", "--allow-dir", "${workspaceFolder}"]
    }
  }
}
<details> <summary>OpenAI Codex, Gemini CLI, Devin Desktop, and Claude Desktop without the bundle</summary>

OpenAI Codex (CLI, IDE extension and app):

codex mcp add excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

Gemini CLI:

gemini mcp add -s user excel uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

Devin Desktop:

devin mcp add -s user excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

Claude Desktop, manual setup: open Settings, Developer, Edit Config, add the mcpServers JSON above to claude_desktop_config.json, and restart Claude.

</details>

Desktop apps often cannot find uvx, because they do not see your shell's PATH (common on macOS). Use its full path instead, 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

FlagEnvironment variableDefaultMeaning
--allow-dir DIREXCEL_FILES_PATHnone (stdio), ./excel_files (HTTP)Folders workbooks must be in
--read-onlyEXCEL_MCP_READ_ONLY=1offOnly offer tools that do not change files
--max-file-mb N100Largest workbook the server opens
--log-level LEVELWARNINGLogging on stderr
--host HOSTEXCEL_MCP_HOST127.0.0.1HTTP listen address
--port PORTEXCEL_MCP_PORT8017HTTP port
EXCEL_MCP_AUTH_TOKENnoneBearer token required on HTTP requests
--allow-unauthenticatedoffAllow a non-local --host without a token

Tools

AreaTools
Workbookscreate_workbook, describe_workbook, list_workbooks, export_workbook, import_workbook
Sheetsdescribe_sheet, create_sheet, rename_sheet, copy_sheet, delete_sheet, insert_rows_or_columns, delete_rows_or_columns
Cellsread_range, write_range, clear_range, copy_range, find_cells
Formattingformat_range, merge_cells, set_sheet_layout, add_conditional_format, add_data_validation
Objectscreate_table, create_chart, create_summary_table
Macrosread_vba

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 Sheets IMPORTXML and 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_range in values mode 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 .xls and .csv files are not supported.
  • create_summary_table writes 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 .xlsm files 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

Star History Chart

License

MIT. See LICENSE.

Related MCP servers

DIDiavlos logo

Diavlos

Active

Signed messages between AI agents. Dangerous actions wait for a human-signed approval.

2
Rust
MIT
View repository →

Live Mercury outboard data and CAD quote builder from a Mercury Platinum Dealer in Ontario.

0
TypeScript
View repository →

Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.

View repository →
VIVisuals MCP logo

Visuals MCP

Maintained

MCP server for interactive visualizations: tables, images, trees, lists, master-detail

5
TypeScript
View repository →
TATaxBrainAI MCP logo

TaxBrainAI MCP

Maintained

8 offline Indian income-tax MCP tools: deterministic compute, regimes, citations, notices.

0
Python
MIT
View repository →

MCP server for the Codabench REST API — drives a full ML-benchmark participant workflow.

0
Python
MIT
View repository →