MCP Server for Excel — Claude Code MCP server: install and use
Connects AI assistants to Microsoft Excel via the COM API to manage workbooks, formulas, and queries. Useful when you need real recalculations and Power Query refreshes.
claude mcp add mcp-server-excel -- npx -y @sbroenne/mcp-server-excelWhat MCP Server for Excel does
This server connects directly to the desktop Excel application using the native COM API instead of treating workbooks as static XML files. It preserves formatting, formulas, and existing macros while giving agents access to 63 MCP tools with 424 operations across 33 capability areas.
You can trigger Power Query refreshes, calculate DAX measures, run =PY() Python blocks, or generate PivotTables and charts. The workbook updates visually on screen. You can review edits immediately.
Without Windows and an interactive desktop session, the server will not function. It requires Excel 2016 or newer and does not support macOS, Linux, or headless batch environments. You must close target workbooks before executing operations because the automation needs exclusive file access.
What it helps with
- refresh Power Query connections and load datasets into the Data Model
- generate PivotTables and link them to dynamic charts and slicers
- calculate optimal target values using the Goal Seek feature
- execute VBA procedures and evaluate Python formulas directly in Excel
Example prompts for the agent
- Import products.csv using Power Query and load the table to the Data Model
- Create a PivotTable showing total revenue per region and add a column chart
- Run Goal Seek to determine what unit price produces 100000 in profit
How to install MCP Server for Excel
Platform CLI
claude mcp add mcp-server-excel -- npx -y @sbroenne/mcp-server-excelPlatform CLI
codex mcp add mcp-server-for-excel -- npx -y @sbroenne/mcp-server-excelConfig file
{
"mcpServers": {
"mcp-server-for-excel": {
"command": "npx",
"args": [
"-y",
"@sbroenne/mcp-server-excel"
]
}
}
}Config file
{
"servers": {
"mcp-server-for-excel": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sbroenne/mcp-server-excel"
]
}
}
}Platform CLI
gemini mcp add mcp-server-for-excel npx -y @sbroenne/mcp-server-excelStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MCP Server for Excel
How do I install MCP Server for Excel in Claude Code?
Run this command in your terminal: claude mcp add mcp-server-excel -- npx -y @sbroenne/mcp-server-excel.
How is this different from typical spreadsheet parser packages?
It automates the official Microsoft Excel desktop binary over COM. This allows native formula recalculation, macro runs, and live Data Model evaluation instead of raw file edits.
Can I run this MCP server on macOS or headless Linux servers?
No. It depends strictly on Windows and requires an interactive desktop session with Microsoft Excel 2016 or newer installed.