Skip to main content
Glama

Excel MCP 服务器

铁匠徽章

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

要求

  • Python 3.10+

  • MCP SDK 1.2.0+

  • OpenPyXL 3.1.2+

Related MCP server: BachStudio Excel MCP Server

成分

资源

服务器通过 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文件。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to create, read, write, and manipulate Excel files (.xlsx, .xlsm) without requiring Microsoft Excel, including support for charts, pivot tables, data import/export, and professional formatting across Windows, macOS, and Linux.
    27 npm
    34
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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.
    7,968 npm
    MIT