MCP Excel 阅读器
一个模型上下文协议 (MCP) 服务器,用于读取 Excel 文件,并支持自动分块和分页。该工具基于 SheetJS 和 TypeScript 构建,可自动将大型 Excel 文件拆分为易于管理的块,从而帮助您高效地处理这些文件。
特征
- 📊 读取具有自动大小限制的 Excel 文件(.xlsx、.xls)
- 🔄 大型数据集的自动分块
- 📑 工作表选择和行分页
- 📅 正确的日期处理
- ⚡ 针对大文件进行了优化
- 🛡️ 错误处理和验证
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Excel Reader:
作为 MCP 服务器
- 全局安装:
- 添加到您的 MCP 设置文件(通常在
~/.config/claude/settings.json
或同等位置):
为了发展
- 克隆存储库:
- 安装依赖项:
- 构建项目:
用法
用法
Excel 阅读器提供了一个单独的工具read_excel
,其参数如下:
基本用法
与 Claude 或其他 MCP 兼容 AI 一起使用时:
人工智能将使用该工具读取文件,自动处理大文件的分块。
特征
- 自动分块
- 自动将大文件分割成可管理的块
- 默认块大小为 100KB
- 提供分页元数据
- 工作表选择
- 按名称阅读特定工作表
- 如果未指定,则默认为第一张表
- 行分页
- 使用 startRow 和 maxRows 控制要读取哪些行
- 获取下一个块信息以进行连续读取
- 错误处理
- 验证文件存在和格式
- 提供清晰的错误信息
- 优雅地处理格式错误的 Excel 文件
使用 SheetJS 功能进行扩展
Excel 阅读器基于 SheetJS 构建,并可通过其强大的功能进行扩展:
可用扩展
- 公式处理
- 单元格格式
- 数据验证
- 图纸特征
- 合并单元格:
worksheet['!merges']
- 隐藏行/列:
worksheet['!rows']
,worksheet['!cols']
- 工作表保护:
worksheet['!protect']
- 合并单元格:
有关更多功能和详细文档,请访问SheetJS 文档。
贡献
- 分叉存储库
- 创建你的功能分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add some amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
通过自动分块和分页提供对大型 Excel 文件的有效处理,使用 MCP 实现无缝文件读取和管理功能,例如工作表选择和错误处理。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that intelligently chunks large documents for Claude, enabling efficient context-aware processing and summary generation for enhanced document comprehension.Last updated -12JavaScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides tools for reading Excel (xlsx) files, enabling extraction of data from entire workbooks or specific sheets with results returned in structured JSON format.Last updated -35PythonApache 2.0
- AsecurityAlicenseAqualityEnables seamless reading, writing, and analyzing of Excel files through Model Context Protocol, with features for worksheet management, structure analysis, and automated caching.Last updated -821211TypeScriptMIT 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 -836Python