ExcelForge
A Windows-based MCP server that enables AI assistants to manage Excel files through the desktop application, supporting workbook operations, data manipulation, and formula validation. It features robust safety tools including snapshot-based rollbacks, path restrictions, and comprehensive audit logging.
README
ExcelForge
ExcelForge 是一个基于 MCP (Model Context Protocol) 的 Excel 操作工具集,让 AI 助手能够安全、高效地操作 Excel 文件。
功能特性
- 工作簿管理 - 打开、保存、关闭 Excel 文件
- 工作表操作 - 创建、删除、重命名、查看结构
- 范围操作 - 读写数据、复制、清除、排序
- 公式支持 - 验证表达式、填充范围
- 格式设置 - 设置单元格样式、自动调整列宽
- 备份恢复 - 文件级备份、快照回滚
- VBA 读写访问 - 查看工程、扫描代码、同步模块、执行宏
- 命名范围 - 列出和读取命名区域
- 数据验证和条件格式 - 读取工作表规则
版本
当前版本: v1.0.1
系统要求
- Windows 操作系统
- Microsoft Excel (已安装)
- Python 3.11+
- pywin32
安装
pip install -e .
配置
编辑 config.yaml 文件配置:
server.version- 服务器版本excel.visible- Excel 是否可见paths.allowed_roots- 允许访问的目录paths.allowed_extensions- 允许打开的文件扩展名limits.*- 各种操作限制
使用
# 启动服务器
python -m excelforge serve
# 查看帮助
python -m excelforge --help
工具列表
v1.0.1 提供两种 Profile:
- Default Profile:约 30 个工具(Trae IDE 推荐)
- Extended Profile:约 36 个工具(全功能)
工作簿工具
workbook.open_file- 打开 Excel 文件workbook.inspect- 列出已打开工作簿/获取工作簿信息workbook.save_file- 保存工作簿workbook.close_file- 关闭工作簿workbook.create_file- 创建新工作簿
工作表工具
sheet.inspect_structure- 检查工作表结构sheet.create_sheet- 创建工作表sheet.rename_sheet- 重命名工作表sheet.delete_sheet- 删除工作表(含预览确认)sheet.set_auto_filter- 设置自动筛选sheet.get_rules- 获取条件格式和数据验证
范围工具
range.read_values- 读取范围值range.write_values- 写入范围值range.clear_contents- 清除范围内容range.copy_range- 复制范围range.manage_rows- 插入/删除行range.manage_columns- 插入/删除列range.sort_data- 排序数据range.merge_cells- 合并单元格range.unmerge_cells- 取消合并单元格range.manage_merge- 管理合并
公式工具
formula.fill_range- 填充公式范围formula.set_single- 设置单个公式formula.get_dependencies- 获取公式依赖formula.repair_references- 修复引用
格式工具
format.manage- 设置样式/自动调整列宽
VBA 工具
vba.inspect_project- 检查 VBA 工程vba.get_module_code- 获取模块代码vba.scan_code- 安全扫描 VBA 代码vba.sync_module- 同步 VBA 模块vba.remove_module- 删除 VBA 模块vba.execute- 执行 VBA 宏vba.compile- 编译 VBA 项目
Extended Profile 额外工具
rollback.manage- 管理快照backups.manage- 管理备份audit.list_operations- 列出操作记录names.inspect- 列出/读取命名范围names.create- 创建命名范围names.delete- 删除命名范围
服务器工具
server.get_status- 获取服务器状态
VBA 安全策略
- 写入 VBA 代码必须通过安全扫描
- 默认阻止 CRITICAL 和 HIGH 风险代码
- MsgBox 自动替换为 Debug.Print
- InputBox 被禁用以避免弹窗阻塞
版本历史
| 版本 | 日期 | 主要更新 |
|---|---|---|
| v0.1 | 2026-03-22 | 基础读写、快照 |
| v0.2 | 2026-03-23 | COM 恢复、格式化 |
| v0.3 | 2026-03-23 | 结构操作、VBA 只读 |
| v0.4 | 2026-03-24 | .xls 支持、排序、合并 |
| v0.5 | 2026-03-24 | VBA 写入、安全扫描、命名范围 |
| v1.0.0 | 2026-03-24 | 工具组配置、简化工具链、Trae兼容 |
| v1.0.1 | 2026-03-24 | 工具合并(workbook.inspect/format.manage)、Profile机制、健康检查 |
配置示例
server:
version: "1.0.1"
excel:
visible: true
force_disable_macros: false
paths:
allowed_roots:
- "D:/ExcelForge"
tools:
profile: "default" # default | extended
groups:
core: true
vba: true
recovery: false
names: false
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.