excel-mcp-live
excel-mcp-live
在 Microsoft Excel 工作簿打开时对其进行编辑——AI 会附着在你已经打开的窗口上,而不是启动自己的窗口。
实时编辑 · Windows (COM) · 19 个工具
大多数 Excel MCP 服务器(包括本工作区自己的 mcp-server-excel)的工作方式是启动一个全新的、不可见的 Excel 进程,在其中打开你的文件,完成后再次关闭它。这对于脚本化自动化来说很棒,但这意味着 AI 永远不会看到你正在看的同一个窗口。
excel-mcp-live 的做法恰恰相反:它通过 COM 附着到你已经打开的任何 Excel 窗口上,使用与
word-mcp-live 的实时编辑工具相同的"查找正在运行的应用程序"方法。它从不启动 Excel,也从不关闭它——它只操作你自己打开的工作簿。
要求
Windows(COM 自动化仅限 Windows——本项目没有 macOS/Linux 模式)
已安装 Microsoft Excel 且 已运行并打开了一个工作簿
Python 3.11+
Related MCP server: mcp-server-xlwings
安装
git clone <this-repo-url>
cd excel-mcp-live
pip install -e .或者使用 uv 直接从源码运行——无需安装步骤:
uv run excel_mcp_server.py客户端配置(.mcp.json)
将你的 MCP 客户端指向项目目录。对于 Claude Code,在项目中添加以下内容到 .mcp.json
(或使用 ~/.claude.json 进行用户级配置):
{
"mcpServers": {
"excel-live": {
"command": "uv",
"args": [
"--directory",
"G:/Ai/MCP/excel-mcp-live",
"run",
"excel_mcp_server.py"
],
"env": {
"MCP_AUTHOR": "Your Name"
}
}
}
}如果你改用 pip install -e . 安装,则可以直接使用控制台脚本:
{
"mcpServers": {
"excel-live": {
"command": "excel-mcp-live",
"env": {
"MCP_AUTHOR": "Your Name"
}
}
}
}MCP_AUTHOR 设置附加到新单元格评论上的作者名称(默认值:"Author")。
支持的函数
每个工具都作用于已在 Excel 中打开的工作簿。workbook 和 sheet 参数几乎在所有地方都是可选的——省略它们即可针对活动工作簿 / 活动工作表。
工具 | 描述 |
工作簿 | |
| 列出所有正在运行的 Excel 窗口中打开的每个工作簿 |
| 每个工作表的名称、活动工作表及已用区域 |
| 就地保存(Ctrl+S) |
工作表 | |
| 按选项卡顺序列出工作表名称 |
| 添加新工作表,可选命名和定位 |
| 删除工作表 |
| 重命名工作表 |
| 切换活动选项卡 |
单元格与区域 | |
| 读取单元格/区域的值 |
| 写入一个值、一行或一个二维值块 |
| 读取公式(A1 样式) |
| 在单个单元格上设置公式或字面值 |
| 在工作表或整个工作簿中查找并替换文本 |
| 清除内容,可选包括格式 |
| 插入或删除行,将其他行向上/向下移动 |
| 插入或删除列,将其他列向左/向右移动 |
| 按某一列对区域排序,可选保持标题行不动 |
格式 | |
| 粗体/斜体/下划线、字体、填充颜色、数字格式、对齐、自动换行 |
| 自动调整列宽 |
条件格式 | |
| 突出显示满足比较条件的单元格(大于、介于等) |
| 在区域上应用 2 色或 3 色刻度 |
| 列出应用于区域的规则 |
| 移除区域中的所有规则 |
命名区域 | |
| 列出用户定义的命名区域 |
| 读取命名区域的当前值 |
| 将值写入命名区域的左上角单元格 |
| 创建新的命名区域 |
| 将现有命名区域重新指向新地址 |
| 删除命名区域 |
数据验证 | |
| 将区域限制为值的下拉列表 |
| 将区域限制为满足比较条件的数字 |
| 读取单元格的验证规则 |
| 从区域中移除验证 |
合并 | |
| 将区域合并为一个单元格,或取消合并 |
| 检查单元格是否为合并区域的一部分 |
超链接 | |
| 添加超链接(外部 URL 或内部单元格引用) |
| 移除单元格的超链接 |
| 列出工作表上的所有超链接 |
Excel 表格 | |
| 从区域创建 Excel 表格(ListObject) |
| 列出工作表上的表格 |
| 读取表格的列、区域、行数和样式 |
| 在表格末尾添加一行或多行 |
| 将表格的数据行读取为二维数组 |
| 应用内置表格样式 |
| 移除表格的定义,保留底层数据 |
图表 | |
| 从区域创建图表 |
| 列出工作表上的图表 |
| 更改图表类型(柱状图、条形图、折线图、饼图、面积图、散点图、环形图) |
| 设置或清除图表标题 |
| 向图表添加数据系列 |
| 删除图表 |
评论 | |
| 添加单元格评论(批注) |
| 列出工作表上的评论 |
| 移除单元格的评论 |
尚未覆盖:数据透视表、Power Query、DAX、VBA——对于这些,请使用 mcp-server-excel,它会启动自己的 Excel 实例,并且操作覆盖范围更广。
示例提示
"I have this budget open in Excel — read A1:F20 and tell me if any totals look wrong."
"Add a new sheet called 'Summary' before the current one."
"Bold row 1 in the sheet I have open and give it a light gray fill."
"Find every 'Q3' in this workbook and replace it with 'Q4'."
"Set B2 to =SUM(B3:B20) and tell me what it calculates to."
"Add a comment on cell D5 asking whether this figure includes tax."已知限制
仅限 Windows。 Excel COM 自动化在 macOS/Linux 上不存在。
工作簿必须已在 Excel 中打开。 此服务器不创建或打开文件——请参阅 mcp-server-excel 了解相关功能。
无单次撤销分组。 Word 的 COM API 可以将多次编辑包装为一次 Ctrl+Z;Excel 则不能。 执行多次写入的工具调用(例如写入多个单元格)可能需要多次 Ctrl+Z 才能完全撤销。
多个 Excel 窗口: 如果你打开了多个工作簿(可能位于不同的 Excel 进程中),请显式传递
workbook以定位正确的工作簿——否则工具默认使用首先找到的 Excel 实例中的活动工作簿。
开发
有关架构说明和设计约束,请参阅 CLAUDE.md——特别是为什么此服务器绝不能自行启动或退出 Excel。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables reading and writing of values, formulas, and formatting in Microsoft Excel files including .xlsx and .xlsm formats. It supports sheet management, table creation, and provides Windows-exclusive features like live editing and screen capture.14,896MIT
- AlicenseAqualityCmaintenanceEnables Excel automation via xlwings COM, supporting DRM-protected files and live Excel sessions with tools to read, write, format, run macros, and more.111MIT
- AlicenseNot gradedqualityDmaintenanceEnables adding, editing, and running VBA modules on running Excel instances in Windows.526MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to read, write, format, and execute VBA macros in Microsoft Excel in real-time through the Model Context Protocol, connecting directly to an open Excel window via COM integration.
Related MCP Connectors
Formula-backed WorkPaper tools for workbook readback, input edits, and JSON persistence.
Real .docx and .xlsx files from structured data, with automatic Hebrew/Arabic RTL.
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/trustypangolin/excel-mcp-live'
If you have feedback or need assistance with the MCP directory API, please join our Discord server