sbroenne/mcp-server-excel

MCP server and CLI that let AI agents drive the real Microsoft Excel app on Windows via COM: Power Query, DAX, VBA, PivotTables, charts and more.

  • 809 GitHub stars
  • C#
  • ⚖️ MIT
  • 🎯 Intermediate
sbroenne/mcp-server-excel preview image

What it is

ExcelMcp (Excel MCP Server) lets GitHub Copilot, Claude, ChatGPT and other agents control Excel through natural-language requests, using either MCP or a token-efficient CLI (excelcli). Unlike file-parser tools, it drives the actual Excel application through its official COM API. The README states 60 MCP tools across 31 feature areas with 393 operations, which differs from the catalog description's figure of 326.

Who it's for

  • Windows users who want an AI assistant to automate desktop Excel through natural-language requests
  • VS Code or Claude Desktop users who want Excel available as an MCP tool
  • Developers of coding agents and scripts who want a compact CLI for Excel automation

Requirements

Requirements

  • Windows
  • Microsoft Excel 2016 or later
  • An interactive desktop
  • Open Excel workbooks closed before starting, since ExcelMcp needs exclusive access while automating them

Setup

  1. VS Code

    Install the extension from the VS Code Marketplace (sbroenne.excel-mcp): https://marketplace.visualstudio.com/items?itemName=sbroenne.excel-mcp

  2. Claude Desktop or another MCP client

    Follow the MCP Server installation guide: https://excelmcpserver.dev/installation-mcp-server/

  3. Coding agents and scripts

    Follow the CLI installation guide: https://excelmcpserver.dev/installation-cli/

  4. Close open workbooks

    Close any open Excel workbooks before starting; ExcelMcp needs exclusive access while automating them.

Examples

Power Query import to Data Model

Prompt
prompt
Import products.csv with Power Query and load it to the Data Model.

Expected output: Uses the Power Query and Data Model automation described in the README.

PivotTable and chart

Prompt
prompt
Create a PivotTable showing revenue by region, then add a column chart.

Expected output: Combines the PivotTable and chart features in a single request.

Goal Seek

Prompt
prompt
Use Goal Seek to find the price that produces $100,000 profit.

Expected output: Runs Excel's Goal Seek, listed under the automation and advanced features.

Watch Excel live

Prompt
prompt
Show me Excel while you work.

Expected output: Excel does the work, so you can inspect results live and keep editing the workbook.

Pros & cons

Pros

  • Pro:Drives the real Excel application through its COM API, so it can refresh Power Query, recalculate formulas, evaluate DAX and run VBA
  • Pro:Preserves PivotTables, charts, macros, the Data Model and workbook formatting
  • Pro:Offers both an MCP Server (tool discovery, persistent sessions) and a CLI with substantially lower token usage
  • Pro:You can watch results live in Excel and keep editing the workbook

Cons

  • Con:Windows only; not intended for Linux or macOS
  • Con:Requires Microsoft Excel 2016 or later and an interactive desktop; not for server-side batch processing
  • Con:Needs exclusive access to workbooks, so open ones must be closed first

Images