Excel MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Excel MCP Server Create a new Excel workbook named 'budget.xlsx' and add 'Expense' to A1 and 'Amount' to B1."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Excel MCP Server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to perform Excel file operations without requiring Microsoft Excel installation.
Why This Server?
Feature | Excel MCP Server | Alternatives |
No Excel Required | ✅ Pure Python (openpyxl) | ❌ Requires MS Office |
Cross-Platform | ✅ Windows, Mac, Linux | ⚠️ Limited |
Type Safety | ✅ Full Pydantic validation | ❌ No validation |
Formatting Support | ✅ Fonts, colors, borders | ⚠️ Basic only |
Formula Support | ✅ Full Excel formulas | ⚠️ Limited |
MCP Protocol | ✅ Native support | ❌ Custom protocols |
Remote Deploy | ✅ Smithery ready | ❌ Local only |
Related MCP server: Excel MCP Server
Features
📊 Workbook Management: Create, open, save Excel workbooks
📄 Sheet Operations: Create, delete, rename, copy worksheets
📝 Cell Operations: Read and write individual cells or ranges
🔢 Formula Support: Write and evaluate Excel formulas
🎨 Rich Formatting: Fonts, colors, borders, alignment, number formats
✅ Type-safe operations with Pydantic validation
✅ Well-tested with 17 tests
Installation
🚀 Smithery (Recommended)
Deploy globally and share with anyone - no installation required!
{
"mcpServers": {
"excel": {
"url": "https://server.smithery.ai/@mort-lab/excel-mcp/mcp"
}
}
}💻 Local Installation
# Using uvx (recommended)
uvx excel-mcp-server
# Using pip
pip install excel-mcp-server
# From source
git clone https://github.com/mort-lab/excel-mcp
cd excel-mcp
uv syncQuick Start
Add to your Claude Desktop config:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"excel": {
"command": "uvx",
"args": ["excel-mcp-server"]
}
}
}Restart Claude Desktop and start using Excel operations!
Example Usage
"Create a new Excel workbook called sales_report.xlsx"
"Write 'Product' to cell A1 in Sheet1"
"Format the header row with bold text and blue background"
"Add a formula in D2 that multiplies B2 and C2"
"Read the data from range A1:D10"Connect with the Author
Let's connect on LinkedIn!
I'm Martin Irurozki, a fullstack developer passionate about AI automation, building intelligent tools, and creating real-world solutions that make a difference. If you:
🚀 Want to discuss MCP servers, AI integrations, and automation
💡 Have ideas for new features or real-world use cases
🤝 Are interested in collaboration opportunities
🛠️ Build tools and solutions with AI
🌟 Just want to connect and network with fellow developers
I'd love to hear about your projects and how this Excel MCP server is helping you build amazing things!
Available Tools
The server provides 20 MCP tools across 4 categories:
Workbook Operations (3 tools)
create_workbook(file_path)- Create a new Excel workbookget_workbook_info(file_path)- Get workbook metadatalist_sheets(file_path)- List all worksheet names
Sheet Operations (4 tools)
create_sheet(workbook_path, sheet_name, index?)- Create a new worksheetdelete_sheet(workbook_path, sheet_name)- Delete a worksheetrename_sheet(workbook_path, old_name, new_name)- Rename a worksheetcopy_sheet(workbook_path, source_sheet, new_name)- Copy a worksheet
Cell Operations (5 tools)
write_cell(workbook_path, sheet_name, cell, value)- Write to a cellread_cell(workbook_path, sheet_name, cell)- Read from a cellwrite_range(workbook_path, sheet_name, start_cell, data)- Write data to a rangeread_range(workbook_path, sheet_name, range_ref)- Read data from a rangewrite_formula(workbook_path, sheet_name, cell, formula)- Write a formula
Formatting Operations (8 tools)
format_font(...)- Apply font formatting (bold, italic, color, size)format_fill(...)- Apply background colorformat_border(...)- Apply cell bordersformat_alignment(...)- Apply text alignmentformat_number(...)- Apply number formatting
Real-World Use Cases
📊 Automated Reporting
Generate monthly sales reports automatically with formatted data, calculations, and professional styling ready to share with stakeholders.
📈 Data Analysis
Import and transform data, apply statistical functions (SUM, AVERAGE, STDEV), create summary tables, and export results.
🎨 Invoice Generation
Create professional invoices with custom formatting, company branding, automatic calculations, and formula-driven totals.
📋 Inventory Management
Track stock levels with real-time updates, conditional formatting for alerts, and automated reorder calculations.
📑 Data Migration
Read from old Excel files, clean and transform data, apply new formatting standards, and export to new structure.
Examples
Example 1: Formatted Sales Report
Ask Claude:
Create a sales report in sales_2024.xlsx with:
1. Headers: Date, Product, Quantity, Price, Total
2. Format headers: Bold, white text, blue background (#4472C4)
3. Add 10 sample sales entries with realistic data
4. Total column formula: =C2*D2 (for each row)
5. Format prices as currency: $#,##0.00
6. Add borders around all cells (thin, black)
7. Center-align all headers
8. Sum total sales in the last row with bold formattingResult: Professional report with automatic calculations, fully formatted and ready to share.
Example 2: Multi-Sheet Workbook
Ask Claude:
Create quarterly_report.xlsx with 5 sheets:
- Sheets: Q1, Q2, Q3, Q4, Summary
- Each Q sheet has: Month, Revenue, Expenses, Profit
- Add 3 months of data per quarter
- Profit formula: =B2-C2
- Summary sheet with formulas that sum all quarters
- Format all currency values as $#,##0.00Result: Complex multi-sheet workbook with cross-sheet formulas and comprehensive business report.
Example 3: Data Migration
Ask Claude:
Read data from old_data.xlsx sheet 'Sales' range A1:E100,
then create new_data.xlsx with:
- Same data but sorted by date (column A)
- Add a new column F with 10% markup calculation (=E*1.1)
- Format dates as 'mm/dd/yyyy'
- Format currency columns as $#,##0.00
- Add bold headers with blue backgroundResult: Clean data migration enhanced with calculations and professional formatting.
Development
Setup
# Clone and install
git clone https://github.com/mort-lab/excel-mcp
cd excel-mcp
uv sync
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=excel_mcp_server
# Lint and format
uv run ruff check
uv run ruff formatProject Structure
excel-mcp-server/
├── src/excel_mcp_server/
│ ├── server.py # FastMCP server (local)
│ ├── server_smithery.py # Smithery-compatible server
│ ├── models.py # Pydantic validation models
│ ├── operations/ # Business logic
│ │ ├── workbook.py
│ │ ├── cell.py
│ │ ├── sheet.py
│ │ └── formatting.py
│ └── utils/
│ └── validators.py
├── tests/ # Test suite (17 tests)
└── pyproject.toml # Project configurationPerformance
Fast: Handles workbooks up to 10,000 rows efficiently
Memory: ~50MB for typical operations
Lightweight: No Excel installation required
Operation | Time | Notes |
Create workbook | ~50ms | Empty workbook |
Write 100 cells | ~200ms | Individual writes |
Write 100 cells (range) | ~50ms | Bulk operation |
Read 1000 cells | ~300ms | From existing file |
Apply formatting | ~100ms | Per range |
Limitations
❌ No chart/graph support (coming soon)
❌ No pivot tables (roadmap)
❌ No VBA macros (intentional - pure Python)
⚠️ File size limit: 100MB recommended
FAQ
Can I use this with Google Sheets? No, this server works exclusively with Excel (.xlsx) files.
Does it work offline? Yes! When installed locally, it works completely offline.
What Excel features are supported?
✅ Formulas (SUM, AVERAGE, IF, VLOOKUP, COUNT, etc.)
✅ Formatting (fonts, colors, borders, alignment, number formats)
✅ Multiple sheets and workbooks
✅ Cell ranges and bulk operations
✅ Formula references across sheets
❌ Charts and graphs (roadmap)
❌ Pivot tables (roadmap)
❌ Macros/VBA (not planned - security)
How large can my Excel files be? Recommended: Up to 100MB or ~50,000 rows for optimal performance.
Can I use this in production? Yes! The server is tested and stable. Consider using Smithery for deployment and scaling.
Troubleshooting
Import Errors
uv syncPermission Errors
# Check permissions
ls -la /path/to/directory
# Fix permissions (Unix/Mac)
chmod u+w /path/to/directoryFile Already Exists When creating a workbook, if the file already exists, the operation will fail. Delete the existing file or use a different filename.
Contributing
Contributions are welcome! Here's how:
Development Workflow:
Fork & clone the repository
Create feature branch:
git checkout -b feature/amazing-featureMake changes with tests
Run tests:
uv run pytestRun linting:
uv run ruff checkCommit:
git commit -m 'feat: Add amazing feature'Push & create Pull Request
Commit Convention: We use Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentationtest:Adding testsrefactor:Code refactoring
Roadmap
v0.2.0 (Next Release)
Chart and graph creation
Data validation rules
Conditional formatting
Image insertion
v0.3.0
Pivot table operations
Cell comments and notes
Protected sheets
Named ranges
v1.0.0
CSV import/export
PDF export
Template system
80%+ test coverage
Support
🐛 Bug reports: GitHub Issues
💬 Discussions: GitHub Discussions
📧 Email: m.irurozki@gmail.com
License
This project is licensed under the MIT License.
Acknowledgments
Built with FastMCP
Excel operations powered by openpyxl
Inspired by the Model Context Protocol
Deployed with Smithery
Made with ❤️ by Martin Irurozki
Empowering AI assistants to work with Excel files, one cell at a time.
Available Tools
17 toolscopy_sheetC
Copy a worksheet within the workbook.
Inputs: workbook_path (required), source_sheet (required), new_name (required). Returns: object
create_sheetC
Create a new worksheet in the workbook.
Inputs: workbook_path (required), sheet_name (required), index. Returns: object
create_workbookC
Create a new Excel workbook.
Inputs: file_path (required). Returns: object
delete_sheetB
Delete a worksheet from the workbook.
Inputs: workbook_path (required), sheet_name (required). Returns: object
format_alignmentB
Apply alignment formatting to a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required), horizontal, +3 more. Returns: object
format_borderC
Apply border formatting to a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required), style, +2 more. Returns: object
format_fillB
Apply background color to a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required), color (required), +1 more. Returns: object
format_fontB
Apply font formatting to a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required), font_name, +5 more. Returns: object
format_numberB
Apply number formatting to a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required), format_string (required). Returns: object
get_workbook_infoC
Get information about an Excel workbook (sheets, size, etc.).
Inputs: file_path (required). Returns: object
list_sheetsB
List all worksheet names in a workbook.
Inputs: file_path (required). Returns: object
read_cellB
Read a value from a specific cell.
Inputs: workbook_path (required), sheet_name (required), cell (required). Returns: object
read_rangeB
Read data from a range of cells.
Inputs: workbook_path (required), sheet_name (required), range_ref (required). Returns: object
rename_sheetC
Rename a worksheet.
Inputs: workbook_path (required), old_name (required), new_name (required). Returns: object
write_cellC
Write a value to a specific cell.
Inputs: workbook_path (required), sheet_name (required), cell (required), value (required). Returns: object
write_formulaB
Write a formula to a cell.
Inputs: workbook_path (required), sheet_name (required), cell (required), formula (required). Returns: object
write_rangeB
Write data to a range of cells.
Inputs: workbook_path (required), sheet_name (required), start_cell (required), data (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool has a clear and distinct purpose. There is no ambiguity between tools like copy_sheet and create_sheet, or between read_cell, read_range, and write_cell. Formatting tools are specialized per aspect (alignment, border, fill, font, number).
All tool names follow a consistent verb_noun pattern (e.g., create_sheet, read_cell, format_font). The naming scheme is predictable and easy to understand, with no mixing of conventions.
With 17 tools, the set is well-scoped for an Excel manipulation server. It covers sheet management, cell operations, formatting, and workbook metadata without being overly numerous or sparse.
The tool surface covers core Excel operations (create, read, write, format) and sheet management. However, it lacks some common operations like deleting ranges, inserting rows/columns, or merging cells, which could be useful for more complex workflows.
Maintenance
Related MCP Connectors
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
The Excel engine for AI agents: read, check and edit Excel models over MCP.
File tools for your AI chat: PDF tables to Excel, merge PDFs, images to PDF, fill PDF forms.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, and manipulate Excel files without requiring Microsoft Excel installation. Supports comprehensive spreadsheet operations including formulas, formatting, charts, pivot tables, and data validation.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, and modify Excel workbooks without requiring Microsoft Excel, supporting operations like formulas, charts, pivot tables, formatting, and data validation.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to create, read, and manipulate Excel workbooks without Microsoft Excel installed, supporting formulas, formatting, charts, pivot tables, and data validation operations.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to create, read, write, and manipulate Excel files (.xlsx, .xlsm) without requiring Microsoft Excel, including support for charts, pivot tables, data import/export, and professional formatting across Windows, macOS, and Linux.39 npm34MIT