## Get started with Excel MCP Server or CLI

ExcelMcp requires Windows and installed desktop Microsoft Excel. Choose the
setup instructions for your assistant or command-line workflow:

- [Set up Excel in GitHub Copilot for VS Code](installation-mcp-server.md#vs-code-extension-easiest-one-click-setup)
- [Connect Claude Desktop to Excel](guides/claude-desktop.md)
- [Install excelcli for coding agents and scripts](installation-cli.md)

!!! success "Powered by the real Excel engine"
    Excel MCP Server automates the **actual Excel application** through its
    official COM API — the same engine Excel itself uses. That unlocks what
    spreadsheets are really for:

    - **Runs live Excel operations.** Refresh Power Query to pull and reshape
      fresh data, recalculate with Excel's own engine, refresh PivotTables and
      the Data Model, evaluate DAX, and run VBA or Python `=PY()` — the real,
      *computed results* land right in your workbook.
    - **Excel opens and saves your workbook.** Excel opens and saves your
      workbook itself, rather than a file-parser library rewriting it. Requested
      edits can still change the workbook's data, formatting, or features.

    Other tools (openpyxl-based MCP servers and Agent Skills, including
    Anthropic's `xlsx` skill) read and rewrite the `.xlsx` file directly — which
    can quietly drop PivotTables, charts, and macros, and can't run Power Query,
    the Data Model, or DAX at all. Here, Excel does the work. Watch it live: just
    say *"Show me Excel while you work."*

<div class="mcp-video" markdown>
[![Watch the Excel MCP Server intro video](https://img.youtube.com/vi/wbw3-hPcE2o/maxresdefault.jpg){ width="1280" height="720" }](https://youtu.be/wbw3-hPcE2o)

▶️ [Watch the intro video (2 min)](https://youtu.be/wbw3-hPcE2o)
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "Excel MCP Server: Real Excel Automation for AI Agents",
  "description": "Learn what Excel MCP Server is, when to use it, and how AI agents automate Power Query, DAX, PivotTables, VBA, Python, and calculations through real Microsoft Excel.",
  "thumbnailUrl": "https://i.ytimg.com/vi/wbw3-hPcE2o/maxresdefault.jpg",
  "uploadDate": "2026-09-12T07:07:06-07:00",
  "duration": "PT2M1S",
  "contentUrl": "https://www.youtube.com/watch?v=wbw3-hPcE2o",
  "embedUrl": "https://www.youtube.com/embed/wbw3-hPcE2o",
  "publisher": {
    "@type": "Organization",
    "name": "Excel MCP Server",
    "url": "https://excelmcpserver.dev/"
  }
}
</script>

## See what AI can build

Each video shows real work by an AI agent in desktop Excel. Open one to watch
it and download the files the agent made.

<div class="grid cards video-cards" markdown>

-   [![AI-Built Excel Dashboards video: a World Bank dashboard built by an AI agent and run by Excel](https://img.youtube.com/vi/47HJPZbcta4/maxresdefault.jpg){ width="1280" height="720" loading="lazy" }](samples/world-in-motion.md)

    __[AI-built Excel dashboards](samples/world-in-motion.md)__ · 2:33

    GPT-6 Astra builds interactive World Bank dashboards with connected data
    through Excel MCP Server.

-   [![Agentic workflow video: one request turned into an Excel analysis and a PowerPoint briefing in 39 minutes](assets/images/world-bank-briefing-poster.jpg){ width="1280" height="720" loading="lazy" }](samples/world-bank-briefing.md)

    __[Agentic workflow: from one request to Excel and PowerPoint](samples/world-bank-briefing.md)__ · 2:41

    One agent researches World Bank data, builds a checked Excel analysis, then
    a 7-slide executive briefing with PowerPoint MCP Server.

</div>

!!! tip "Also building PowerPoint decks?"
    Check out [PowerPoint MCP Server](https://powerpointmcpserver.dev/) — the
    sister project, built the same way.

!!! tip "Also automating Windows apps and browsers?"
    Check out [Windows MCP Server](https://windowsmcpserver.dev/) — automate
    Windows apps and browsers from your AI assistant.

## Key features

<div class="grid cards" markdown>

-   :material-transit-connection-variant:{ .lg .middle } __Power Query &amp; M code__

    ---

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

    [Refresh Power Query with an AI assistant :material-arrow-right:](guides/refresh-power-query.md)

-   :material-calculator-variant:{ .lg .middle } __Power Pivot &amp; DAX__

    ---

    Build Data Models, create DAX measures and manage table relationships
    through Excel's supported automation.

    [Query the Excel Data Model with DAX :material-arrow-right:](guides/query-data-model-with-dax.md)

-   :material-chart-box:{ .lg .middle } __PivotTables &amp; charts__

    ---

    Create PivotTables from ranges, tables or the Data Model. Build charts and
    PivotCharts with supported formatting controls.

    [Automate Excel PivotTables :material-arrow-right:](guides/automate-pivottables.md)

-   :material-table:{ .lg .middle } __Tables &amp; ranges__

    ---

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

    [Read, write, and format Excel ranges :material-arrow-right:](reference/range.md)

-   :material-code-braces:{ .lg .middle } __VBA macros__

    ---

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

    [Run Excel VBA macros with an AI agent :material-arrow-right:](guides/run-vba-macros.md)

-   :material-file-table-box-multiple:{ .lg .middle } __Worksheets &amp; connections__

    ---

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

    [Manage Excel worksheets :material-arrow-right:](reference/worksheet.md)

-   :material-eye-outline:{ .lg .middle } __Agent mode__

    ---

    Watch AI work in Excel in real time — side-by-side view, live status-bar
    feedback and smart window arrangement, like a pair programmer in a
    spreadsheet.

    [Watch an AI agent work in Excel :material-arrow-right:](reference/agent-mode.md)

-   :fontawesome-brands-python:{ .lg .middle } __Python in Excel__

    ---

    Write and run `=PY()` formulas that execute in Excel's cloud Python engine —
    process worksheet data with pandas, NumPy and more, from your AI assistant.

    [Python in Excel requirements and limits :material-arrow-right:](features/automation-advanced.md#python-in-excel)

-   :material-test-tube:{ .lg .middle } __Agent workflow checks__

    ---

    Selected MCP and CLI workflows are checked with real agents and independent
    workbook inspection. Skill-value comparisons measure whether guidance helps;
    they do not guarantee every agent can use every operation.

</div>

[Explore capabilities across 60 MCP tools and 388 operations :material-arrow-right:](features.md){ .md-button .md-button--primary }

## Popular guides

- [Refresh Power Query from an AI assistant](guides/refresh-power-query.md)
- [Build and update PivotTables with an AI assistant](guides/automate-pivottables.md)
- [Query the Excel Data Model with DAX](guides/query-data-model-with-dax.md)
- [Run VBA macros from an AI agent](guides/run-vba-macros.md)
- [Real Excel automation vs. file-parser libraries](guides/excel-automation-vs-file-parsers.md)

## See it in action

Ask your AI assistant in plain language — it drives Excel for you:

<figure markdown="span">
  ![A styled sales table, regional summary and column chart in the real Excel app, built by Excel MCP Server](assets/images/excel-demo-table-chart.png){ width="1360" height="800" loading=lazy }
  <figcaption>A styled Excel Table, a regional revenue summary and a column chart — created end-to-end in the real Excel application. No manual clicking, no rewriting the <code>.xlsx</code> file.</figcaption>
</figure>

!!! example "📝 Create &amp; 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."

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

!!! example "📊 PivotTables &amp; charts"
    **You:** "Create a PivotTable showing total sales by Product, then add a bar
    chart to visualize the results."

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

!!! example "🔄 Power Query &amp; 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."

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

!!! example "🎨 Formatting &amp; tables"
    **You:** "Format the Price column as currency, highlight values over $500 in
    green, and convert this to an Excel Table."

    The AI applies number formats, conditional styling, auto-fit and structured
    table styling.

And because Excel MCP Server works with the real Excel application, modern
features like **Python in Excel** work too — your AI assistant can write
`=PY()` formulas that run pandas and NumPy directly on your worksheet data:

<figure markdown="span">
  ![Close-up of the Excel ribbon Python group and the formula bar showing a =PY() formula that uses pandas to sum a table column](assets/images/excel-demo-python.png){ width="1360" height="392" loading=lazy }
  <figcaption>The formula bar with a <code>=PY()</code> formula (note the green <strong>PY</strong> badge) and Excel's <strong>Python</strong> ribbon group — summing the <code>SalesData</code> table with <code>pandas</code>, driven from your AI assistant.</figcaption>
</figure>

!!! info "Local Excel and your data"
    Excel runs on your Windows desktop. Requested workbook results are returned
    to your AI assistant, whose privacy policy applies. Release builds can send
    anonymous usage statistics, but those statistics exclude workbook contents,
    file names, and paths. Optional remote M/DAX formatting and Python in Excel
    use external services only when you request those features.
    [Read the privacy policy](privacy.md).

## CLI or MCP Server?

This package ships **both** a CLI and an MCP Server. They share the same core,
so every operation behaves identically — pick the entry point that fits your
workflow:

| 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 and a persistent connection. Better for interactive, exploratory workflows. |

[MCP Server docs](mcp-server.md){ .md-button } [CLI docs](cli.md){ .md-button }

## GitHub star history

![GitHub stars over time for ExcelMcp](https://excelmcpserver.dev/assets/images/star-history.svg){ width="900" height="480" loading=lazy }

Updated daily on the deployed site from exact aggregate snapshots; no stargazer
identities are stored.
