Skip to content
← All MCP servers

Is the Excel MCP server safe? What it can reach

What the Excel MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.

Community serverChecked

This page covers excel-mcp-server by haris-musa, the most used community Excel server. It runs locally over stdio, needs no Excel install and no sign-in, and edits .xlsx files directly. It can overwrite cells and delete sheets. Start it with --read-only and --allow-dir to limit what it can touch.

Who maintains it

ImplementationKindStatus
excel-mcp-server (haris-musa, community)Communityactive

It runs as a local process on your machine or as a hosted remote server.

How it signs in

Over stdio there is no sign-in: the server opens workbooks with your user’s file rights. The optional HTTP mode uses a bearer token set in EXCEL_MCP_AUTH_TOKEN.

What its tools can do

KindTools
Readdescribe_workbook, list_workbooks, describe_sheet, read_range, find_cells, trace_formula, export_workbook, read_vba
Writecreate_workbook, set_workbook_settings, import_workbook, import_csv, export_csv, create_sheet, rename_sheet, copy_sheet, insert_rows_or_columns, write_range, copy_range, sort_range, transform_range, goal_seek, format_range, merge_cells, set_sheet_layout, add_conditional_format, add_data_validation, set_table, create_chart, add_sparklines, create_pivot_table, add_slicer, set_defined_name, set_note, insert_image, write_vba_module
Can’t be undonedelete_sheet, delete_rows_or_columns, clear_range, replace_cells, delete_chart, delete_sparklines, delete_pivot_table, delete_slicer, delete_defined_name, delete_note, delete_image, delete_vba_module

write_vba_module and delete_vba_module exist only when the server starts with --allow-vba-write. With --read-only the server offers only tools that do not change files. The README says the server never runs macros and never silently overwrites an existing workbook, but write_range and the destructive tools do change cell contents in place.

Built-in limits

OptionWhat it does
--read-only or EXCEL_MCP_READ_ONLY=1Offers only tools that do not change files.
--allow-dir DIR or EXCEL_FILES_PATHLimits workbooks to the named folders and subfolders. Without it, any absolute path to an Excel file works.
--tools AREAS or EXCEL_MCP_TOOLSOffers only the core tools plus the areas you list, such as data or charts.
--allow-vba-writeOff by default. Without it the server cannot write or delete VBA modules or create .xlsm files.
--max-cells and --max-file-mbCap how many cells one call touches (default 100000) and the largest workbook the server opens (default 100 MB).
EXCEL_MCP_AUTH_TOKENRequired bearer token on HTTP requests. The HTTP mode listens on localhost only unless you set a host.

The risks

  • Cell contents are untrusted input, so a workbook from outside can carry text that makes the agent run write_range, replace_cells or clear_range on your real figures.
  • Without --allow-dir, any Excel file your user can reach is open to the agent, including finance and HR files outside the project.
  • With --allow-vba-write on, the agent can plant macro code that runs with your user’s rights once you enable macros in Excel, and the README warns a tricked model could write harmful code.
  • read_range and export_workbook return sheet data and whole workbook files to your AI provider.

Limit it in Claude Code

Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:

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

Claude Code names MCP tools mcp__excel__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__excel__write_vba_module",
      "mcp__excel__delete_vba_module",
      "mcp__excel__delete_sheet",
      "mcp__excel__delete_rows_or_columns",
      "mcp__excel__clear_range"
    ],
    "ask": [
      "mcp__excel__write_range",
      "mcp__excel__replace_cells",
      "mcp__excel__import_workbook",
      "mcp__excel__import_csv",
      "mcp__excel__export_csv",
      "mcp__excel__create_workbook",
      "mcp__excel__set_workbook_settings",
      "mcp__excel__sort_range",
      "mcp__excel__transform_range",
      "mcp__excel__goal_seek",
      "mcp__excel__insert_rows_or_columns",
      "mcp__excel__copy_range"
    ]
  }
}

Limit it in Codex

Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:

[mcp_servers.excel]
command = "uvx"
args = ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/workbooks"]
disabled_tools = ["write_vba_module", "delete_vba_module", "delete_sheet", "delete_rows_or_columns", "clear_range"]

Checklist

  • Start with --read-only and add --allow-dir for one folder.
  • Work on copies, not your only copy of a model.
  • Keep --allow-vba-write off.
  • Treat workbooks from outside as untrusted before opening them with the agent.

Checked against the vendor documentation on November 25, 2026. excel-mcp-server README · excel-mcp-server TOOLS.md

What Excellent covers

Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing