
go excel mcp server
An excel mcp server implemented by Go based on mcp-go
Repository Info
About This Server
An excel mcp server implemented by Go based on mcp-go
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
go-excel-mcp-server# Go Excel MCP Server
A powerful MCP (Mark3labs Control Protocol) server that provides comprehensive Excel file manipulation capabilities using the excelize Go library.
Features
File Operations
- Create new Excel workbooks
- Read data from worksheets
- Write data to worksheets
- Get detailed workbook metadata
Worksheet Management
- Create new worksheets
- Delete existing worksheets
- Rename worksheets
Advanced Formatting
- Comprehensive cell formatting including:
- Font styles (bold, italic, underline)
- Text alignment and rotation
- Number formatting (currency, percentages, dates)
- Cell borders and colors
- Background patterns and fills
- Cell merging
- Cell protection/locking
- Conditional formatting support
Installation
- Ensure you have Go installed (version 1.16 or higher recommended)
- Clone the repository (if applicable)
- Install dependencies:
go mod tidy - Build the server:
go build
Usage
Starting the Server
Run the compiled binary to start the MCP server in stdio mode:
./excel-tools-server
How set up with cline
"mcpServers": {
"excel_go": {
"disabled": false,
"timeout": 60,
"command": "excel_mcp_go_server.exe",
"args": [],
"transportType": "stdio"
}
}
MCP Tools Available
1. Create Workbook
Creates a new Excel workbook at the specified path.
Parameters:
filepath(string, required): Path where to create the new Excel file
Example:
{"filepath": "output.xlsx"}
2. Write Data to Excel
Writes tabular data to a specified worksheet starting from a given cell.
Parameters:
filepath(string, required): Path to the Excel filesheet_name(string, required): Worksheet namedata(array, required): List of lists (sublists are rows)start_cell(string, optional): Starting cell (default: "A1")
Example:
{
"filepath": "output.xlsx",
"sheet_name": "Data",
"data": [["Name", "Age"], ["Alice", 25], ["Bob", 30]],
"start_cell": "B2"
}
3. Read Data from Excel
Reads all data from a specified worksheet.
Parameters:
filepath(string, required): Path to the Excel filesheet_name(string, required): Worksheet name to read
Example:
{"filepath": "output.xlsx", "sheet_name": "Data"}
4. Create Worksheet
Adds a new worksheet to an existing workbook.
Parameters:
filepath(string, required): Path to the Excel filesheet_name(string, required): Name for the new worksheet
Example:
{"filepath": "output.xlsx", "sheet_name": "NewSheet"}
5. Delete Worksheet
Removes a specified worksheet from a workbook.
Parameters:
filepath(string, required): Path to the Excel filesheet_name(string, required): Worksheet name to delete
Example:
{"filepath": "output.xlsx", "sheet_name": "OldSheet"}
6. Rename Worksheet
Changes the name of an existing worksheet.
Parameters:
filepath(string, required): Path to the Excel fileold_name(string, required): Current worksheet namenew_name(string, required): New worksheet name
Example:
{
"filepath": "output.xlsx",
"old_name": "Sheet1",
"new_name": "MainData"
}
7. Get Workbook Metadata
Retrieves metadata about a workbook including sheet list and ranges.
Parameters:
filepath(string, required): Path to the Excel fileinclude_ranges(boolean, optional): Whether to include range information
Example:
{"filepath": "output.xlsx", "include_ranges": true}
8. Format Range
Applies comprehensive formatting to a cell range.
Parameters:
filepath(string, required): Path to the Excel filesheet_name(string, required): Worksheet namestart_cell(string, required): Top-left cell of rangeend_cell(string, optional): Bottom-right cell (defaults to start_cell)- Comprehensive formatting options including:
- Font styles (bold, italic, underline)
- Text alignment (horizontal/vertical)
- Number formats
- Cell borders and colors
- Background patterns
- Cell merging
- Text wrapping
- Cell protection
Example:
{
"filepath": "output.xlsx",
"sheet_name": "Data",
"start_cell": "A1",
"end_cell": "D10",
"bold": true,
"font_size": 12,
"bg_color": "FFFF00",
"border_type": "thin",
"number_format": "$#,##0.00"
}
Error Handling
All tools return meaningful error messages in case of failures, including:
- File not found or inaccessible
- Invalid parameters
- Worksheet operations failures
- Formatting errors
Dependencies
- github.com/mark3labs/mcp-go - MCP protocol implementation
- github.com/xuri/excelize/v2 - Excel file manipulation library
License
Quick Start
Clone the repository
git clone https://github.com/ui-zhui-zhui/go-excel-mcp-serverInstall dependencies
cd go-excel-mcp-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.