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 Analyze the data in report.xlsx and create a pivot table"
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 powerful Model Context Protocol (MCP) server that enables AI assistants like Claude to work seamlessly with Excel files. Built with TypeScript, ExcelJS, and the official MCP SDK.
About
This MCP server provides 34 comprehensive tools for Excel file manipulation, allowing Claude Desktop and other MCP clients to read, write, format, analyze, and transform Excel spreadsheets programmatically. Whether you need to extract data, create reports, apply complex formatting, or generate pivot tables and charts, this server has you covered.
Perfect for:
π Automated data analysis and reporting
π Business intelligence workflows
π Data transformation and ETL processes
π Report generation from templates
π¨ Batch formatting and styling
Related MCP server: Excel MCP Server
Features
34 comprehensive tools for Excel manipulation
β¨ Real-time Live Editing - See changes instantly in Excel (macOS with Microsoft Excel)
Full support for reading, writing, formatting, and analyzing Excel files
NEW: Charts, Pivot Tables, Excel Tables, and Conditional Formatting
Built with the official MCP SDK
Type-safe with TypeScript and Zod validation
Preserves formatting when modifying files
Optional backup creation before modifications
Supports both JSON and Markdown response formats
Installation
π Quick Installation (Recommended) - One Click!
The easiest way to install this server is using the pre-built MCPB bundle:
Download the latest
excel-mcp-server.mcpbfile from the releases pageDouble-click the
.mcpbfile, or:Open Claude Desktop
Go to Settings β Extensions β Advanced Settings
Click "Install Extension..."
Select the downloaded
.mcpbfile
Restart Claude Desktop
Done! No Node.js installation, no config files to edit
Note: One-click installation works on Claude Desktop for macOS and Windows. All dependencies are bundled - no additional setup required!
For more details, see BUNDLE.md.
π οΈ Manual Installation (Advanced)
If you prefer to build from source:
Step 1: Clone and build the project
git clone https://github.com/sbraind/excel-mcp-server.git
cd excel-mcp-server
npm install
npm run buildStep 2: Configure Claude Desktop
Add this configuration to your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"excel": {
"command": "node",
"args": ["${__dirname}/dist/index.js"]
}
}
}Note: When using the MCPB bundle or manual installation, use ${__dirname} which automatically resolves to the server's directory. For manual installations without MCPB, you can also use absolute paths like /path/to/excel-mcp-server/dist/index.js.
Step 3: Restart Claude Desktop
Close and reopen Claude Desktop completely.
Step 4: Verify
The server should now be available in Claude. Try:
Create a new Excel file at ~/Documents/test.xlsx with a sheet called "Sales" containing sample dataFor detailed installation instructions and troubleshooting, see INSTALLATION.md.
Configuration Options
The server supports several configuration options that can be set through Claude Desktop's MCP configuration:
{
"mcpServers": {
"excel": {
"command": "node",
"args": ["${__dirname}/dist/index.js"],
"config": {
"createBackupByDefault": false,
"defaultResponseFormat": "json",
"allowedDirectories": []
}
}
}
}Available Options:
createBackupByDefault(boolean, default:false) Automatically create backup files (.backupextension) before modifying Excel files. When enabled, every destructive operation will create a backup unless explicitly disabled in the tool call.defaultResponseFormat(string:"json"or"markdown", default:"json") Default format for tool responses. Can be overridden per tool call with theresponseFormatparameter.allowedDirectories(array of strings, default:[]) List of directories where the server is allowed to read/write Excel files. When empty, all directories are accessible. Use this to restrict file access for security:"allowedDirectories": [ "~/Documents/Excel", "~/Projects/data" ]The server will reject any file operations outside these directories.
Input Validation
All tool inputs are validated using Zod schemas. Invalid parameters will return clear error messages indicating what's wrong:
Cell addresses must match format
A1,B2, etc.Ranges must match format
A1:D10File paths are checked against
allowedDirectoriesif configuredMissing required parameters are reported immediately
β¨ Real-Time Live Editing (macOS)
The Excel MCP Server features automatic real-time editing for Excel files that are already open in Microsoft Excel on macOS. When a file is open, changes are applied instantly and become visible immediatelyβno need to close and reopen the file!
How It Works
The server automatically detects when:
Microsoft Excel is running on your Mac
The target file is open in Excel
When both conditions are met, the server uses AppleScript to modify the open Excel file directly. Otherwise, it falls back to file-based editing using ExcelJS.
Supported Operations (16 Live-Editing Tools)
The following tools support real-time editing when files are open in Excel:
Writing:
excel_update_cell- Update cell values instantlyexcel_add_row- Add rows and see them appear immediatelyexcel_write_range- Write data ranges in real-timeexcel_set_formula- Set formulas that calculate instantly
Formatting:
excel_format_cell- Apply formatting (fonts, colors, borders) liveexcel_set_column_width- Adjust column widths instantlyexcel_set_row_height- Adjust row heights instantlyexcel_merge_cells- Merge cells in real-time
Sheet Management:
excel_create_sheet- Create new sheets that appear immediatelyexcel_delete_sheet- Delete sheets with instant feedbackexcel_rename_sheet- Rename sheets in real-time
Row/Column Operations:
excel_delete_rows- Delete rows and see them disappear instantlyexcel_delete_columns- Delete columns in real-timeexcel_insert_rows- Insert rows that appear immediatelyexcel_insert_columns- Insert columns instantly
Advanced:
excel_unmerge_cells- Unmerge cells in real-time
Response Indicators
Tool responses include a method field indicating which approach was used:
{
"success": true,
"message": "Cell A1 updated (via Excel)",
"method": "applescript",
"note": "Changes are visible immediately in Excel"
}vs.
{
"success": true,
"message": "Cell A1 updated",
"method": "exceljs",
"note": "File updated. Open in Excel to see changes."
}Requirements
Platform: macOS only (AppleScript is a macOS technology)
Application: Microsoft Excel for Mac must be installed
File State: Target Excel file must be open in Excel
Benefits
Instant Feedback: See changes as they happenβperfect for interactive workflows
No File Conflicts: Works directly with the open file without save/reload cycles
Seamless Experience: Automatically falls back to file-based editing when Excel isn't available
Note
Read-only operations (like excel_read_sheet, excel_read_range, etc.) don't require real-time editing as they don't modify files. Complex operations like pivot tables, charts, and conditional formatting use file-based editing for reliability.
Quick Start
Once installed, you can start using the server immediately in Claude Desktop. Here are some example prompts:
Create a new Excel file with sales data for Q1 2024Read the data from Sheet1 in ~/Documents/report.xlsxApply bold formatting and blue background to the header row in my sales spreadsheetCreate a pivot table showing total sales by product and monthGenerate a column chart from the data in range A1:B10For more examples and detailed use cases, see FEATURE_SUMMARY.md.
Available Tools
π Reading (5 tools)
1. excel_read_workbook
List all sheets and metadata of an Excel workbook.
Example:
{
"filePath": "./data.xlsx",
"responseFormat": "json"
}2. excel_read_sheet
Read complete data from a sheet with optional range.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "A1:D10",
"responseFormat": "markdown"
}3. excel_read_range
Read a specific range of cells.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "B2:E20",
"responseFormat": "json"
}4. excel_get_cell
Read value from a specific cell.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"cellAddress": "A1",
"responseFormat": "json"
}5. excel_get_formula
Read the formula from a specific cell.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"cellAddress": "D5",
"responseFormat": "json"
}βοΈ Writing (5 tools)
6. excel_write_workbook
Create a new Excel file with data.
Example:
{
"filePath": "./output.xlsx",
"sheetName": "MyData",
"data": [
["Name", "Age", "City"],
["Alice", 30, "New York"],
["Bob", 25, "Los Angeles"]
],
"createBackup": false
}7. excel_update_cell
Update value of a specific cell.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"cellAddress": "B2",
"value": 1500,
"createBackup": true
}8. excel_write_range
Write multiple cells simultaneously.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "A1:C2",
"data": [
["Header1", "Header2", "Header3"],
[100, 200, 300]
],
"createBackup": false
}9. excel_add_row
Add a row at the end of the sheet.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"data": ["Product X", 150, "2024-01-15"],
"createBackup": false
}10. excel_set_formula
Set or modify a formula in a cell.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"cellAddress": "D2",
"formula": "SUM(B2:C2)",
"createBackup": false
}π¨ Formatting (4 tools)
11. excel_format_cell
Change cell formatting (color, font, borders, alignment).
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"cellAddress": "A1",
"format": {
"font": {
"bold": true,
"size": 14,
"color": "FF0000"
},
"fill": {
"type": "pattern",
"pattern": "solid",
"fgColor": "FFFF00"
},
"alignment": {
"horizontal": "center",
"vertical": "middle"
}
},
"createBackup": false
}12. excel_set_column_width
Adjust width of a column.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"column": "A",
"width": 20,
"createBackup": false
}13. excel_set_row_height
Adjust height of a row.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"row": 1,
"height": 30,
"createBackup": false
}14. excel_merge_cells
Merge cells in a range.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "A1:D1",
"createBackup": false
}π Sheet Management (4 tools)
15. excel_create_sheet
Create a new sheet in the workbook.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "NewSheet",
"createBackup": false
}16. excel_delete_sheet
Delete a sheet from the workbook.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "OldSheet",
"createBackup": true
}17. excel_rename_sheet
Rename a sheet.
Example:
{
"filePath": "./data.xlsx",
"oldName": "Sheet1",
"newName": "Sales2024",
"createBackup": false
}18. excel_duplicate_sheet
Duplicate a complete sheet.
Example:
{
"filePath": "./data.xlsx",
"sourceSheetName": "Template",
"newSheetName": "January",
"createBackup": false
}π§ Operations (3 tools)
19. excel_delete_rows
Delete specific rows.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"startRow": 5,
"count": 3,
"createBackup": true
}20. excel_delete_columns
Delete specific columns.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"startColumn": "C",
"count": 2,
"createBackup": true
}21. excel_copy_range
Copy range to another location.
Example:
{
"filePath": "./data.xlsx",
"sourceSheetName": "Sales",
"sourceRange": "A1:D10",
"targetSheetName": "Backup",
"targetCell": "A1",
"createBackup": false
}π Analysis (2 tools)
22. excel_search_value
Search for a value in sheet/range.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"searchValue": "Apple",
"range": "A1:Z100",
"caseSensitive": false,
"responseFormat": "markdown"
}23. excel_filter_rows
Filter rows by condition.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"column": "B",
"condition": "greater_than",
"value": 1000,
"responseFormat": "json"
}π Charts (1 tool)
24. excel_create_chart
Create charts from data ranges.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"chartType": "column",
"dataRange": "A1:B10",
"position": "D2",
"title": "Monthly Sales",
"showLegend": true,
"createBackup": false
}Note: ExcelJS has limited native chart support. This creates a chart placeholder with metadata.
π Pivot Tables (1 tool)
25. excel_create_pivot_table
Create pivot tables for data analysis.
Example:
{
"filePath": "./data.xlsx",
"sourceSheetName": "Sales",
"sourceRange": "A1:D100",
"targetSheetName": "Pivot",
"targetCell": "A1",
"rows": ["Product"],
"columns": ["Month"],
"values": [
{ "field": "Amount", "aggregation": "sum" }
],
"createBackup": false
}π Excel Tables (1 tool)
26. excel_create_table
Convert ranges to formatted Excel tables.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Data",
"range": "A1:D50",
"tableName": "SalesTable",
"tableStyle": "TableStyleMedium2",
"showRowStripes": true,
"createBackup": false
}β Validation (3 tools)
27. excel_validate_formula_syntax
Validate formula syntax without applying it.
Example:
{
"formula": "SUM(A1:A10) / COUNT(B1:B10)"
}28. excel_validate_range
Validate if a range string is valid.
Example:
{
"range": "A1:Z100"
}29. excel_get_data_validation_info
Get data validation rules for a cell.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Input",
"cellAddress": "A1",
"responseFormat": "json"
}π§ Advanced Operations (4 tools)
30. excel_insert_rows
Insert rows at a specific position.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"startRow": 5,
"count": 3,
"createBackup": false
}31. excel_insert_columns
Insert columns at a specific position.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"startColumn": "C",
"count": 2,
"createBackup": false
}32. excel_unmerge_cells
Unmerge previously merged cells.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Report",
"range": "A1:D1",
"createBackup": false
}33. excel_get_merged_cells
List all merged cell ranges in a sheet.
Example:
{
"filePath": "./data.xlsx",
"sheetName": "Report",
"responseFormat": "markdown"
}π¨ Conditional Formatting (1 tool)
34. excel_apply_conditional_format
Apply conditional formatting to ranges.
Example (Cell Value):
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "B2:B100",
"ruleType": "cellValue",
"condition": {
"operator": "greaterThan",
"value": 1000
},
"style": {
"fill": {
"type": "pattern",
"pattern": "solid",
"fgColor": "FF00FF00"
},
"font": {
"bold": true
}
},
"createBackup": false
}Example (Color Scale):
{
"filePath": "./data.xlsx",
"sheetName": "Sales",
"range": "C2:C100",
"ruleType": "colorScale",
"colorScale": {
"minColor": "FFFF0000",
"maxColor": "FF00FF00"
},
"createBackup": false
}Development
Build
npm run buildWatch mode
npm run watchRun
npm startError Handling
All tools include robust error handling and will return descriptive error messages for:
File not found
Sheet not found
Invalid cell addresses or ranges
Invalid formatting options
Write errors
Features
Backup Support
Most write operations support an optional createBackup parameter. When set to true, a backup of the original file will be created with a .backup extension before modifications.
Response Formats
Read operations support both json and markdown response formats:
JSON: Structured data, ideal for programmatic processing
Markdown: Human-readable tables and formatted output
Data Preview
When reading large datasets, the markdown format automatically shows a preview of the first 100 rows.
Dependencies
@modelcontextprotocol/sdk- Official MCP SDKexceljs- Excel file manipulationzod- Schema validationtypescript- Type safety
Links & Resources
Repository: github.com/sbraind/excel-mcp-server
Issues & Bug Reports: GitHub Issues
Model Context Protocol: modelcontextprotocol.io
Claude Desktop: claude.ai
ExcelJS Documentation: github.com/exceljs/exceljs
License
MIT - See LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to Contribute
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Support
If you encounter any issues or have questions:
Check the Installation Guide for common setup issues
Review existing issues to see if your problem has been addressed
Open a new issue with detailed information about your problem
Built with β€οΈ using Claude Code
Available Tools
34 toolsexcel_add_rowADestructive
Add a row at the end of the sheet
Inputs: filePath (required), sheetName (required), data (required), createBackup.
excel_apply_conditional_formatCDestructive
Apply conditional formatting to a range
Inputs: filePath (required), sheetName (required), range (required), ruleType (required), +4 more.
excel_copy_rangeCDestructive
Copy range to another location
Inputs: filePath (required), sourceSheetName (required), sourceRange (required), targetSheetName (required), +2 more.
excel_create_chartBDestructive
Create a chart (line, bar, column, pie, scatter, area)
Inputs: filePath (required), sheetName (required), chartType (required), dataRange (required), +4 more.
excel_create_pivot_tableCDestructive
Create a pivot table for data analysis
Inputs: filePath (required), sourceSheetName (required), sourceRange (required), targetSheetName (required), +5 more.
excel_create_sheetBDestructive
Create a new sheet in the workbook
Inputs: filePath (required), sheetName (required), createBackup.
excel_create_tableBDestructive
Convert a range to an Excel table with formatting
Inputs: filePath (required), sheetName (required), range (required), tableName (required), +6 more.
excel_delete_columnsCDestructive
Delete specific columns
Inputs: filePath (required), sheetName (required), startColumn (required), count (required), +1 more.
excel_delete_rowsCDestructive
Delete specific rows
Inputs: filePath (required), sheetName (required), startRow (required), count (required), +1 more.
excel_delete_sheetCDestructive
Delete a sheet from the workbook
Inputs: filePath (required), sheetName (required), createBackup.
excel_duplicate_sheetCDestructive
Duplicate a complete sheet
Inputs: filePath (required), sourceSheetName (required), newSheetName (required), createBackup.
excel_filter_rowsCRead-only
Filter rows by condition
Inputs: filePath (required), sheetName (required), column (required), condition (required), +2 more.
excel_format_cellBDestructive
Change cell formatting (color, font, borders, alignment)
Inputs: filePath (required), sheetName (required), cellAddress (required), format (required), +1 more.
excel_get_cellARead-only
Read value from a specific cell
Inputs: filePath (required), sheetName (required), cellAddress (required), responseFormat.
excel_get_data_validation_infoARead-only
Get data validation rules for a cell
Inputs: filePath (required), sheetName (required), cellAddress (required), responseFormat.
excel_get_formulaBRead-only
Read the formula from a specific cell
Inputs: filePath (required), sheetName (required), cellAddress (required), responseFormat.
excel_get_merged_cellsARead-only
List all merged cell ranges in a sheet
Inputs: filePath (required), sheetName (required), responseFormat.
excel_insert_columnsCDestructive
Insert columns at a specific position
Inputs: filePath (required), sheetName (required), startColumn (required), count (required), +1 more.
excel_insert_rowsBDestructive
Insert rows at a specific position
Inputs: filePath (required), sheetName (required), startRow (required), count (required), +1 more.
excel_merge_cellsCDestructive
Merge cells in a range
Inputs: filePath (required), sheetName (required), range (required), createBackup.
excel_read_rangeBRead-only
Read a specific range of cells
Inputs: filePath (required), sheetName (required), range (required), responseFormat.
excel_read_sheetBRead-only
Read complete data from a sheet (with optional range)
Inputs: filePath (required), sheetName (required), range, responseFormat.
excel_read_workbookARead-only
List all sheets and metadata of an Excel workbook
Inputs: filePath (required), responseFormat.
excel_rename_sheetCDestructive
Rename a sheet
Inputs: filePath (required), oldName (required), newName (required), createBackup.
excel_search_valueCRead-only
Search for a value in sheet/range
Inputs: filePath (required), sheetName (required), searchValue (required), range, +2 more.
excel_set_column_widthCDestructive
Adjust width of a column
Inputs: filePath (required), sheetName (required), column (required), width (required), +1 more.
excel_set_formulaBDestructive
Set or modify a formula in a cell
Inputs: filePath (required), sheetName (required), cellAddress (required), formula (required), +1 more.
excel_set_row_heightCDestructive
Adjust height of a row
Inputs: filePath (required), sheetName (required), row (required), height (required), +1 more.
excel_unmerge_cellsADestructive
Unmerge previously merged cells
Inputs: filePath (required), sheetName (required), range (required), createBackup.
excel_update_cellBDestructive
Update value of a specific cell
Inputs: filePath (required), sheetName (required), cellAddress (required), value (required), +1 more.
excel_validate_formula_syntaxBRead-only
Validate Excel formula syntax without applying it
Inputs: formula (required).
excel_validate_rangeCRead-only
Validate if a range string is valid
Inputs: range (required).
excel_write_rangeCDestructive
Write multiple cells simultaneously
Inputs: filePath (required), sheetName (required), range (required), data (required), +1 more.
excel_write_workbookBDestructive
Create a new Excel file with data
Inputs: filePath (required), data (required), sheetName, createBackup.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 34 tools
Most tools target distinct operations (e.g., add_row vs delete_row), but a few overlaps exist: excel_read_range and excel_read_sheet both read data, with read_sheet supporting optional range. Still, descriptions help differentiate them well.
All tools use a consistent 'excel_' prefix followed by verb_noun pattern (e.g., create_chart, delete_sheet). Minor inconsistency in plural/singular (delete_columns vs delete_sheet) but overall pattern is clear.
34 tools is on the higher side but appropriate for the broad domain of Excel operations. Each tool covers a distinct action, and the count reflects the complexity of spreadsheet manipulation.
Comprehensive coverage of CRUD for sheets, rows, columns, cells, plus formatting, charts, pivot tables, and formulas. Missing features like freeze panes, sorting, or sheet reordering, but core workflows are well-supported.
Maintenance
Related MCP Connectors
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.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
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 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
- AlicenseBqualityDmaintenanceEnables AI assistants to perform Excel file operations (create, read, write, format) without requiring Microsoft Excel installation.175MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read and write local Excel and CSV files, supporting editing, styling, and image insertion.15MIT