Excel 阅读器服务器
提供读取 Excel (xlsx) 文件工具的模型上下文协议 (MCP) 服务器。
特征
读取 Excel 文件中所有工作表的内容
按名称读取特定工作表中的内容
通过索引读取特定工作表中的内容
以 JSON 格式返回数据
处理空单元格和数据类型转换
安装
需要 Python 3.10 或更高版本。
依赖项
mcp >= 1.2.1
openpyxl >= 3.1.5
用法
该服务器提供三个主要工具:
1. 读取 Excel
读取 Excel 文件中所有工作表的内容。
2. 通过工作表名称读取 Excel
根据名称从特定工作表读取内容。如果未提供工作表名称,则读取第一个工作表。
3. 通过工作表索引读取 Excel
根据索引从特定工作表读取内容。如果未提供索引,则读取第一个工作表(索引 0)。
响应格式
服务器返回以下JSON格式的数据:
每个工作表都表示为顶级对象中的一个键
工作表数据是一个数组数组,其中每个内部数组代表一行
所有值都转换为字符串
空单元格表示为空字符串
错误处理
服务器针对常见问题提供了清晰的错误消息:
未找到文件
工作表名称无效
索引超出范围
常见 Excel 文件读取错误
执照
本项目遵循 Apache 2 许可证。详情请参阅许可证文件。
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议 (MCP) 服务器提供读取 Excel (xlsx) 文件的工具,可以从整个工作簿或特定工作表中提取数据,并以结构化 JSON 格式返回结果。
Related Resources
Related MCP Servers
- -securityAlicense-qualityA thin wrapper around the OpenPyXl Python library that exposes Excel file operations as a Model Context Protocol (MCP) server, allowing Claude and other MCP clients to fetch and analyze data from Excel files.Last updated -15MIT License
- AsecurityFlicenseAqualityAn 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 -870
- -securityFlicense-qualityA Model Context Protocol server that provides tools for reading, updating, filtering, and visualizing Excel data through a simple API.Last updated -
- AsecurityFlicenseAqualityA Model Context Protocol server that enables reading and analyzing Excel documents with features like flexible data access, multiple output formats, and advanced analysis capabilities.Last updated -2