Skip to main content

xlsx MCP Server

一个基于 FastMCP 和 Openpyxl 实现的 Excel MCP 服务器,提供了一系列操作 Excel 文件的工具,可以被 LLM 应用程序调用。

功能特性

  • 读取 Excel 文件数据
  • 写入数据到 Excel 文件
  • 创建新的 Excel 文件
  • 获取 Excel 文件的元数据

运行服务器

服务器将通过 stdio 启动。

{
    "mcpServers":{
        "xlsxServer":{
         "cmd": "uvx",
         "args": [
            "xlsx_mcp_server"
        ]
        }
    }
}

可用工具

1. open_workbook

打开一个已有的 Excel 文件。

参数:

  • workbook_id: 工作簿ID
  • file_path: Excel 文件路径

返回:

  • 操作结果

2. create_workbook

创建一个新的 Excel 工作簿。

参数:

  • workbook_id: 工作簿ID
  • sheets: 工作表名称列表(可选)

返回:

  • 操作结果

3. list_sheets

列出工作簿中的所有工作表。

参数:

  • workbook_id: 工作簿ID

返回:

  • 工作表名称列表

4. read_cell

读取指定单元格的值。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称
  • cell: 单元格地址(如 "A1")

返回:

  • 单元格的值

5. write_cell

写入数据到指定单元格。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称
  • cell: 单元格地址
  • value: 要写入的值

返回:

  • 操作结果

6. read_range

读取指定范围的单元格数据。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称
  • start_cell: 起始单元格地址
  • end_cell: 结束单元格地址(可选)

返回:

  • 范围数据

7. write_dataframe

将数据框写入工作表。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称
  • data: 数据框(字典列表)
  • start_cell: 起始单元格地址(默认为 "A1")

返回:

  • 操作结果

8. create_sheet

创建新的工作表。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称

返回:

  • 操作结果

9. delete_sheet

删除工作表。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称

返回:

  • 操作结果

10. save_workbook_file

保存工作簿到文件。

参数:

  • workbook_id: 工作簿ID
  • file_path: 文件路径

返回:

  • 操作结果

11. close_workbook

关闭工作簿并从缓存中移除。

参数:

  • workbook_id: 工作簿ID

返回:

  • 操作结果

12. list_workbooks

列出所有已打开的工作簿。

参数: 无

返回:

  • 工作簿ID列表

13. get_sheet_info

获取工作表信息。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称

返回:

  • 工作表信息

14. set_formula

设置单元格公式。

参数:

  • workbook_id: 工作簿ID
  • sheet_name: 工作表名称
  • cell: 单元格地址
  • formula: 公式字符串

返回:

  • 操作结果

技术栈

  • FastMCP: 用于构建 MCP 服务器
  • Openpyxl: 用于操作 Excel 文件

Metadata

Release files for xlsx-mcp-server 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlsx-mcp-server 0.1.1
File Size Uploaded Provenance
xlsx_mcp_server-0.1.1.tar.gz 48.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xlsx-mcp-server 0.1.1
File Interpreter ABI Platform
xlsx_mcp_server-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 53.8 kB

Release files / xlsx_mcp_server-0.1.1.tar.gz

Download URL xlsx_mcp_server-0.1.1.tar.gz
Size 48.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8a583c32f5ff63c2d8f0aed92a182564b2b798bc6cc3ac434825b662f6a1059f
BLAKE2b-256 checksum
How to use checksums
b3cefa772f8e262f32c4de5e5f48911ee5d2bd77efb83f740452aaed60f56c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / xlsx_mcp_server-0.1.1-py3-none-any.whl

Download URL xlsx_mcp_server-0.1.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ab2561292c017ebdd243a5b5c5a23bcf9fefaeaa24f804fa60d56a1bb2b7b6f
BLAKE2b-256 checksum
How to use checksums
6ff273d931ddeb2c9287977e0c4395b2ec3a714b079f418f38b5c9d990a8287d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for xlsx-mcp-server 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page