Excel MCP Server & CLI enables AI-powered Excel automation via COM API. Operations teams use it to automate Excel tasks, manage data connections, and generate reports. It integrates with Windows-based Excel workflows and connects to tools like Power Query, Power Pivot, and VBA.
git clone https://github.com/sbroenne/mcp-server-excel.gitExcelMcp is an MCP server that enables AI assistants like Claude and GitHub Copilot to automate Excel through conversational commands. It provides 25 specialized tools covering Power Query, DAX measures, VBA macros, PivotTables, Charts, Excel Tables, and data formatting—with 230 total operations. Unlike third-party libraries that manipulate .xlsx files directly, ExcelMcp uses Excel's official COM API, ensuring complete safety and compatibility. The server runs on Windows with Excel 2016 or later and supports real-time interactive development, allowing you to create queries, inspect results, and refine them instantly. It's designed for data analysts, developers, and business users who need to automate repetitive Excel workflows while maintaining code in version control.
[{"step":"Prepare your Excel file and environment. Ensure the file is accessible at [FILE_PATH] and that Excel is installed on a Windows machine with COM automation enabled. Close all other Excel instances to avoid conflicts.","tip":"Use absolute file paths (e.g., C:\\\\Reports\\\\data.xlsx) to avoid path resolution issues. Enable 'Trust access to the VBA project object model' in Excel's Trust Center settings."},{"step":"Define the automation task in the prompt. Specify the file path, sheet name, and the exact operation (e.g., refresh Power Query, run VBA macro, or update formulas). Use placeholders like [FILE_PATH] for dynamic inputs.","tip":"For complex tasks, break them into smaller steps (e.g., 'First refresh Power Query, then validate data, then save as a new file')."},{"step":"Execute the command using the MCP Excel Server. If using CLI, run: `mcp-excel --file [FILE_PATH] --operation [OPERATION] --output [OUTPUT_PATH]`. For AI tools, paste the prompt directly into the chat interface.","tip":"Add `--verbose` flag to the CLI command to get detailed logs for debugging. For example: `mcp-excel --file C:\\\\Reports\\\\data.xlsx --operation refresh_power_query --verbose`."},{"step":"Review the output and handle any errors. Check the generated report or validation sheet for issues. If errors occur, adjust the prompt or file and retry.","tip":"Use the `Validation_Errors` sheet (if generated) to identify and fix data issues. For VBA-related errors, check the macro code or permissions."},{"step":"Automate recurring tasks by scheduling the command. Use Windows Task Scheduler or a cron job to run the MCP Excel Server command at specified intervals (e.g., daily at 7 AM).","tip":"Test the automation manually first to ensure stability. Use `--dry-run` flag (if available) to simulate the operation without making changes."}]
Automate Power Query workflows and M code management for data import and transformation
Create and configure PivotTables, Charts, and Slicers through natural language commands
Build DAX measures and relationships in the Data Model for advanced analytics
Format ranges, apply conditional formatting, and create Excel Tables with styling
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/sbroenne/mcp-server-excelCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Automate the following Excel task using the MCP Excel Server: [DESCRIBE TASK, e.g., 'Update the Q3 sales report by pulling data from [FILE_PATH] and refreshing all Power Query connections']. Ensure the operation is performed in [FILE_PATH] with [SHEET_NAME] as the active sheet. If data validation is required, flag any errors in a new sheet named 'Validation_Errors'.
``` Excel Automation Report - Q3 Sales Update ========================================= Task: Updated Q3 sales report by refreshing Power Query connections and validating data. Files Processed: - Source: C:\Reports\Q3_Sales_Data.xlsx - Output: C:\Reports\Q3_Sales_Report_Final.xlsx Operations Performed: 1. Refreshed Power Query connections to pull latest data from SQL Server (Server: SQL_PROD, Database: SalesDB). 2. Validated 1,247 rows of sales data against business rules: - Price > 0: 1,247 passed (0 failed) - Quantity > 0: 1,247 passed (0 failed) - Date within Q3 2023: 1,247 passed (0 failed) 3. Generated validation summary in new sheet 'Validation_Errors' (empty - no issues found). 4. Saved file with timestamp: 2023-10-15 14:32:10. Next Steps: - Review the refreshed report in C:\Reports\Q3_Sales_Report_Final.xlsx - Share with stakeholders via [EMAIL_LIST] - Schedule automated refresh for next Monday at 8 AM. ```
Your one-stop shop for church and ministry supplies.
Automate your browser workflows effortlessly
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan