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 NuGet CLI Installs

πŸ€” What is This?

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

VS Code / GitHub Copilot

Install Extension

Claude Desktop

One-Click Install

Cursor, Windsurf, etc.

Installation Guide

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.

πŸ§ͺ LLM-Tested Quality

Tool behavior validated with real LLM workflows using pytest-aitest. We test that LLMs correctly understand and use our tools.

See all 23 tools and 214 operations β†’

What Can You Do With It?

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

πŸ“ Create & Populate Data

You: "Create a new Excel file with a table for tracking sales - include Date, Product, Quantity, Unit Price, and Total with sample data and formulas."

AI creates the workbook, adds headers, enters sample data, and builds formulas automatically.

πŸ“Š PivotTables & Charts

You: "Create a PivotTable showing total sales by Product, then add a bar chart to visualize the results."

AI creates the PivotTable with proper field configuration and adds a linked chart.

πŸ”„ Power Query & Data Model

You: "Use Power Query to import products.csv, load it to the Data Model, and create measures for Total Revenue and Average Rating."

AI imports the data, adds it to Power Pivot, and creates DAX measures ready for analysis.

πŸŽ›οΈ Interactive Filtering

You: "Create a slicer for the Region field so I can filter the PivotTable interactively."

AI adds a slicer connected to your PivotTable for point-and-click filtering.

🎨 Formatting & Tables

You: "Format the Price column as currency, highlight values over $500 in green, and convert this to an Excel Table."

AI applies number formats, conditional formatting, and structured table styling.

CLI vs MCP Server

This package provides both CLI and MCP Server interfaces. Choose based on your use case:

Interface Best For Why
CLI (excelcli) Coding agents (Copilot, Cursor, Windsurf) 64% fewer tokens - single tool, no large schemas. Better for cost-sensitive, high-throughput automation.
MCP Server Conversational AI (Claude Desktop, VS Code Chat) Rich tool discovery, persistent connection. Better for interactive, exploratory workflows.

Manual Installation:

# Unified package - includes both MCP Server and CLI
dotnet tool install --global Sbroenne.ExcelMcp.McpServer

# Install skill (prompts to select excel-cli, excel-mcp, or both)
npx skills add sbroenne/mcp-server-excel

πŸ’‘ Skills provide AI guidance - The CLI skill is highly recommended (agents don’t work perfectly with CLI without it). The MCP skill adds workflow best practices and reduces token usage.

βš™οΈ How It Works - Unified Service Architecture

ExcelMcp uses Windows COM automation to control the actual Excel application (not just .xlsx files).

Both the MCP Server and CLI communicate with a shared ExcelMCP Service that manages Excel sessions:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Server        β”‚     β”‚   CLI (excelcli)    β”‚
β”‚  (AI assistants)    β”‚     β”‚  (coding agents)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚                           β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚   ExcelMCP Service      β”‚
          β”‚  (shared session mgmt)  β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚   Excel COM API         β”‚
          β”‚  (Excel.Application)    β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Benefits:

πŸ’‘ Tip: Watch Excel While AI Works By default, Excel runs hidden for faster automation. To see changes in real-time, just ask:

The AI will display the Excel window so you can watch every operation happen live!

Documentation

πŸ“– Complete Feature Reference β€” All 23 tools and 214 operations

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

πŸ“– MCP Server Documentation β€” Complete MCP tool reference and examples

πŸ“– CLI Documentation β€” Full CLI command reference and examples

πŸ€– Agent Skills β€” Cross-platform AI guidance for 43+ agents (auto-installed by VS Code extension)

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

More Information

Other projects by the author:

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