Cover image
Try Now
2025-04-02

基于ModelContextProtocol的MS Excel服务器

3 years

Works with Finder

3

Github Watches

3

Github Forks

3

Github Stars

Excel Reader Server

A Model Context Protocol (MCP) server that provides tools for reading Excel (xlsx) files.

Excel Reader Server MCP server

Features

  • Read content from all sheets in an Excel file
  • Read content from a specific sheet by name
  • Read content from a specific sheet by index
  • Returns data in JSON format
  • Handles empty cells and data type conversions

Installation

Requires Python 3.10 or higher.

# Using pip
pip install excel-reader-server

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

Dependencies

  • mcp >= 1.2.1
  • openpyxl >= 3.1.5

Usage

The server provides three main tools:

1. read_excel

Reads content from all sheets in an Excel file.

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

2. read_excel_by_sheet_name

Reads content from a specific sheet by name. If no sheet name is provided, reads the first sheet.

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

3. read_excel_by_sheet_index

Reads content from a specific sheet by index. If no index is provided, reads the first sheet (index 0).

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

Response Format

The server returns data in the following JSON format:

{
  "Sheet1": [
    ["Header1", "Header2", "Header3"],
    ["Value1", "Value2", "Value3"],
    ["Value4", "Value5", "Value6"]
  ]
}
  • Each sheet is represented as a key in the top-level object
  • Sheet data is an array of arrays, where each inner array represents a row
  • All values are converted to strings
  • Empty cells are represented as empty strings

Error Handling

The server provides clear error messages for common issues:

  • File not found
  • Invalid sheet name
  • Index out of range
  • General Excel file reading errors

License

This project is released under the Apache 2 License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    1 (1)
    Avatar
    user_brUIVSmV
    2025-04-16

    I've been using the Remote MCP Server on Cloudflare by easy-apis, and it's been a game-changer. It simplifies managing my applications and ensures top-notch security and performance. Highly recommend it for anyone looking for a reliable server solution. Check it out here: [https://mcp.so/server/remote-mcp-server/easy-apis](https://mcp.so/server/remote-mcp-server/easy-apis).