Excel MCP Server

Excel MCP Server
精选

一个模型上下文协议服务器,使 AI 助手能够读取和写入 Microsoft Excel 文件,支持诸如 xlsx、xlsm、xltx 和 xltm 等格式。

文件系统
本地
Category.go
访问服务器

README

Excel MCP Server

<img src="docs/img/icon-800.png" width="128">

NPM Version smithery badge

一个用于读取和写入 MS Excel 数据的模型上下文协议 (MCP) 服务器。

功能

  • 从 MS Excel 文件读取文本值
  • 将文本值写入 MS Excel 文件
  • 从 MS Excel 文件读取公式
  • 将公式写入 MS Excel 文件
  • 从 MS Excel 文件捕获屏幕图像(仅限 Windows)

有关更多详细信息,请参见 工具 部分。

要求

  • Node.js 20.x 或更高版本

支持的文件格式

  • xlsx (Excel 工作簿)
  • xlsm (Excel 启用宏的工作簿)
  • xltx (Excel 模板)
  • xltm (Excel 启用宏的模板)

安装

通过 NPM 安装

通过将以下配置添加到 MCP 服务器配置中,可以自动安装 excel-mcp-server。

对于 Windows:

{
    "mcpServers": {
        "excel": {
            "command": "cmd",
            "args": ["/c", "npx", "--yes", "@negokaz/excel-mcp-server"],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

对于其他平台:

{
    "mcpServers": {
        "excel": {
            "command": "npx",
            "args": ["--yes", "@negokaz/excel-mcp-server"],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

通过 Smithery 安装

要通过 Smithery 为 Claude Desktop 自动安装 Excel MCP Server,请执行以下操作:

npx -y @smithery/cli install @negokaz/excel-mcp-server --client claude

<h2 id="tools">工具</h2>

read_sheet_names

列出 Excel 文件中的所有工作表名称。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径

read_sheet_data

从 Excel 工作表中读取数据,支持分页。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径
  • sheetName
    • Excel 文件中的工作表名称
  • range
    • 要在 Excel 工作表中读取的单元格范围(例如,“A1:C10”)。 [默认值:第一个分页范围]
  • knownPagingRanges
    • 已读取的分页范围列表

read_sheet_formula

从 Excel 工作表中读取公式,支持分页。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径
  • sheetName
    • Excel 文件中的工作表名称
  • range
    • 要在 Excel 工作表中读取的单元格范围(例如,“A1:C10”)。 [默认值:第一个分页范围]
  • knownPagingRanges
    • 已读取的分页范围列表

read_sheet_image

[仅限 Windows] 从 Excel 工作表中读取数据作为图像,支持分页。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径
  • sheetName
    • Excel 文件中的工作表名称
  • range
    • 要在 Excel 工作表中读取的单元格范围(例如,“A1:C10”)。 [默认值:第一个分页范围]
  • knownPagingRanges
    • 已读取的分页范围列表

write_sheet_data

将数据写入 Excel 工作表。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径
  • sheetName
    • Excel 文件中的工作表名称
  • range
    • 要在 Excel 工作表中读取的单元格范围(例如,“A1:C10”)。
  • data
    • 要写入 Excel 工作表的数据

write_sheet_formula

将公式写入 Excel 工作表。

参数:

  • fileAbsolutePath
    • Excel 文件的绝对路径
  • sheetName
    • Excel 文件中的工作表名称
  • range
    • 要在 Excel 工作表中读取的单元格范围(例如,“A1:C10”)。
  • formulas
    • 要写入 Excel 工作表的公式(例如,“=A1+B1”)

<h2 id="tools">配置</h2>

您可以通过以下环境变量更改 MCP 服务器的行为:

EXCEL_MCP_PAGING_CELLS_LIMIT

单次分页操作中要读取的最大单元格数。 [默认值:4000]

许可证

版权所有 (c) 2025 Kazuki Negoro

excel-mcp-server 在 MIT 许可证 下发布

推荐服务器

Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Playwright MCP Server

Playwright MCP Server

提供一个利用模型上下文协议的服务器,以实现类人浏览器的自动化,该服务器使用 Playwright,允许控制浏览器行为,例如导航、元素交互和滚动。

精选
本地
TypeScript
Claude Code MCP

Claude Code MCP

一个实现了 Claude Code 作为模型上下文协议(Model Context Protocol, MCP)服务器的方案,它可以通过标准化的 MCP 接口来使用 Claude 的软件工程能力(代码生成、编辑、审查和文件操作)。

精选
本地
JavaScript
Apple MCP Server

Apple MCP Server

通过 MCP 协议与 Apple 应用(如“信息”、“备忘录”和“通讯录”)进行交互,从而使用自然语言发送消息、搜索和打开应用内容。

精选
本地
TypeScript
Azure MCP Server

Azure MCP Server

通过 Claude Desktop 实现与 Azure 服务的自然语言交互,支持资源管理、订阅处理和租户选择,并提供安全身份验证。

官方
本地
TypeScript
Settlemint

Settlemint

Leverage SettleMint's Model Context Protocol server to seamlessly interact with enterprise blockchain infrastructure. Build, deploy, and manage smart contracts through AI-powered assistants, streamlining your blockchain development workflow for maximum efficiency.

官方
本地
TypeScript
Brev

Brev

在云端运行、构建、训练和部署机器学习模型。

官方
本地
Python
Verodat MCP Server

Verodat MCP Server

一个 MCP 服务器,集成了 Verodat 的数据管理功能和像 Claude Desktop 这样的人工智能系统,使用户能够管理账户、工作区和数据集,并能对他们的数据执行人工智能驱动的查询。

官方
本地
TypeScript
Crawlab MCP Server

Crawlab MCP Server

官方
Python
LSD MCP Server

LSD MCP Server

该服务器通过 LSD SQL 语言的功能将 Claude AI 连接到互联网,将网络数据转换为可查询的类数据库结构,从而高效地与真实世界的数据进行交互。

本地
Python