一个支持 Model Context Protocol (MCP) 的服务器,用于读取和写入 Microsoft Excel 数据,为 Excel 数据处理提供便捷方案。
Excel MCP 服务器是一个支持 Model Context Protocol (MCP) 的服务器,可用于读取和写入 Microsoft Excel 数据。
更多细节请参见工具部分。
要自动安装 Excel MCP Server,请在 MCP 服务器配置中添加以下内容。
对于 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"
}
}
}
}
要自动为 Claude Desktop 安装 Excel MCP Server,请使用 史密瑟里:
npx -y @smithery/cli install @negokaz/excel-mcp-server --client claude
read_sheet_names
列出 Excel 文件中的所有工作表名称。
参数:
fileAbsolutePath
read_sheet_data
按分页读取 Excel 工作表的数据。
参数:
fileAbsolutePath
sheetName
range
(可选)
returnHeaders
(可选)
read_sheet_data_all
按分页读取 Excel 文件中所有工作表的数据。
参数:
fileAbsolutePath
write_sheet_data
向 Excel 工作表写入数据。
参数:
fileAbsolutePath
sheetName
data
headers
(可选)
write_sheet_data_all
向 Excel 文件中的所有工作表写入数据。
参数:
fileAbsolutePath
通过以下环境变量调整 MCP 服务器的行为:
EXCEL_MCP_PAGING_CELLS_LIMIT
每次分页操作中读取的最大单元格数。
[默认值:4000]
版权所有 (c) 2025 Kazuki Negoro
Excel MCP Server 根据 MIT License 发布