Excel MCP Server
Create, read and edit Excel workbooks, charts, PivotTables and formulas without Microsoft Excel
Drives the real desktop Microsoft Excel on Windows through COM for workbooks, Power Query, DAX and VBA
By Stefan Broenner (individual) C# Local · stdio Data and analyticsProductivity
73 popularity score ★ 856 ↓ 4.3k/wk
Opens the app, which asks before it adds the server.
claude mcp add for-excel -- npx -y @sbroenne/mcp-server-excel@latest{
"mcpServers": {
"for-excel": {
"command": "npx",
"args": [
"-y",
"@sbroenne/mcp-server-excel@latest"
]
}
}
}{
"mcpServers": {
"for-excel": {
"command": "npx",
"args": [
"-y",
"@sbroenne/mcp-server-excel@latest"
]
}
}
}{
"servers": {
"for-excel": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sbroenne/mcp-server-excel@latest"
]
}
}
}[mcp_servers.for-excel]
command = "npx"
args = ["-y", "@sbroenne/mcp-server-excel@latest"]gemini mcp add --scope user for-excel npx -- -y @sbroenne/mcp-server-excel@latestEXCELMCP_TELEMETRY_MODE |
Optional: off stops usage telemetry, local sends it only to an OpenTelemetry receiver on this machine. Released packages send to Azure Application Insights when unset. |
|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
Optional: Receiver address for local telemetry mode. Must be a loopback address (port 4318 by default with http/protobuf). |
OTEL_EXPORTER_OTLP_PROTOCOL |
Optional: grpc or http/protobuf, used in local telemetry mode. |
MCP Server for Excel (also called ExcelMcp) works by automating the copy of Microsoft Excel installed on a Windows PC over COM. It does not parse .xlsx files itself. Since Excel does the work, a client can refresh Power Query, recalculate, evaluate DAX against the Data Model and run VBA or Python in Excel formulas, and the PivotTables, charts and formatting already in a workbook survive the edit.
The server registers 64 MCP tools in 33 feature areas, with 437 actions by the README's count. Most areas come in two halves. One tool makes changes (range, table, powerquery, pivottable and so on) and a generated companion with a _read suffix holds that area's read-only actions, such as file_read and worksheet_read. The newest tool is batch, added in 2.6.9. You hand it a list of commands in the excelcli batch format and it runs them in order inside one call. It keeps going after a failed entry unless stop_on_error is set, and nothing gets rolled back.
Everything runs inside workbook sessions. The file tool opens, creates or attaches to a workbook and hands back a workbook_session_id for the other tools. Since 2.6.0 you can keep working in a workbook that is already open in Excel: file_read discover finds it and attach connects to it, and the server no longer asks for exclusive access. Closing with save left false throws away unsaved edits, and there is no undo. Excel stays hidden unless show is set.
Two details from the code rather than the README. Opening a workbook switches its VBA macros off, and the enable-macros action turns them back on only when called with approved and allow_reopen both true, on a saved local workbook with no other workbooks open alongside it (ExcelFileTool.cs). Open also hands paths and URLs to Excel as given and lets Excel decide what it can open, even though the security policy still lists its own format and size checks. Release builds report usage telemetry to Azure unless EXCELMCP_TELEMETRY_MODE says otherwise.
| Runtime | Node.js 18+ |
|---|---|
| Runs on | Windows |
| Microsoft Excel | Paid planDesktop Excel 2016 or later (Microsoft 365, Professional Plus or standalone). Python in Excel needs a Microsoft 365 licence with that feature on. |
| Also |
|
The npm package brings its own runtime, so no .NET install is needed, but npm must keep optional dependencies enabled: the matching Windows x64 or ARM64 package comes that way and a missing one is an error. MSOLAP for DAX queries comes with Power BI Desktop. VBA access is switched on in Excel's Trust Center.
Windows only; its makers say it is not meant for Linux, macOS or server-side batch work. Workbooks already open in Excel can be found with file_read discover and attached, so they no longer need closing first. The security policy names a 1 GB file size cap, .xlsx and .xlsm for local files, and no network paths, though since 2.6.0 the open action leaves those decisions to Excel. Calls within a session run one at a time. Writes try to restore the calculation mode but can fail to do so without reporting an error. Only the latest release receives security fixes.
Suits people on a Windows PC with desktop Excel who want an MCP client to build or change real workbooks, including Power Query, the Data Model with DAX, PivotTables and VBA, which tools that edit .xlsx files directly cannot run. It does not suit Linux, macOS, headless servers or containers, nor anyone without an Excel licence. Most tools can overwrite or delete workbook content, so work on copies when a workbook matters. It is a community project, not published by Microsoft.
4 only read, 7 change things, 25 can delete or overwrite. A ? marks an optional parameter.
file deletesaction: enumfile_path?: stringworkbook_session_id?: stringsave?: booleanshow?: booleantimeout_seconds?: integeropen_workbook_id?: stringapproved?: booleanallow_remembered_trust?: booleanallow_reopen?: booleanfile_readaction: enumfile_path?: stringtimeout_seconds?: integerworkbook_session_id?: stringworkbook deletesworksheet deletesworksheet_readworksheet_style changesrange deletesrange_edit deletesrange_format changesrange_link deletestable deletestable_column deletesnamedrange deletesconditionalformat deletescalculation_mode changesanalysis deletespowerquery deletespowerquery_trace_readquerytable deletesconnection deletesdatamodel deletesdatamodel_relationship deletespivottable deletespivottable_field deletespivottable_calc deletesslicer deleteschart deleteschart_config changesdrawing deletesxmlmap deletesvba deletespythoninexcel changessettings changeswindow changesscreenshotbatch deletesaction: enumcommands: arrayworkbook_session_id?: stringstop_on_error?: boolean