ExcelForge
ExcelForge is an Excel automation MCP server that provides programmatic control over Excel files through configurable profiles and bundles.
Workbook Operations: Open, create, save, close, list, and retrieve info about workbooks
Sheet Management: Create and rename sheets, inspect structure (column profiles, sample rows)
Range Read/Write: Read values (with formula support, offsets), write values, clear contents, and copy ranges with paste mode options
Formula Tools: Validate expressions and fill ranges with formulas
Formatting: Set range styles (font, fill, border, alignment, number format) and auto-fit columns
Snapshot & Rollback: List, preview, and restore snapshots; get stats and run cleanup
Audit Logging: List past operations with filtering by workbook, tool name, or success status
Server Management: Check server status and manage client request tracking
Advanced Features (via profiles/bundles):
VBA automation
Data workflows (Power Query, table management)
Export to PDF/CSV
Direct OOXML package parsing/patching/merging without Excel COM
Batch operations across multiple files
Chart management and series extraction
Conditional formatting (apply, update, copy, clear)
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., "@ExcelForgeOpen D:/Work/sales.xlsx, read the first 20 rows, and format the header as bold."
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.
ExcelForge
基于 MCP 协议的 Excel 自动化工具服务。单一 Host 入口,通过 Profile / Bundle 按场景装配工具。
当前版本 v2.5.0 — 18 个能力域 · 101+ 个工具 · 14 个 Bundle · 12 个 Profile(含 5 个开发 Profile)。
安装
前置要求
项目 | 要求 |
Python | ≥ 3.11 |
操作系统 | Windows(需要 Excel COM 自动化) |
Excel | Windows 版 Microsoft Excel |
包管理 | uv |
第一步:安装 uv(如尚未安装)
pip install uv第二步:克隆仓库
git clone <你的仓库地址>
cd ExcelForge第三步:安装依赖
uv sync依赖说明:
uv sync会自动从pyproject.toml安装以下依赖包:
pydantic >= 2.8
PyYAML >= 6.0.1
mcp >= 1.2.0
pywin32 >= 306 (Windows)
psutil >= 5.9.0
openpyxl >= 3.1.5
第四步:快速验证
# 查看可用 Profile
uv run python -m excelforge.gateway.host --config excel-mcp.yaml --list-profiles
# 查看可用 Bundle
uv run python -m excelforge.gateway.host --config excel-mcp.yaml --list-bundles
# 查看当前 Profile 的工具清单
uv run python -m excelforge.gateway.host --config excel-mcp.yaml --profile basic_edit --dump-toolsRelated MCP server: Excel MCP Server
配置文件说明
本项目使用两个配置文件,一般不需要修改:
文件 | 作用 | 是否需要修改 |
| Gateway 入口配置,定义服务端口、超时等 | 一般不需要 |
| Excel 运行时配置,定义 Excel 行为、路径限制等 | 按需调整 |
两个文件都使用相对路径,确保从项目根目录运行命令即可正常工作。
启动
uv run python -m excelforge.gateway.host --config excel-mcp.yaml --profile basic_edit如何选择 Profile
Profile 决定暴露哪些工具,根据使用场景选择:
场景 | 推荐 Profile | 说明 |
基础读写操作 |
| 打开/读写/Sheet 管理 |
需要公式和格式 |
| 基础 + 公式 + 格式 |
VBA 自动化 |
| VBA + 快照/备份/回滚 |
数据分析 |
| PQ 查询 + Table + 分析 |
不确定用什么 |
| 最安全的选择 |
切换 Profile:修改 --profile 参数后重启服务。
选择 Profile
Profile 决定暴露哪些工具。按场景选,不确定就从 basic_edit 开始。
Profile | 做什么 | 工具数 |
| 打开 / 读写 / Sheet 管理 | 35 |
| 上述 + 公式 + 格式 | 46 |
| VBA + 快照 / 备份 / 回滚 | 40 |
| PQ 查询 + Table + 分析审计 + workbook_ops | 33 |
| 导出 PDF / CSV + 分析 | 32 |
| Package 直接解析(无需 Excel COM) | 16 |
| artifact_extract + patch / merge / compare | 22 |
| artifact_transform + 批量处理 | 26 |
| 全部工具(仅 CLI / 回归测试) | 101+ |
开发 Profile(推荐 AI 编程使用):
Profile | 做什么 | 工具数 |
| Package 优先,COM 兜底 | 42 |
| 批量处理优先 | 48 |
| 批量操作优先 | 50 |
| 图表操作优先 | 44 |
| 条件格式优先 | 42 |
切换方法:改 --profile 参数,重启服务。
微调 Bundle
Profile 不完全匹配时,用 --enable-bundle / --disable-bundle 加减:
# data_workflow + 结构编辑
--profile data_workflow --enable-bundle edit_structure # 33 + 6 = 39
# 基础编辑 + 结构编辑
--profile basic_edit --enable-bundle edit_structure # 35 + 6 = 41可用 Bundle:
Bundle | 工具数 | 内容 |
foundation | 8 | 服务状态 + 工作簿 I/O(必选) |
data | 8 | Table 管理 |
analysis | 6 | 结构扫描 / 公式审计 / 分析报告 |
workbook_ops | 6 | 另存 / 刷新 / 计算 / 导出 PDF·CSV |
edit_basic | 7 | Sheet 创建/重命名 + Range 读写/复制 |
edit_structure | 6 | Sheet 复制/移动/隐藏 + Range 查找替换/自动调整 |
calc_format | 11 | 公式 + 格式 |
automation | 8 | VBA |
recovery | 8 | 快照 / 回滚 / 备份 |
artifact_export | 8 | Package XML 解析(无需 Excel COM) |
artifact_patch | 7 | Package 补丁 / 替换 / 合并 / 比较 |
batch_ops | 3 | 批量提取 / 变换 / 比较 |
chart_operations | 4 | 图表列表 / 详情 / 系列 / 导出 |
format_rules | 4 | 条件格式规则应用 / 更新 / 复制 / 清除 |
常用命令
# 查看可用 Profile / Bundle
--list-profiles
--list-bundles
# 诊断当前 Profile 的工具清单
--dump-tools
--dump-tools-with-index
# 查看 Profile 解析过程
--dump-profile-resolution完整示例:
uv run python -m excelforge.gateway.host --config excel-mcp.yaml --profile basic_edit --dump-toolsMCP 客户端配置
{
"mcpServers": {
"excel": {
"command": "uv",
"args": [
"run", "python", "-m", "excelforge.gateway.host",
"--config", "YOUR_PROJECT_PATH/excel-mcp.yaml",
"--profile", "data_workflow",
"--restart-runtime", "if-stale"
],
"cwd": "YOUR_PROJECT_PATH/"
}
}
}开发环境用
--restart-runtime always,生产用if-stale更多示例见
mcp.example.json及examples/目录
文档
文档 | 内容 |
Tool / Bundle / Profile 完整对照矩阵与查询索引(V2.5) | |
Trae 推荐 Profile、截断问题与配置示例 | |
本版新增工具、Bundle 拆分、Profile 重整记录 | |
新增 Package/Batch/Chart/ConditionalFormat 工具域 | |
直接解析 Excel 文件 ZIP 结构,无需 Excel COM | |
批量提取、变换、比较多个 Excel 文件 | |
图表解析、导出、系列读取 |
Available Tools
24 toolsaudit_list_operationsD
Inputs: workbook_id, tool_name, success_only, limit, +2 more.
format_auto_fit_columnsD
Inputs: workbook_id (required), sheet_name (required), columns, client_request_id.
format_set_range_styleD
Inputs: workbook_id (required), sheet_name (required), range (required), font, +5 more.
formula_fill_rangeD
Inputs: workbook_id (required), sheet_name (required), range (required), formula (required), +2 more.
formula_validate_expressionD
Inputs: workbook_id (required), sheet_name (required), anchor_cell (required), formula (required), +1 more.
range_clear_contentsD
Inputs: workbook_id (required), sheet_name (required), range (required), client_request_id.
range_copy_rangeD
Inputs: workbook_id (required), source_sheet (required), source_range (required), target_sheet (required), +3 more.
range_read_valuesD
Inputs: workbook_id (required), sheet_name (required), range (required), value_mode, +4 more.
range_write_valuesD
Inputs: workbook_id (required), sheet_name (required), start_cell (required), values (required), +1 more.
rollback_list_snapshotsD
Inputs: workbook_id, limit, offset, client_request_id.
rollback_preview_snapshotD
Inputs: snapshot_id (required), sample_limit, client_request_id.
rollback_restore_snapshotD
Inputs: snapshot_id (required), preview_token (required), client_request_id.
server_get_statusD
Inputs: client_request_id.
sheet_create_sheetD
Inputs: workbook_id (required), sheet_name (required), position, client_request_id.
sheet_inspect_structureD
Inputs: workbook_id (required), sheet_name (required), sample_rows, scan_rows, +2 more.
sheet_rename_sheetD
Inputs: workbook_id (required), current_name (required), new_name (required), client_request_id.
snapshot_get_statsD
Inputs: workbook_id, client_request_id.
snapshot_run_cleanupD
Inputs: max_age_hours, workbook_id, dry_run, client_request_id.
workbook_close_fileD
Inputs: workbook_id (required), force_discard, client_request_id.
workbook_create_fileD
Inputs: file_path (required), sheet_names, overwrite, client_request_id.
workbook_get_infoD
Inputs: workbook_id (required), client_request_id.
workbook_list_openD
Inputs: client_request_id.
workbook_open_fileD
Inputs: file_path (required), read_only, client_request_id.
workbook_save_fileD
Inputs: workbook_id (required), save_as_path, client_request_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 24 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools are organized by functional categories (audit, format, formula, range, rollback, server, sheet, snapshot, workbook), and each tool name precisely indicates its specific operation within that category. There is no overlap in functionality that would cause misselection.
Tool names follow a highly consistent verb_noun pattern throughout, using snake_case uniformly. The structure is predictable with category prefixes (e.g., 'range_', 'workbook_', 'sheet_') followed by descriptive actions, making it easy to understand and navigate the toolset. There are no deviations in naming conventions.
With 24 tools, the count is borderline heavy for an Excel manipulation server. While the tools cover comprehensive operations, this number might overwhelm agents or indicate potential over-specialization. It's reasonable but leans toward the upper limit of typical scoping (3-15 tools).
The toolset provides complete CRUD/lifecycle coverage for Excel file manipulation. It includes operations for workbook management (create, open, save, close), sheet handling, range operations, formatting, formulas, snapshots/rollbacks, auditing, and server status. No obvious gaps exist; agents can perform end-to-end workflows without dead ends.
Maintenance
Related MCP Connectors
Let AI agents read, check and edit Excel models. Open a workbook or drop in one MCP config. Either way: typed cells, a formula dependency graph, and a verification certificate. Deterministic — no OCR, no model guessing at your numbers.
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that allows LLMs to read, analyze, and interact with Excel files through file operations, data discovery, and comprehensive analysis tools.2-
- AlicenseNot gradedqualityDmaintenanceAn MCP server for manipulating Excel files that features a headless engine for real-time formula calculation and data validation. It enables users to create, read, and manage workbooks, sheets, and charts without requiring Microsoft Excel installed.23 npmMIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to automate Excel file operations including workbook creation, worksheet management, and data manipulation. It provides a standardized interface for reading, writing, merging, and filtering cell ranges within Excel documents.4-
- AlicenseAqualityDmaintenanceA comprehensive MCP server that enables AI models to perform local file operations, command execution, and task management across multiple platforms. It features advanced capabilities like row-level file editing, directory searching, and system monitoring with built-in security filters.1316 npmMulan Permissive Software , Version 2