Skip to main content
Glama

Excel Reader Server

Excel 阅读器服务器

提供读取 Excel (xlsx) 文件工具的模型上下文协议 (MCP) 服务器。

特征

  • 读取 Excel 文件中所有工作表的内容
  • 按名称读取特定工作表中的内容
  • 通过索引读取特定工作表中的内容
  • 以 JSON 格式返回数据
  • 处理空单元格和数据类型转换

安装

需要 Python 3.10 或更高版本。

# Using pip pip install excel-reader-server # Using uv (recommended) uv pip install excel-reader-server

依赖项

  • mcp >= 1.2.1
  • openpyxl >= 3.1.5

用法

该服务器提供三个主要工具:

1. 读取 Excel

读取 Excel 文件中所有工作表的内容。

{ "file_path": "path/to/your/excel/file.xlsx" }

2. 通过工作表名称读取 Excel

根据名称从特定工作表读取内容。如果未提供工作表名称,则读取第一个工作表。

{ "file_path": "path/to/your/excel/file.xlsx", "sheet_name": "Sheet1" # optional }

3. 通过工作表索引读取 Excel

根据索引从特定工作表读取内容。如果未提供索引,则读取第一个工作表(索引 0)。

{ "file_path": "path/to/your/excel/file.xlsx", "sheet_index": 0 # optional }

响应格式

服务器返回以下JSON格式的数据:

{ "Sheet1": [ ["Header1", "Header2", "Header3"], ["Value1", "Value2", "Value3"], ["Value4", "Value5", "Value6"] ] }
  • 每个工作表都表示为顶级对象中的一个键
  • 工作表数据是一个数组数组,其中每个内部数组代表一行
  • 所有值都转换为字符串
  • 空单元格表示为空字符串

错误处理

服务器针对常见问题提供了清晰的错误消息:

  • 未找到文件
  • 工作表名称无效
  • 索引超出范围
  • 常见 Excel 文件读取错误

执照

本项目遵循 Apache 2 许可证。详情请参阅许可证文件。

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议 (MCP) 服务器提供读取 Excel (xlsx) 文件的工具,可以从整个工作簿或特定工作表中提取数据,并以结构化 JSON 格式返回结果。

  1. 特征
    1. 安装
      1. 依赖项
        1. 用法
          1. 读取 Excel
          2. 通过工作表名称读取 Excel
          3. 通过工作表索引读取 Excel
        2. 响应格式
          1. 错误处理
            1. 执照
              1. 贡献

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.
                  Last updated -
                  5,299
                  272
                  Go
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol (MCP) server that allows AI models to safely access and interact with local file systems, enabling reading file contents, listing directories, and retrieving file metadata.
                  Last updated -
                  47
                  1
                  JavaScript
                  MIT License
                  • Linux
                • A
                  security
                  F
                  license
                  A
                  quality
                  An MCP server that provides comprehensive Excel file operations, data analysis, and visualization capabilities for working with various spreadsheet formats like XLSX, CSV, and JSON.
                  Last updated -
                  8
                  36
                  Python
                • A
                  security
                  F
                  license
                  A
                  quality
                  An MCP server that allows searching for and retrieving information about Model Context Protocol servers registered on the MCP Hub.
                  Last updated -
                  1
                  JavaScript
                  • Apple
                  • Linux

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/softgridinc-pte-ltd/mcp-excel-reader-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server