Product 27 Sep 2026 · 5 min read

Excel MCP Server: Connect AI to Your Spreadsheets

A model can read, write and chart a workbook through MCP. Which server you want depends on where the file lives and what does the calculating — three different things answer to the same name.

MR mcprush team · The people who run the gateway

An Excel MCP server gives a model tools for a workbook: list the sheets, read a range, write values and formulas, add a chart or a table. Connected to Claude, Cursor or VS Code, it lets the model answer from the file, not from what you pasted.

Behind the name are three routes, the same three Microsoft weighs up for automating Office: edit the file format, go through Microsoft Graph, or drive the desktop application. The route decides whether a formula gets a value, whether a pivot table is real and whether a macro can run.

Three routes to one workbook. The tool lists look alike; what decides is who calculates the formula the model just wrote.Three routes to one workbook. The tool lists look alike; what decides is who calculates the formula the model just wrote.
Three routes to one workbook. The tool lists look alike; what decides is who calculates the formula the model just wrote.

What each route can actually do

A typical file-based server — the openpyxl one on PyPI as excel-mcp-server — has 25 tools covering sheets, data, formatting, formulas, charts, tables and pivot tables. The list reads much the same on every route; what it delivers does not.

CapabilityEdits the fileMicrosoft 365 (Graph)Desktop Excel
Cells, charts, tablesYesYesYes
FormulasWritten, not calculated, unless the server has an engineCalculated by Excel in the cloudCalculated by Excel
Pivot tablesUsually a summary table, not a PivotTableRefresh existing ones; no createReal PivotTables
Macros (VBA)Never run; an .xlsm can be broken by a saveNot among the documented objectsCan run, once allowed in the Trust Center
NeedsAny OS, no ExcelWork or school account; file in OneDrive for Business or SharePointWindows, Excel 2016 or later, a signed-in desktop
Only the first row agrees; every other one is a reason to choose.

File-based Excel MCP servers: no Excel required

File-based servers open the .xlsx with a library — openpyxl in Python, a Rust engine in some newer ones — edit the XML and save. No Excel is needed, so it runs anywhere, CI included, and Microsoft calls editing the file format the supported way for a service to change an Office file.

The catch is calculation: openpyxl “never evaluates formula”. Ask for a margin column and the server writes =C2/B2 with no value beside it, so pandas and previewers read empty cells until something that can calculate has opened and saved it. Agent Spreadsheet and LogiSheets carry engines of their own; KitchenSink4XL labels every value calculated, cached or missing.

A formula written by a library that cannot calculate. The value appears once something that can calculate has opened and saved it.A formula written by a library that cannot calculate. The value appears once something that can calculate has opened and saved it.
A formula written by a library that cannot calculate. The value appears once something that can calculate has opened and saved it.

Other openpyxl limits:

  • Macros. An .xlsm saved without keep_vba=True will not open in Excel, and the excel-mcp-server code does not pass that flag.
  • Shapes. openpyxl drops them from an existing file it saves.
  • Formulas. A workbook opened with data_only=True and then saved has every formula replaced by its last value, for good.
  • Pivot tables. openpyxl cannot create them, so a “create pivot table” tool does the sums in Python and writes an ordinary table.

Microsoft 365: the Graph Excel API

For a workbook in OneDrive for Business or SharePoint, Microsoft Graph works on the file in Excel’s own servers — the one route with real calculation and no desktop. Microsoft documents it for work and school files (“only the files stored in business platform are supported”) and for .xlsx, not .xls.

Ms 365 by Softeria maps each tool to one Graph endpoint, 23 of them for Excel: worksheets, ranges, formatting, charts and tables. Graph saves any change made outside a session straight to the file, and none of the 23 opens one, so every write lands at once.

# work or school account; the file tools find a workbook in your OneDrive npx -y @softeria/ms-365-mcp-server --org-mode --preset excel,files --read-only # which Graph permissions that asks for npx -y @softeria/ms-365-mcp-server --org-mode --preset excel,files --read-only --list-permissions
The Excel tools address a workbook by drive and item ID, and the excel preset has nothing that finds one. A workbook in a SharePoint library also needs the site tools, search-sharepoint-sites and list-sharepoint-site-drives. Drop --read-only for writes.

Looking for Microsoft’s own? Its Agent 365 catalogue has Word and SharePoint servers, and no Excel one; its servers for SQL Server, Azure and Entra ID are in MCP servers for the Microsoft stack.

Desktop Excel on Windows: the whole application

The third route drives the Excel installed on a Windows PC through COM, so recalculation, Power Query, real PivotTables and VBA all work. MCP Server for Excel packs 326 operations into 31 tools. It needs Windows, Excel 2016 or later, an interactive desktop and exclusive access, so close your workbooks first.

Two things a tool list calls a pivot table. Only the left one notices when its source changes.Two things a tool list calls a pivot table. Only the left one notices when its source changes.
Two things a tool list calls a pivot table. Only the left one notices when its source changes.

Microsoft does not support automating Office from unattended software — a dialog box can hang it, and Office takes one request at a time — so this route is for someone at a desk, not for a server or a CI job.

Installing an Excel MCP server in Claude, Cursor and VS Code

Each installs like any local server: the client runs a command. In Claude Code it goes after --, and the entry lands in local scope unless you add -s user or -s project.

claude mcp add xlsx-audit -- npx -y xlsx-audit-mcp claude mcp add xl -s user -- uvx kitchensink4xl claude mcp add ms365 -- npx -y @softeria/ms-365-mcp-server --org-mode --enabled-tools "excel|^(list-drives|search-onedrive-files|list-folder-files|search-sharepoint-sites|list-sharepoint-site-drives)$"
The lines each README prints, bar the tool filter: the files preset would also hand the model deleting and sharing across your OneDrive. /mcp shows which connected.
// Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json) { "mcpServers": { "excel-mcp": { "command": "npx", "args": ["-y", "@sbroenne/mcp-server-excel"] } } } // VS Code (.vscode/mcp.json): same entry, different key { "servers": { "excel-mcp": { "type": "stdio", "command": "npx", "args": ["-y", "@sbroenne/mcp-server-excel"] } } }
The desktop-Excel server in both shapes. Its .mcpb release installs it in Claude Desktop with a double-click.

Claude Desktop reads its config only at launch. Cursor and VS Code ask before running MCP tools; on macOS and Linux, VS Code can also sandbox a server’s file and network access, and then auto-approves its calls. On Windows, a client that answers spawn npx ENOENT needs the cmd /c wrapper from MCP on Windows. The rest is in where every client keeps its config.

Safety: copies, macros and what the cells say

Nothing in the protocol makes a write reversible. The general list is in what to check before you install anything.

  • Work on a copy. Anthropic gives that advice for its own Excel add-in. Some servers help: Sheetforge refuses to create over an existing file and makes verified snapshots; Excel Vision saves atomically.
  • Cells are input to the model. A workbook from outside can carry hidden instructions, so keep tool confirmations on.
  • VBA is its own decision. Office on Windows blocks macros in files from the internet by default, and MCP Server for Excel’s VBA tools need “Trust access to the VBA project object model” switched on by hand.
  • Scope the Microsoft 365 token. --read-only and a preset shrink the tools; --allowed-scopes "Files.Read" also hides every tool that needs more, which matters because one read tool asks for Files.ReadWrite.
  • Know where the file goes. xlsx-for-ai installs from npm and processes workbooks on its own API. And excel-mcp-server on PyPI and on npm are unrelated projects.

Prompts to start with

  • “What feeds the Total on Summary, and what breaks if I change the growth rate?” A formula auditor.
  • “Add margin, =C2/B2, for every row, then tell me which cells have no calculated value.” On a file server with no engine: all of them.
  • “Create a PivotTable of revenue by region.” A real one only on desktop Excel.
  • “Copy budget.xlsx, then set the discount rate to 8% in the copy.”

The servers worth installing

All live in our catalogue; more are a search for excel away.

When it does not work

SymptomCauseFix
Formula cells read back empty in pandas or a previewWritten by a file-based server, never calculatedAn engine, a recalculation in Excel or LibreOffice, or Graph
The “pivot table” never refreshesIt is a summary the server computedBuild the PivotTable in desktop Excel
Excel will not open the .xlsmSaved by openpyxl without keep_vbaRestore the copy; keep macro files on the desktop route
Graph cannot open the workbookA personal OneDrive, or an .xls fileSave it as .xlsx in OneDrive for Business or SharePoint
“Workbook is locked” or “Cannot open file” on desktop ExcelThe workbook is already open in Excel; COM needs exclusive accessClose every Excel window, then retry at a signed-in desktop
“Programmatic access to Visual Basic Project is not trusted”VBA project access is off in the Trust CenterTurn on “Trust access to the VBA project object model”
A copy turns the third row from a loss into a shrug.

Pick the route before the server — where the workbook lives and what calculates it — and copy the file before the first write.