MCP Excel Reader
MCP Excel 阅读器
一个模型上下文协议 (MCP) 服务器,用于读取 Excel 文件,并支持自动分块和分页。该工具基于 SheetJS 和 TypeScript 构建,可自动将大型 Excel 文件拆分为易于管理的块,从而帮助您高效地处理这些文件。
特征
📊 读取具有自动大小限制的 Excel 文件(.xlsx、.xls)
🔄 大型数据集的自动分块
📑 工作表选择和行分页
📅 正确的日期处理
⚡ 针对大文件进行了优化
🛡️ 错误处理和验证
Related MCP server: Excel MCP Server
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Excel Reader:
npx -y @smithery/cli install @ArchimedesCrypto/excel-reader-mcp-chunked --client claude作为 MCP 服务器
全局安装:
npm install -g @archimdescrypto/excel-reader添加到您的 MCP 设置文件(通常在
~/.config/claude/settings.json或同等位置):
{
"mcpServers": {
"excel-reader": {
"command": "excel-reader",
"env": {}
}
}
}为了发展
克隆存储库:
git clone https://github.com/ArchimdesCrypto/mcp-excel-reader.git
cd mcp-excel-reader安装依赖项:
npm install构建项目:
npm run build用法
用法
Excel 阅读器提供了一个单独的工具read_excel ,其参数如下:
interface ReadExcelArgs {
filePath: string; // Path to Excel file
sheetName?: string; // Optional sheet name (defaults to first sheet)
startRow?: number; // Optional starting row for pagination
maxRows?: number; // Optional maximum rows to read
}
// Response format
interface ExcelResponse {
fileName: string;
totalSheets: number;
currentSheet: {
name: string;
totalRows: number;
totalColumns: number;
chunk: {
rowStart: number;
rowEnd: number;
columns: string[];
data: Record<string, any>[];
};
hasMore: boolean;
nextChunk?: {
rowStart: number;
columns: string[];
};
};
}基本用法
与 Claude 或其他 MCP 兼容 AI 一起使用时:
Read the Excel file at path/to/file.xlsx人工智能将使用该工具读取文件,自动处理大文件的分块。
特征
自动分块
自动将大文件分割成可管理的块
默认块大小为 100KB
提供分页元数据
工作表选择
按名称阅读特定工作表
如果未指定,则默认为第一张表
行分页
使用 startRow 和 maxRows 控制要读取哪些行
获取下一个块信息以进行连续读取
错误处理
验证文件存在和格式
提供清晰的错误信息
优雅地处理格式错误的 Excel 文件
使用 SheetJS 功能进行扩展
Excel 阅读器基于 SheetJS 构建,并可通过其强大的功能进行扩展:
可用扩展
公式处理
// Enable formula parsing const wb = XLSX.read(data, { cellFormula: true, cellNF: true });单元格格式
// Access cell styles and formatting const styles = Object.keys(worksheet) .filter(key => key[0] !== '!') .map(key => ({ cell: key, style: worksheet[key].s }));数据验证
// Access data validation rules const validation = worksheet['!dataValidation'];图纸特征
合并单元格:
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文件。
致谢
Available Tools
1 toolread_excelB
Read an Excel file and return its contents as structured data
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the Excel file to read | |
| sheetName | No | Name of the sheet to read (optional) | |
| startRow | No | Starting row index (optional) | |
| maxRows | No | Maximum number of rows to read (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions reading and returning data, implying a read-only operation, but fails to address critical aspects like error handling (e.g., what happens if the file doesn't exist or is corrupted), performance considerations, or format specifics of the returned structured data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits and output format, which are important for a data-reading tool without structured output documentation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds no additional meaning beyond what the schema provides, such as examples or usage tips for the parameters, meeting the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Read') and resource ('an Excel file') with the outcome ('return its contents as structured data'). It's specific about what the tool does, but since there are no sibling tools mentioned, it cannot demonstrate differentiation from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It simply states what the tool does without context for usage decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
read_excel
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'read_excel' has a clear and distinct purpose that cannot be confused with any other tool in the set.
The single tool name 'read_excel' follows a clear verb_noun pattern. Since there is only one tool, consistency is inherently perfect with no deviations or mixed conventions to evaluate.
A single tool is generally too few for a server named 'MCP Excel Reader', as it suggests a limited scope that may not support typical Excel-related workflows like writing, updating, or querying data. This feels thin for the apparent domain.
The tool surface is severely incomplete for an Excel reader domain. While reading is covered, there are significant gaps such as writing, editing, formatting, or analyzing Excel files, which will likely cause agent failures in broader tasks.
Maintenance
Related MCP Connectors
GrapeCity Software MCP for GcExcel docs, examples, and product assistance.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading and searching Excel files through MCP-compatible clients. Provides tools to retrieve workbook metadata, read sheet contents, and search across all sheets using absolute file paths.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables reading and writing Excel files (text, formulas, and images on Windows) via MCP tools with pagination support.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for reading and writing .xls (Excel 97-2003) files, enabling data manipulation, sheet listing, and metadata retrieval.MIT
- AlicenseAqualityCmaintenanceMCP server for reading and inspecting local Excel files (.xlsx, .xlsm, .xls, .xlsb, .ods) with tools for inspecting metadata, reading ranges, and profiling structure.35 npmMIT