A powerful Model Context Protocol (MCP) server that enables AI assistants like GitHub Copilot to read, write, and manipulate Excel files (.xlsx and .xls).
CELLPILOT MCP
A powerful Model Context Protocol (MCP) server that enables AI assistants like GitHub Copilot to read, write, and manipulate Excel files (.xlsx and .xls).
Built with C# and the NPOI library, this MCP server provides comprehensive Excel functionality through a set of intuitive tools.
Features
📁 File Operations
- GetExcelFileInfo - Get file metadata including sheet names, row counts, and column counts
- CopyExcelFile - Copy Excel files to new locations
- ListSheets - List all sheet names in a workbook
- CreateWorkbook - Create new Excel workbooks (.xlsx or .xls)
📖 Reading Data
- ReadCell - Read a specific cell's value
- ReadRange - Read a range of cells as a 2D array
- GetSheetData - Get all data from a sheet
- GetCellFormula - Retrieve formulas from cells
🔍 Searching
- SearchInSheet - Search for values within a sheet
- SearchInWorkbook - Search across all sheets in a workbook
- SearchInColumn - Search within a specific column
- SearchWithRegex - Search using regular expressions
- SearchNumericRange - Find cells with numbers in a range
- SearchDateRange - Find cells with dates in a range
✍️ Writing Data
- WriteCell - Write a value to a cell
- WriteRange - Write a 2D array of data
- SetCellFormula - Set formulas in cells
- ClearRange - Clear content from a range of cells
📊 Sheet Management
- CreateSheet - Create new sheets
- RenameSheet - Rename existing sheets
- DeleteSheet - Remove sheets from workbooks
- CopySheet - Duplicate sheets within a workbook
🔧 Cell & Row/Column Manipulation
- InsertRow / DeleteRow - Add or remove rows
- InsertColumn / DeleteColumn - Add or remove columns
- MergeCells / UnmergeCells - Merge or unmerge cell ranges
- ListMergedRegions - List all merged regions in a sheet
- AutoSizeColumn - Auto-fit column width to content
- SetColumnWidth - Set specific column widths
Supported Platforms
The MCP server is built as a self-contained application and does not require the .NET runtime to be installed. Supported platforms:
win-x64/win-arm64osx-arm64linux-x64/linux-arm64/linux-musl-x64
Installation
From NuGet.org
Configure the MCP server in your IDE using the dnx command:
VS Code - Create .vscode/mcp.json:
{
"servers": {
"CellPilotMCP": {
"type": "stdio",
"command": "dnx",
"args": [
"CellPilotMCP",
"--version",
"0.0.1",
"--yes"
]
}
}
}
Visual Studio - Create .mcp.json in solution directory with the same structure.
From Source (Local Development)
{
"servers": {
"CellPilotMCP": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"<PATH TO PROJECT DIRECTORY>"
]
}
}
}
Usage Examples
Once configured, you can ask your AI assistant to perform Excel operations:
- "Read all data from Sheet1 in my-file.xlsx"
- "Create a new Excel file with columns for Name, Email, and Phone"
- "Search for all cells containing 'Total' in the workbook"
- "Write a SUM formula in cell C10 that adds C1:C9"
- "Merge cells A1 through D1 for a header row"
- "Auto-size all columns in Sheet1"
More Information
This MCP server uses the ModelContextProtocol C# SDK.
MCP Resources:
IDE Configuration:
License
MIT