Sponsored by Deepsite.site

Excel Power Pivot Mcp

Created By
back1plya month ago
A Model Context Protocol (MCP) server that enables AI assistants to interact with Excel Power Pivot data models. Create and manage DAX measures, relationships, and more through natural language.
Content

Excel Power Pivot MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with Excel Power Pivot data models. Create and manage DAX measures, relationships, and more through natural language.

Features

  • Workbook Discovery & Connection - Discover and connect to open Excel workbooks with Power Pivot data models
  • DAX Query Execution - Run DAX queries and preview table data
  • Measure Management - Create, update, and delete DAX measures with auto-formatting
  • Relationship Management - Create, delete, and activate/deactivate table relationships
  • Model Exploration - List tables, columns, measures, relationships, hierarchies, KPIs, and dependencies
  • Data Profiling - Analyze column statistics (min, max, distinct count, nulls, sample values)
  • Power Query Discovery - List Power Queries (M code) in the workbook
  • Table Management - Add Excel tables to the data model, refresh tables/model

WARNING

Use at your own risk. This tool modifies your Excel Power Pivot data models directly. The author is not responsible for any data loss, corruption, or damage to your workbooks. Always maintain backups of your Excel files before using this tool.

Requirements

  • Windows 10/11 (required for Excel COM interop)
  • Microsoft Excel 2013+ with Power Pivot enabled

Installation

Download the latest ExcelPowerPivotMcp.exe from the Releases page.

No installation required - just download and configure your MCP client.

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "excel-powerpivot": {
      "command": "C:/path/to/ExcelPowerPivotMcp.exe"
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "excel-powerpivot": {
      "command": "C:/path/to/ExcelPowerPivotMcp.exe"
    }
  }
}

Antigravity (VS Code)

Add to your .vscode/mcp.json:

{
  "servers": {
    "excel-powerpivot": {
      "type": "stdio",
      "command": "C:/path/to/ExcelPowerPivotMcp.exe"
    }
  }
}

Usage

1. Open Excel with Power Pivot

Open your Excel workbook that contains a Power Pivot data model.

2. Connect via MCP

The AI assistant will first discover and connect to your workbook:

AI: Let me discover your Excel workbooks...
→ discover_workbooks()
→ Found: MyModel.xlsx (hasDataModel: true)

AI: Connecting to your workbook...
→ connect_workbook(workbook_name: "MyModel.xlsx")
→ Connected!

3. Explore and Modify

AI: Let me see what's in your data model...
→ get_model_summary()
→ 5 tables, 12 measures, 6 relationships

AI: I'll create a new measure for you...
→ create_measure(
    tableName: "Sales",
    measureName: "Total Revenue",
    expression: "SUM(Sales[Amount])"
  )

AI: Don't forget to save!
→ save_workbook()

Available Tools

Connection

ToolDescription
discover_workbooksFind open Excel workbooks with Power Pivot models
connect_workbookConnect to a specific workbook
get_connection_statusCheck current connection status
save_workbookSave the connected workbook
refresh_modelRefresh the entire data model

Model Metadata

ToolDescription
get_model_summaryComprehensive model overview
list_tablesList all tables with row counts
list_columnsList columns in a table
list_measuresList measures with expressions
list_relationshipsShow table relationships
list_hierarchiesList user-defined hierarchies
list_kpisList Key Performance Indicators
get_dependenciesShow calculation dependencies
list_power_queriesList Power Queries (M code)
list_excel_tablesList Excel tables (ListObjects)

DAX Queries

ToolDescription
run_daxExecute DAX queries or preview table data
analyze_columnGet column statistics and sample values

Measure CRUD

ToolDescription
create_measureCreate a new DAX measure (supports autoFormat=false for speed)
update_measureUpdate expression/name/description
delete_measureDelete a measure

Relationship CRUD

ToolDescription
create_relationshipCreate a table relationship
delete_relationshipDelete a relationship
set_relationship_activeActivate/deactivate a relationship

Table Operations

ToolDescription
add_table_to_model[DESTRUCTIVE] Add Excel table to data model
delete_table[DESTRUCTIVE] Delete a table from the model
refresh_tableRefresh a single table

Prompts

PromptDescription
describe_modelDescribe the data model in plain English
workflow_create_measureGuided workflow to create a measure
workflow_analyze_modelAnalyze model structure and suggest improvements
workflow_test_daxTest DAX before creating permanent measures
workflow_fix_measureDebug and fix a broken measure
workflow_add_relationshipGuided workflow to add a relationship
recover_connectionRecover from a lost Excel connection

Resources

URIDescription
model://schemaCurrent Power Pivot data model schema (JSON)
model://dirty-stateCheck for unsaved changes
model://logsRecent server diagnostic logs
model://instructionsGuidelines for working with Power Pivot
model://best-practicesMeasure best practices guide
model://dax-guideDAX query guide for Excel
model://workflowsCommon workflow reference

Performance Tips

Fast Measure Creation

Use autoFormat: false to skip DAX formatting for faster measure creation (~1.5s savings):

{
  "tableName": "Sales",
  "measureName": "Quick Measure",
  "expression": "SUM(Sales[Amount])",
  "autoFormat": false
}

Limitations

Excel Power Pivot Limitations

These features are not available in Excel Power Pivot (unlike Power BI):

FeatureExcel Power Pivot
Calculation Groups❌ Not supported
Perspectives❌ Not supported
Row-Level Security (RLS)❌ Not supported
DEFINE COLUMN in DAX queries❌ Not supported

MCP Server Limitations

These exist in Excel but cannot be managed via this MCP due to COM API restrictions:

FeatureStatus
Create/Update/Delete Calculated Columns❌ Use Power Pivot window
Set Column Descriptions❌ Use Power Pivot window

Troubleshooting

ErrorSolution
"Excel is not running"Open Excel with your workbook
"Workbook not found"Ensure the workbook is open in Excel
"No data model"Create a Power Pivot data model first
"Not connected"Call connect_workbook first

License

MIT License - see LICENSE file.

Contributing

Contributions welcome! Please open an issue or pull request.

Acknowledgments

Server Config

{
  "mcpServers": {
    "excel-powerpivot": {
      "command": "C:/path/to/ExcelPowerPivotMcp.exe"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.