Skip to main content
Glama
softgridinc-pte-ltd

Excel Reader Server

Excel 阅读器服务器

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

特征

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

  • 按名称读取特定工作表中的内容

  • 通过索引读取特定工作表中的内容

  • 以 JSON 格式返回数据

  • 处理空单元格和数据类型转换

Related MCP server: OpenPyXL MCP Server

安装

需要 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 请求。

Available Tools

3 tools
read_excelC

Read content from Excel (xlsx) files

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the Excel file

TDQS

C2.9/5.0
Behavior2/5

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 states it reads content but doesn't specify what content is read (e.g., all sheets, default sheet, or entire file), how errors are handled, or any constraints like file size limits. This leaves significant behavioral gaps for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core action and resource, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and siblings that suggest more specific functionality, the description is incomplete. It doesn't clarify the scope of reading (e.g., all sheets vs. a default), output format, or how it differs from siblings, leaving the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'file_path' clearly documented. The description adds no additional parameter semantics beyond the schema, such as file format details or path examples. Given the high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Read content') and resource ('from Excel (xlsx) files'), making the purpose understandable. However, it doesn't explicitly differentiate from its siblings (read_excel_by_sheet_index and read_excel_by_sheet_name), which likely offer more specific reading options.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 its siblings or any alternatives. It lacks context about scenarios where this general read operation is preferred over sheet-specific reads, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_excel_by_sheet_indexA

Read content from a specific sheet by index in Excel (xlsx) files. Reads first sheet (index 0) if sheet_index not provided.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the Excel file
sheet_indexNoIndex of the sheet to read (optional, defaults to 0)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the default behavior (reads first sheet if sheet_index not provided), which is useful. However, it lacks details on error handling (e.g., invalid file paths or indices), output format, or performance considerations like file size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose, default behavior, and key distinction. Every word serves a purpose with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is adequate for a simple read operation but incomplete. It covers the basic functionality and default, but lacks details on return values, error cases, or constraints like supported Excel versions, which would be helpful for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds minimal value beyond the schema by mentioning the default for sheet_index, but does not provide additional context like file format restrictions (xlsx only) or practical usage examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Read content'), resource ('from a specific sheet by index in Excel files'), and distinguishes from siblings by specifying 'by index' (vs. by name or general read). It explicitly mentions the default behavior for sheet_index.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool (reading by sheet index) and implies alternatives through sibling tool names (read_excel_by_sheet_name for name-based reading). However, it does not explicitly state when NOT to use this tool or compare it directly to read_excel.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_excel_by_sheet_nameA

Read content from a specific sheet by name in Excel (xlsx) files. Reads first sheet if sheet_name not provided.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to the Excel file
sheet_nameNoName of the sheet to read (optional, defaults to first sheet)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the read operation and default behavior, but lacks details on error handling (e.g., if sheet_name doesn't exist), performance considerations, or output format. It adequately describes the core behavior but misses advanced behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, consisting of two concise sentences that directly state the purpose and default behavior without any wasted words. Every sentence earns its place by providing essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (reading Excel files with optional parameters), no annotations, and no output schema, the description is minimally complete. It covers the basic operation but lacks details on output structure, error handling, or file format constraints, leaving gaps for an agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters fully. The description adds no additional meaning beyond what the schema provides, such as examples or edge cases. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Read content'), resource ('from a specific sheet by name in Excel files'), and scope ('first sheet if sheet_name not provided'). It distinguishes from sibling tools by specifying it reads by sheet name rather than by index or general reading.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool (to read a specific sheet by name) and includes a default behavior (reads first sheet if sheet_name not provided). However, it does not explicitly mention when to use alternatives like read_excel_by_sheet_index or read_excel, nor does it provide exclusion criteria.

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. 3 tool updates
    • First observedread_excel
    • First observedread_excel_by_sheet_index
    • First observedread_excel_by_sheet_name

TDQS

B3.2/5.0

Scored across 3 tools

Disambiguation2/5

The tools have significant overlap in purpose, as all three are focused on reading Excel files, with only minor variations in how they specify the sheet. An agent might easily confuse them or struggle to choose the right one for a given task, since the distinctions are subtle and not clearly differentiated in the descriptions.

Naming Consistency5/5

The tool names follow a consistent verb_noun pattern with 'read_excel' as the base, and suffixes like '_by_sheet_index' and '_by_sheet_name' that clearly indicate the specific functionality. This makes the naming predictable and easy to understand across the set.

Tool Count3/5

With only 3 tools, the server feels thin for a domain like Excel reading, which might benefit from additional operations such as writing, listing sheets, or handling different file formats. However, the count is not extreme and could be considered borderline for basic functionality.

Completeness2/5

The tool set is severely incomplete for an Excel server, as it only covers reading operations and lacks any writing, updating, or other common Excel functionalities like formatting, formula evaluation, or metadata access. This will likely cause agent failures when more comprehensive tasks are required.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A 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.
    19
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for reading and writing Excel (xlsx) files using SheetJS, providing tools to list sheets, read data, create files, add sheets, and update cells.
    5
    24 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for reading and inspecting local Excel files (.xlsx, .xlsm, .xls, .xlsb, .ods) with tools for inspecting metadata, reading ranges, and profiling structure.
    3
    7 npm
    MIT