Excel MCP Server

Excel MCP Server Icon

Excel MCP Server

Automate Excel with AI via GitHub Copilot, Claude, and other MCP clients β€” including Power Query, DAX, VBA, PowerPivot, and Tables.

VS Code Marketplace Installs GitHub Stars GitHub Downloads NuGet MCP Server Installs

πŸ€” What is This?

Automate Excel with AI - A Model Context Protocol (MCP) server for comprehensive Excel automation through conversational AI.

One-click setup with GitHub Copilot integration

Install from Marketplace

MCP Server for Excel enables AI assistants (GitHub Copilot, Claude, ChatGPT) to automate Excel through natural language commands, including Power Query & M, PowerPivot & DAX, VBA macros, PivotTables, Charts, formatting & much more – no Excel programming knowledge required.

It works with any MCP-compatible AI assistant like GitHub Copilot, Claude Desktop, Cursor, Windsurf, etc.

πŸ›‘οΈ 100% Safe - Uses Excel’s Native COM API - Zero risk of file corruption. Unlike third-party libraries that manipulate .xlsx files directly, this project uses Excel’s official API ensuring complete safety and compatibility.

πŸ’‘ Interactive Development - Watch Excel update in real-time as AI works. Say β€œShow me Excel while you work” and see every change live - create a query, watch it populate, refine and repeat. Excel becomes your AI-powered workspace for rapid development and testing.

Key Features

Power Query & M Code

Create, edit, and optimize M code. Import from files, databases, APIs. Refresh queries and manage load destinations.

Power Pivot & DAX

Build Data Models, create DAX measures, manage table relationships. Full Power Pivot automation.

PivotTables & Charts

Create PivotTables from ranges, tables, or Data Model. Build charts and PivotCharts with full formatting control.

Tables & Ranges

Read/write data, formulas, formatting. Filter, sort, validate. Manage Excel Tables with structured references.

VBA Macros

View, import, update, and execute VBA code. Export modules for version control.

Worksheets & Connections

Manage sheets, named ranges, data connections. Copy/move sheets between workbooks.

See all 12 tools and 180 operations β†’

What Can You Do With It?

Ask your AI assistant to automate Excel tasks using natural language:

πŸ” Power Query & M Code

You: "This Power Query is taking 5 minutes to refresh. Can you optimize it?"

AI analyzes your M code, identifies inefficiencies, and applies best practices automatically.

πŸ“Š PivotTables & Data Model

You: "Create a PivotTable from the Data Model showing top 10 products by region with a DAX measure for profit margin"

AI creates the PivotTable, adds fields, and builds the DAX measure in seconds.

πŸ“ˆ Charts & Visualization

You: "Create a column chart from SalesData and add a trend line"

AI builds the chart with proper formatting and data series configuration.

πŸ–₯️ VBA Macros

You: "Write a VBA macro that exports all sheets to PDF"

AI creates, imports, and can execute VBA code directly in your workbook.

🎨 Tables & Formatting

You: "Convert this range to an Excel Table, format revenue as currency, and add conditional formatting for values over 10000"

AI applies structured tables, number formats, and conditional rules.

CLI Tool (Optional)

For scripting, RPA workflows, and CI/CD pipelines β€” automate Excel without AI:

dotnet tool install -g Sbroenne.ExcelMcp.CLI
# Refresh Power Query
excel-cli pq refresh sales.xlsx --query SalesData

# Export VBA for version control  
excel-cli vba export macro-workbook.xlsm --module Module1 --output src/vba/

# Read range values
excel-cli range get-values report.xlsx --sheet Sheet1 --range A1:D10

The CLI provides 172 operations across 13 command groups, sharing the same Core engine as the MCP Server.

Documentation

πŸ“– Complete Feature Reference β€” All 12 tools and 180 operations

πŸ“₯ Installation Guide β€” Setup for VS Code, Claude Desktop, other MCP clients, and CLI

πŸ“‹ Changelog β€” Release notes and version history

More Information

Other projects by the author:

Excel MCP Server β€” MIT License β€” Β© 2024-2025