
ExcelMcp - MCP Server for Microsoft Excel
Automate Excel via AI - Power Query, DAX, VBA, PivotTables, charts through Excel's native COM API (Windows only).
Add to your client
Copy the config for your MCP client and paste it into its config file.
dotnet tool install --global Sbroenne.ExcelMcp.McpServerPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"excelmcp---mcp-server-for-microsoft-excel": {
"command": "mcp-excel",
"args": []
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Windows 10 or later (COM interop is Windows-specific)
- Microsoft Excel 2016 or later (Desktop) installed
- Desktop environment (controls a real Excel process; not for server-side use)
- Self-contained mcp-excel.exe needs no .NET runtime; NuGet dotnet tool install requires the .NET 10 runtime
- Optional: MSOLAP / Power BI Desktop for DAX query execution (evaluate, execute-dmv)
- Optional: Node.js for npx-based auto-configuration and skills
About ExcelMcp - MCP Server for Microsoft Excel
ExcelMcp is a Windows-only MCP server that automates Microsoft Excel through its native COM API. It enables conversational AI clients (Claude Desktop, VS Code Copilot Chat, Cursor, Windsurf, Cline) to create and manipulate workbooks, build Power Query and DAX models, generate PivotTables and charts, run VBA, and format ranges - all by controlling the actual Excel application rather than editing files directly. A companion CLI (excelcli) shares the same session-management service for scripting and coding-agent workflows.
Tools & capabilities (18)
filesSession management and workbook lifecycle: list sessions, open (returns session ID), close, close workbook, create empty .xlsx/.xlsm, test/verify a workbook (incl. IRM/AIP detection). 6 operations.
calculationGet/set calculation mode (automatic, manual, semi-automatic) and explicitly recalculate a workbook, sheet, or range. 3 operations.
power_queryAtomic Power Query and M-code workflows: list, view, create (import+load), update, rename, refresh, refresh all, load-to destination, get load config, unload, delete, and evaluate M code directly. 12 operations.
data_modelData Model / DAX (Power Pivot) management: tables, columns, measures (create/update/delete), model info, and DAX evaluate/DMV queries. Part of the 19 Data Model/DAX operations.
relationshipsCreate, read, update (toggle active/inactive), delete, and list Data Model table relationships, plus model refresh. Part of the 19 Data Model/DAX operations.
tablesExcel Tables (ListObjects) lifecycle, styling, totals row, append/get data, add to Data Model, DAX-backed tables, filtering, sorting, column management, structured references, and number formats. 27 operations across two tools.
pivottablePivotTables: create from range/table/Data Model, manage row/column/value/filter fields, aggregations, calculated fields and members, layout, subtotals, grand totals, get data, refresh, and lifecycle. 30 operations across three tools.
chartsCharts: create from range/PivotTable, manage series, chart type, legend, titles, axes, data labels, axis scale, gridlines, marker formatting, trendlines, placement, and lifecycle. 29 operations across two tools.
vbaVBA module management: create/list/read/update modules, execute macros, and export for version control. 6 operations.
rangeRange data and number-display formatting: get/set values and formulas, clear, copy, insert/delete cells/rows/columns, find/replace, sort, discovery utilities, and number display formats (dates, currency, percentages, text). Part of the 46 range operations across four tools.
range_formatRange visual styling, validation, protection, auto-fit, and size/layout changes (fonts, fills, borders, column widths). Part of the 46 range operations across four tools.
worksheetsWorksheet lifecycle: add, delete, rename, set tab colors, control visibility, and cross-workbook moves. 16 operations across two tools.
connectionsOLEDB/ODBC data connection management and refresh. 9 operations.
named_rangesNamed ranges as parameters and configuration: create, read, update, delete, list. 6 operations.
slicersInteractive slicers for filtering PivotTables and Tables. 8 operations.
conditional_formattingApply and clear conditional formatting rules. 2 operations.
screenshotCapture ranges or sheets as PNG for LLM visual verification. 2 operations.
windowWindow management: show/hide Excel, arrange, position, and status-bar progress feedback for agent mode. 9 operations.
When to use it
- Create and populate workbooks from natural-language prompts (tables, sample data, formula columns)
- Build PivotTables and charts for analysis and visualization from existing data
- Use Power Query to import CSVs, load to the Data Model, and author DAX measures and relationships
- Apply number formats, visual styling, and conditional formatting (e.g., highlight values over a threshold)
- Maintain Power Query / VBA / DAX code in Git by exporting M code and macros
- Watch the AI build dashboards live in a visible Excel window (agent mode)
Security notes
Windows-only; requires Microsoft Excel 2016+ installed. Drives the real Excel process via COM automation and needs exclusive access to workbooks, so all Excel files must be closed before use. The self-contained `mcp-excel.exe` (from GitHub releases) needs no .NET runtime; the NuGet `dotnet tool` install requires the .NET 10 runtime. IRM/AIP-protected files are detected and opened read-only with Excel made visible for credential authentication.
ExcelMcp - MCP Server for Microsoft Excel FAQ
Does this run on macOS or Linux?
No. ExcelMcp uses Windows COM interop to drive the real Excel application, so it requires Windows plus a desktop Microsoft Excel 2016 or later installation.
Will it corrupt my .xlsx files?
No. Instead of editing the file format directly, it controls Excel's official COM API (Excel.Application), so output matches Excel exactly and there is no third-party file-format risk.
How do I install it for Claude Desktop?
Download the excel-mcp-{version}.mcpb bundle from the latest GitHub release and double-click it (or drag it onto Claude Desktop), then restart. Alternatively, add an mcpServers entry pointing command to mcp-excel after installing the standalone exe or the NuGet dotnet tool.
What is the difference between the MCP Server and the CLI?
The MCP Server is best for conversational AI (Claude Desktop, VS Code Chat) with rich tool discovery; the CLI (excelcli) is a single token-efficient command (~64% fewer tokens) better suited to coding agents and scripting. Both share the same Excel session service.
Why must I close Excel files before using it?
ExcelMcp requires exclusive access to workbooks during automation due to Excel COM limitations, so open files must be closed first.
Alternatives to ExcelMcp - MCP Server for Microsoft Excel
Compare all alternatives →Self-hosted MCP server for Jira and Confluence Cloud and Server/Data Center.
Create, read, and modify Excel workbooks with your AI agent — no Microsoft Excel required.
Official Notion server to read, search, create, and update pages and databases in your workspace.
Compare ExcelMcp - MCP Server for Microsoft Excel with: