Skip to main content
Glama
Excel MCP Server
by negokaz

Excel MCP 服务器

NPM 版本 铁匠徽章

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

特征

  • 读/写文本值

  • 读/写公式

  • 创建新工作表

🪟仅限Windows:

  • 实时编辑

  • 从工作表捕获屏幕图像

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

Related MCP server: MCP Sheet Parser

要求

  • 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

excel_describe_sheets

列出指定Excel文件的所有sheet信息。

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

excel_read_sheet

从 Excel 表中分页读取值。

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

  • sheetName

    • Excel 文件中的工作表名称

  • range

    • Excel 工作表中要读取的单元格范围(例如“A1:C10”)。[默认:第一页范围]

  • knownPagingRanges

    • 已读分页范围列表

  • showFormula

    • 显示公式而不是值

excel_screen_capture

**[仅限 Windows]**对带分页的 Excel 工作表进行屏幕截图。

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

  • sheetName

    • Excel 文件中的工作表名称

  • range

    • Excel 工作表中要读取的单元格范围(例如“A1:C10”)。[默认:第一页范围]

  • knownPagingRanges

    • 已读分页范围列表

excel_write_to_sheet

将值写入 Excel 表。

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

  • sheetName

    • Excel 文件中的工作表名称

  • newSheet

    • 如果为真,则创建新工作表,否则写入现有工作表

  • range

    • Excel 表中要读取的单元格范围(例如“A1:C10”)。

  • values

    • 要写入 Excel 工作表的值。如果该值是公式,则应以“=”开头

excel_create_table

在 Excel 工作表中创建表格

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

  • sheetName

    • 创建表的工作表名称

  • range

    • 范围为表格(例如“A1:C10”)

  • tableName

    • 待创建的表名

excel_copy_sheet

将现有工作表复制到新工作表

参数:

  • fileAbsolutePath

    • Excel 文件的绝对路径

  • srcSheetName

    • Excel 文件中的源工作表名称

  • dstSheetName

    • 要复制的工作表名称

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

EXCEL_MCP_PAGING_CELLS_LIMIT

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

执照

版权所有 (c) 2025 根戈罗一树

excel-mcp-server 根据MIT 许可证发布

Available Tools

6 tools
excel_copy_sheetB
Destructive

Copy existing sheet to a new sheet

Inputs: dstSheetName (required), fileAbsolutePath (required), srcSheetName (required).

excel_create_tableA
Destructive

Create a table in the Excel sheet

Inputs: fileAbsolutePath (required), sheetName (required), tableName (required), range.

excel_describe_sheetsB
Destructive

List all sheet information of specified Excel file

Inputs: fileAbsolutePath (required).

excel_format_rangeB
Destructive

Format cells in the Excel sheet with style information

Inputs: fileAbsolutePath (required), range (required), sheetName (required), styles (required).

excel_read_sheetB
Destructive

Read values from Excel sheet with pagination.

Inputs: fileAbsolutePath (required), sheetName (required), range, showFormula, +1 more.

excel_write_to_sheetC
Destructive

Write values to the Excel sheet

Inputs: fileAbsolutePath (required), newSheet (required), range (required), sheetName (required), +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific Excel operations: copying sheets, creating tables, describing sheets, formatting ranges, reading data, and writing data. There is no overlap or ambiguity between these functions, making tool selection straightforward for an agent.

    Naming Consistency5/5

    All tool names follow a consistent 'excel_verb_noun' pattern (e.g., excel_copy_sheet, excel_create_table), using snake_case throughout. This predictable naming convention enhances readability and reduces cognitive load for agents.

    Tool Count4/5

    With 6 tools, the server is well-scoped for basic Excel operations, covering key tasks like reading, writing, formatting, and sheet management. It could benefit from additional tools for advanced features (e.g., formulas, charts), but the current set is reasonable and focused.

    Completeness4/5

    The tools provide solid coverage for core Excel workflows: reading and writing data, sheet management, formatting, and table creation. Minor gaps exist, such as lacking tools for formulas, charts, or cell manipulation (e.g., delete, merge), but agents can handle common tasks effectively with this surface.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server designed for AI assistants to directly process spreadsheet files, enabling them to read, display, modify, and save various table formats like CSV and Excel.
      3
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI agents to freely operate Excel spreadsheets, providing tools for workbook creation, cell manipulation, formatting, formula handling, and data export.
      11
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to automate Microsoft Excel tasks such as reading/writing cells, formatting, creating charts, and managing sheets through natural language using the Model Context Protocol.
      1
      Apache 2.0