Token导航 LogoToken导航TokenDH.com
Excel Vba MCP logo
数据服务stdio官方级别未说明来源级核验

Excel Vba MCP

MCP Server

基于MCP协议的Excel自动化工具服务,提供多种Profile和Bundle按场景装配工具,支持基础读写、公式格式、VBA自动化、数据分析等功能。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
批量处理Python数据处理数据分析

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

derek2000139

提供方

derek2000139

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install uv

详细介绍

ExcelForge

基于 MCP 协议的 Excel 自动化工具服务。单一 Host 入口,通过 Profile / Bundle 按场景装配工具。

当前版本 v2.5.0 — 18 个能力域 · 101+ 个工具 · 14 个 Bundle · 12 个 Profile(含 5 个开发 Profile)。

安装

前置要求

项目要求
Python≥ 3.11
操作系统Windows(需要 Excel COM 自动化)
ExcelWindows 版 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-tools

配置文件说明

本项目使用两个配置文件,一般不需要修改:

文件作用是否需要修改
excel-mcp.yamlGateway 入口配置,定义服务端口、超时等一般不需要
runtime-config.yamlExcel 运行时配置,定义 Excel 行为、路径限制等按需调整

两个文件都使用相对路径,确保从项目根目录运行命令即可正常工作。

启动

uv run python -m excelforge.gateway.host --config excel-mcp.yaml --profile basic_edit

如何选择 Profile

Profile 决定暴露哪些工具,根据使用场景选择:

场景推荐 Profile说明
基础读写操作basic_edit打开/读写/Sheet 管理
需要公式和格式calc_format基础 + 公式 + 格式
VBA 自动化automationVBA + 快照/备份/回滚
数据分析data_workflowPQ 查询 + Table + 分析
不确定用什么basic_edit最安全的选择

切换 Profile:修改 --profile 参数后重启服务。

选择 Profile

Profile 决定暴露哪些工具。按场景选,不确定就从 basic_edit 开始。

Profile做什么工具数
basic_edit打开 / 读写 / Sheet 管理35
calc_format上述 + 公式 + 格式46
automationVBA + 快照 / 备份 / 回滚40
data_workflowPQ 查询 + Table + 分析审计 + workbook_ops33
reporting导出 PDF / CSV + 分析32
artifact_extractPackage 直接解析(无需 Excel COM)16
artifact_transformartifact_extract + patch / merge / compare22
batch_deliveryartifact_transform + 批量处理26
all全部工具(仅 CLI / 回归测试)101+

开发 Profile(推荐 AI 编程使用):

Profile做什么工具数
artifact_firstPackage 优先,COM 兜底42
package_first批量处理优先48
batch_first批量操作优先50
chart_first图表操作优先44
rules_first条件格式优先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工具数内容
foundation8服务状态 + 工作簿 I/O(必选)
data8Table 管理
analysis6结构扫描 / 公式审计 / 分析报告
workbook_ops6另存 / 刷新 / 计算 / 导出 PDF·CSV
edit_basic7Sheet 创建/重命名 + Range 读写/复制
edit_structure6Sheet 复制/移动/隐藏 + Range 查找替换/自动调整
calc_format11公式 + 格式
automation8VBA
recovery8快照 / 回滚 / 备份
artifact_export8Package XML 解析(无需 Excel COM)
artifact_patch7Package 补丁 / 替换 / 合并 / 比较
batch_ops3批量提取 / 变换 / 比较
chart_operations4图表列表 / 详情 / 系列 / 导出
format_rules4条件格式规则应用 / 更新 / 复制 / 清除

常用命令

# 查看可用 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-tools

MCP 客户端配置

{
  "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.jsonexamples/ 目录

文档

文档内容
工具域 Profile 参考手册Tool / Bundle / Profile 完整对照矩阵与查询索引(V2.5)
Trae AI 使用说明Trae 推荐 Profile、截断问题与配置示例
v2.4 变更日志本版新增工具、Bundle 拆分、Profile 重整记录
v2.5 变更日志新增 Package/Batch/Chart/ConditionalFormat 工具域
直接解析 Excel 文件 ZIP 结构,无需 Excel COM
Batch 批量处理指南批量提取、变换、比较多个 Excel 文件
Chart 图表指南图表解析、导出、系列读取

目录标签

目录标签

批量处理Python数据处理数据分析Excel自动化本地部署VBA

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP