excel-mcp-rw
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Excel MCP Server (excel-mcp-rw)
High-Performance Read & Write Model Context Protocol (MCP) Server for Microsoft Excel on Windows.
Powered by Pandas, OpenPyXL, and Native Windows Microsoft Excel Automation (COM / PyWin32).
⚡ Why This Server?
Most Excel MCP servers are lightweight JavaScript wrappers that fail on real-world spreadsheets:
❌ They crash or exceed LLM context windows on large multi-megabyte files.
❌ They cannot calculate dynamic Excel formulas (
=XLOOKUP,=FILTER(), dynamic arrays, complex nesting).❌ They cannot refresh PivotTables or external database connections.
❌ They cannot run VBA macros (
.xlsm) or export pixel-perfect PDFs.
excel-mcp-rw solves this with a Dual-Engine Architecture:
Engine 1: Fast Python Data Science Stack (
pandas+openpyxl)Instant metadata streaming without loading multi-GB spreadsheets into RAM.
Vectorized filtering (
df.query()) and column statistics at compiled C-speed.Bounded pagination so the model never blows its context window.
Engine 2: Native Microsoft Excel Engine (COM Automation via
pywin32)Uses real Windows Microsoft Excel to execute
Application.CalculateFull().Refreshes PivotTables and data connections (
wb.RefreshAll()).Native print-engine PDF export.
Runs VBA macros and inspects active workbooks open on the desktop.
Related MCP server: BachStudio Excel MCP Server
🛠️ Available Tools
📊 Data Analysis & Manipulation (pandas / openpyxl)
Tool | Description |
| Read sheet names, dimensions, column header preview, and file size in MB in read-only streaming mode. |
| Preview first $N$ rows (default 10) with column data types and shape. |
| Filter rows with vectorized Pandas expressions (e.g. |
| Windowed slice read (e.g. rows 100 to 200) without loading the entire spreadsheet. |
| Comprehensive column statistics: min, max, mean, median, std, sum (numeric) or top 10 value frequencies (categorical). |
| Fast pattern and keyword search across all rows and columns with row number coordinates. |
| Create formatted |
| Add a brand new sheet tab to an existing workbook without touching other sheets (with optional data and headers). |
| Rename an existing sheet tab. |
| Delete a specific worksheet tab from an existing workbook. |
| In-place row append without rewriting the workbook. |
| Surgical updates to specific cells or formulas (e.g. |
| Export large sheets to clean CSV format. |
🔄 Multi-Key Reconciliation & Discrepancy Matching (pandas + RapidFuzz)
Tool | Description |
| Pre-flight Diagnostic: Evaluates key compatibility, nulls, duplicates, data type mismatches, exact match %, and fuzzy match potential across workbooks before any merge. |
| Reconciliation Engine: Matches on composite keys (2–3+ columns), calculates numerical/text variances on compared columns, applies fuzzy matching on unmatched keys, and outputs a clean 3-tab audit workbook ( |
🪟 Native Windows Microsoft Excel Tools (COM / PyWin32)
Tool | Description |
| Opens workbook in native Microsoft Excel, executes |
| Generates a pixel-perfect PDF using Microsoft Excel's internal print engine. |
| Refreshes all external data connections and PivotTables ( |
| Runs any VBA macro inside |
| Detects if Excel is open on your desktop and returns the active workbook, active sheet, and selected range. |
📋 Best-Practice Agent Workflow for Reconciliations
When asking your AI assistant to compare or reconcile two workbooks (e.g. Purchase Orders vs SAP/ERP records):
Step 1: Pre-Flight Analysis
The agent callsanalyze_reconciliation_keys(file_1, file_2, join_keys=['PO_Number', 'SAP_Code'])to diagnose key overlap, formatting quirks, and duplicate keys.Step 2: Diagnosis & Strategy Alignment
The agent reports match percentage and any recommendations (e.g. "5 rows have whitespace differences; 2 rows need fuzzy matching").Step 3: Execute & Generate 3-Tab Audit Workbook
The agent runsreconcile_and_mergeto produce:1_Reconciled_Matches: Exact matches + calculated price/qty differences.2_Probable_Fuzzy_Matches: Near matches flagged for human review with confidence %.3_Unmatched_Exceptions: Records missing in either file.
🚀 Quickstart & Installation
1. Clone & Install Dependencies
git clone https://github.com/indala/excel-mcp-rw.git
cd excel-mcp-rw
pip install -r requirements.txt⚙️ Client Configurations
1. Claude Desktop
Add this to your %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"excel": {
"command": "python",
"args": [
"C:/path/to/excel-mcp-rw/src/excel_mcp/server.py"
]
}
}
}2. Claude Code CLI
Add globally to your user scope:
claude mcp add -s user excel -- python C:/path/to/excel-mcp-rw/src/excel_mcp/server.py3. Google Antigravity
Add to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"excel": {
"command": "python",
"args": [
"C:/path/to/excel-mcp-rw/src/excel_mcp/server.py"
]
}
}
}4. Cursor / Windsurf
Add a new STDIO server in your MCP settings:
Name:
excelType:
command(orstdio)Command:
python C:/path/to/excel-mcp-rw/src/excel_mcp/server.py
📝 Example Prompts
Once connected to your assistant, you can ask:
"Give me an overview of all sheets in
C:/reports/financials_q3.xlsxwithout loading the whole file.""Filter the
Transactionssheet forAmount > 10000 and Status == 'Pending', and give me the top 20 rows.""What is the statistical distribution of the 'Salary' column in our employee database?"
"Search for customer ID 'CUST-8492' across all sheets and tell me which row it appears on."
"Recalculate all formulas in this sheet using native Excel and export it to PDF."
"What Excel spreadsheet do I currently have open on my desktop?"
📄 License
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Parse Excel workbooks, evaluate formulas, trace dependencies and edit workbook models.
Convert XLSX spreadsheets to and from XLS, CSV, PDF, JPG, HTML and ODS.
Automate production-ready PDF, Word, Excel and PowerPoint documents from templates and JSON data
Convert XLS spreadsheets to modern document, image and spreadsheet formats.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides Excel file manipulation capabilities without requiring Microsoft Excel installation, enabling workbook creation, data manipulation, formatting, and advanced Excel features.10MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables creation, reading, and manipulation of Excel workbooks without Microsoft Excel installed, supporting formulas, formatting, charts, pivot tables, and data validation through multiple transport protocols.MIT
- AlicenseNot gradedqualityDmaintenanceEnables reading and writing of values, formulas, and formatting in Microsoft Excel files including .xlsx and .xlsm formats. It supports sheet management, table creation, and provides Windows-exclusive features like live editing and screen capture.4,853 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables real Excel desktop automation to recalculate formulas, read computed cell values, and export true-fidelity PDFs, complementing library-based workflows.MIT