MCP-ExcelAutoCpp
A MCP server for automatically create, view and modify Excel related file using LLM
Documentation
C++ Excel Automation MCP Server
This is a C++ based Excel Automation MCP (Model Context Protocol) server project. It utilizes the OpenXLSX library for Excel file operations and aims to provide an intelligent set of Excel manipulation tools through the MCP protocol, leveraging LLM capabilities.
Table of Contents
Features
- Simple and Easy-to-Use MCP Interface: Provides standardized MCP tools, making it convenient for clients (like AI assistants) to invoke Excel automation functions.
- Single-File Deployment: Compiles into a single executable file for easy deployment and execution.
- Customizable Multi-language Support: Easily add or modify interface languages via JSON files.
Server Capabilities
This MCP server provides the following tools, which can be invoked by an LLM to interact with xlsx spreadsheet files:
- `open_excel_and_list_sheets`:
- `get_sheet_range_content`:
- `set_sheet_range_content`:
- `create_xlsx_file_by_absolute_path`: (Note: The tool name is defined as this in the code, but the key in JSON is `create_xlsx`)
*(Note: The automatic open/close behavior mentioned in the tool descriptions is an internal implementation detail and does not require user attention.)*
Building the Project
This project uses CMake for building. Installing Ninja is recommended for faster compilation speeds.
Build Steps:
1. Prepare Environment:
2. Compile:
# Change to the project directory (if not already in the root)
# cd MCP-ExcelAutoCpp
# Generate build files (Ninja recommended)
cmake -G "Ninja" -S . -B build
# Perform compilation
cmake --build buildThe compiled executable is typically located in the `bin/` directory.
Usage
After successful compilation, find the executable named `ExcelAutoCpp` (Linux/macOS) or `ExcelAutoCpp.exe` (Windows) in the `./bin/` directory.
Start the Server
Simply run the executable to start the MCP server.
# Example (adjust path as needed)
./bin/ExcelAutoCppWhen you see output similar to the following, the server has started successfully and is listening on `localhost:8888`:
ββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββ
v0.0.2 By smileFAace
I(17:35:48) i18n: Successfully loaded language string for language code 'en'
I(17:35:48) i18n: Set current language to 'en'
W(17:35:48) lang.json not found at 'E:\prj\MCP-ExcelAutoCpp\bin\lang.json'. Using default language.
I(17:35:48) i18n: Set current language to 'en'
I(17:35:48) Current language set to: en
I(17:35:48) Starting MCP server at localhost:8888
I(17:35:48) Press Ctrl+C to stop the serverConnecting and Using:
This server adheres to the MCP protocol. You can use any MCP-compatible client (such as Roo, cline, claude, cherry studio, etc.) to connect to the server's SSE endpoint (default: `http://localhost:8888/sse`) to invoke the provided Excel automation tools.
For example, to configure this MCP server in cline, simply add the following content to the mcp configuration JSON file provided by the plugin after the server is running successfully, and then refresh:
{
"mcpServers": {
"excel-auto-cpp": {
"url": "http://localhost:8888/sse"
}
}
}Changing and Customizing Server Language:
The server defaults to English (`en`) for its interface language. You can change the language by creating a custom language file:
1. Locate the directory containing the server executable (usually `bin/`).
2. Create a text file named `lang.json` in that directory.
3. Copy the complete key-value pairs for your desired language into this `lang.json` file.
4. Save the `lang.json` file and restart the server.
Download
You can download the latest release from the Releases page.
πStar History
Frequently asked questions
What is MCP-ExcelAutoCpp?
MCP-ExcelAutoCpp is A MCP server for automatically create, view and modify Excel related file using LLM
How do I install MCP-ExcelAutoCpp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is MCP-ExcelAutoCpp open source?
Yes β it is hosted on GitHub at https://github.com/smilefaace/mcp-excelautocpp and has 70 stars.
Related MCP tools
MCP server and CLI tool for searching and downloading documents from Anna's Archive Go-based implementation. Trusted by 500+ developers.
Go server implementing Model Context Protocol (MCP) for filesystem operations. Trusted by 500+ developers. Trusted by 500+ developers.
This MCP server integrates with your Google Drive and Google Sheets, to enable creating and modifying spreadsheets. Python-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP