# ExcelMcp - Model Context Protocol Server for Excel
<!-- mcp-name: io.github.sbroenne/mcp-server-excel -->
mcp-name: io.github.sbroenne/mcp-server-excel
[](https://www.nuget.org/packages/Sbroenne.ExcelMcp.McpServer)
[](https://www.nuget.org/packages/Sbroenne.ExcelMcp.McpServer)
[](https://github.com/sbroenne/mcp-server-excel)
**Control Excel with Natural Language** through AI assistants like GitHub Copilot, Claude, and ChatGPT. This MCP server enables AI-powered Excel automation for Power Query, DAX measures, VBA macros, PivotTables, Charts, and more.
โก๏ธ **[Learn more and see examples](https://sbroenne.github.io/mcp-server-excel/)**
**๐ก๏ธ 100% Safe - Uses Excel's Native COM API**
Unlike third-party libraries that manipulate `.xlsx` files (risking corruption), ExcelMcp uses **Excel's official COM automation API**. This guarantees zero risk of file corruption while you work interactively with live Excel files - see your changes happen in real-time.
**Optional CLI Tool:** For advanced users who prefer command-line scripting, ExcelMcp includes a CLI interface for RPA workflows, CI/CD pipelines, and batch automation. CLI has 15 command categories with 214 operations matching the MCP Server (23 tools with 214 operations).
**Requirements:** Windows OS + Excel 2016+
## ๐ Installation
**Quick Setup Options:**
1. **VS Code Extension** - [One-click install](https://marketplace.visualstudio.com/items?itemName=sbroenne.excel-mcp) for GitHub Copilot
2. **Manual Install** - Works with Claude Desktop, Cursor, Cline, Windsurf, and other MCP clients
3. **MCP Registry** - Find us at [registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/servers/io.github.sbroenne/mcp-server-excel)
**Manual Installation (All MCP Clients):**
Requires .NET 10 Runtime or SDK
```powershell
# Install MCP Server
dotnet tool install --global Sbroenne.ExcelMcp.McpServer
# Configure your AI assistant
# See examples/mcp-configs/ for ready-to-use configs
```
**Supported AI Assistants:**
- โ
GitHub Copilot (VS Code, Visual Studio)
- โ
Claude Desktop
- โ
Cursor
- โ
Cline (VS Code Extension)
- โ
Windsurf
- โ
Any MCP-compatible client
๐ **Detailed setup instructions:** [Installation Guide](https://github.com/sbroenne/mcp-server-excel/blob/main/docs/INSTALLATION.md)
๐ฏ **Quick config examples:** [examples/mcp-configs/](https://github.com/sbroenne/mcp-server-excel/tree/main/examples/mcp-configs)
## ๐ ๏ธ What You Can Do
**23 specialized tools with 214 operations:**
- ๐ **Power Query** (1 tool, 11 ops) - Atomic workflows, M code management, load destinations
- ๐ **Data Model/DAX** (2 tools, 18 ops) - Measures, relationships, model structure
- ๐จ **Excel Tables** (2 tools, 27 ops) - Lifecycle, filtering, sorting, structured references
- ๐ **PivotTables** (3 tools, 30 ops) - Creation, fields, aggregations, calculated members/fields
- ๐ **Charts** (2 tools, 26 ops) - Create, configure, series, formatting, data labels, trendlines
- ๐ **VBA** (1 tool, 6 ops) - Modules, execution, version control
- ๐ **Ranges** (4 tools, 42 ops) - Values, formulas, formatting, validation, protection
- ๐ **Worksheets** (2 tools, 16 ops) - Lifecycle, colors, visibility, cross-workbook moves
- ๐ **Connections** (1 tool, 9 ops) - OLEDB/ODBC management and refresh
- ๐ท๏ธ **Named Ranges** (1 tool, 6 ops) - Parameters and configuration
- ๐ **Files** (1 tool, 6 ops) - Session management and workbook creation
- ๐งฎ **Calculation Mode** (1 tool, 3 ops) - Get/set calculation mode and trigger recalculation
- ๏ฟฝ๏ธ **Slicers** (1 tool, 8 ops) - Interactive filtering for PivotTables and Tables
- ๐จ **Conditional Formatting** (1 tool, 2 ops) - Rules and clearing
๐ **[Complete Feature Reference โ](../../FEATURES.md)** - Detailed documentation of all 214 operations
**AI-Powered Workflows:**
- ๐ฌ Natural language Excel commands through GitHub Copilot, Claude, or ChatGPT
- ๐ Optimize Power Query M code for performance and readability
- ๐ Build complex DAX measures with AI guidance
- ๐ Automate repetitive data transformations and formatting
- ๐ **Show Excel Mode** - Say "Show me Excel while you work" to watch changes live
---
## ๐ก Example Use Cases
**"Create a sales tracker with Date, Product, Quantity, Unit Price, and Total columns"**
โ AI creates the workbook, adds headers, enters sample data, and builds formulas
**"Create a PivotTable from this data showing total sales by Product, then add a chart"**
โ AI creates PivotTable, configures fields, and adds a linked visualization
**"Import products.csv with Power Query, load to Data Model, create a Total Revenue measure"**
โ AI imports data, adds to Power Pivot, and creates DAX measures for analysis
**"Create a slicer for the Region field so I can filter interactively"**
โ AI adds slicers connected to PivotTables or Tables for point-and-click filtering
**"Put this data in A1: Name, Age / Alice, 30 / Bob, 25"**
โ AI writes data directly to cells using natural delimiters you provide
---
## ๐ Additional Resources
- **[GitHub Repository](https://github.com/sbroenne/mcp-server-excel)** - Source code, issues, discussions
- **[Installation Guide](https://github.com/sbroenne/mcp-server-excel/blob/main/docs/INSTALLATION.md)** - Detailed setup for all platforms
- **[VS Code Extension](https://marketplace.visualstudio.com/items?itemName=sbroenne.excel-mcp)** - One-click installation
- **[CLI Documentation](https://github.com/sbroenne/mcp-server-excel/blob/main/src/ExcelMcp.CLI/README.md)** - Comprehensive commands for RPA and CI/CD automation
**License:** MIT
**Privacy:** [PRIVACY.md](https://github.com/sbroenne/mcp-server-excel/blob/main/PRIVACY.md)
**Platform:** Windows only (requires Excel 2016+)
**Support:** [GitHub Issues](https://github.com/sbroenne/mcp-server-excel/issues)