Excel MCP Server

by fish0710
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Leverages Python and OpenPyXL to enable Excel workbook manipulation, including worksheet management, data reading/writing, formatting, and analysis features like charts and pivot tables.

Excel MCP 服务器

模型上下文协议 (MCP) 服务器实现,无需安装 Microsoft Excel 即可提供 Excel 文件操作功能。此服务器支持工作簿创建、数据操作、格式化以及高级 Excel 功能。

要求

  • Python 3.10+
  • MCP SDK 1.2.0+
  • OpenPyXL 3.1.2+

成分

资源

服务器通过 OpenPyXL 提供 Excel 工作簿操作:

  • 创建和修改 Excel 工作簿
  • 管理工作表和范围
  • 处理格式和样式
  • 支持图表和数据透视表

工具

此服务器提供了一套全面的 Excel 操作工具。有关所有可用工具的详细文档、参数和使用示例,请参阅TOOLS.md

这些工具包括以下功能:

  • 工作簿和工作表管理
  • 数据读写
  • 格式和样式
  • 图表和可视化
  • 数据透视表和数据分析

请参阅TOOLS.md以获取完整文档。

特征

  • 全面支持 Excel:全面的 Excel 功能
  • 数据操作:读取、写入和转换数据
  • 高级功能:图表、数据透视表和格式
  • 错误处理:全面的错误处理,信息清晰

用法

环境配置

可以使用以下环境变量配置服务器:

  • EXCEL_FILES_PATH :存储 Excel 文件的目录(默认值: ./excel_files

您可以通过不同的方式进行设置:

Windows 命令:

set EXCEL_FILES_PATH=C:\path\to\excel\files uv run excel-mcp-server

Windows PowerShell:

$env:EXCEL_FILES_PATH="C:\path\to\excel\files" uv run excel-mcp-server

Linux/MacOS:

export EXCEL_FILES_PATH=/path/to/excel/files uv run excel-mcp-server

或者在 Claude Desktop 配置中:

{ "mcpServers": { "excel": { "command": "uv run excel-mcp-server", "transport": "sse", "env": { "EXCEL_FILES_PATH": "/path/to/excel/files" } } } }

启动服务器

启动服务器:

uv run excel-mcp-server

服务器将以 SSE 模式启动并等待来自 MCP 客户端的连接。

在 Cursor IDE 中连接

启动服务器后,连接到 Cursor IDE 中的 SSE 端点:

http://localhost:8000/sse

Excel MCP 工具将通过代理提供。

有关可用的工具及其用法,请参阅TOOLS.md

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

无需安装 Microsoft Excel 即可提供 Excel 文件操作功能,支持工作簿创建、数据操作、格式化和高级 Excel 功能。

  1. Requirements
    1. Components
      1. Resources
      2. Tools
    2. Features
      1. Usage
        1. Environment Configuration
        2. Starting the Server
        3. Connecting in Cursor IDE
      2. License
        ID: k05edyttec