这是一个提供读取Excel(xlsx)文件工具的模型上下文协议(MCP)服务器。
<a href="https://glama.ai/mcp/servers/kniyyx0gej"> <img width="380" height="200" src="https://gips1.baidu.com/it/u=4031817176,1610123588&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Excel Reader Server MCP服务器" /> </a>需要Python 3.10或更高版本。
# 使用pip
pip install excel-reader-server
# 使用uv(推荐)
uv pip install excel-reader-server
该服务器提供了三个主要工具:
从Excel文件的所有工作表中读取内容。
{
"file_path": "path/to/your/excel/file.xlsx"
}
根据名称从特定的工作表中读取内容。如果没有提供工作表名称,则读取第一个工作表。
{
"file_path": "path/to/your/excel/file.xlsx",
"sheet_name": "Sheet1" # 可选
}
根据索引从特定的工作表中读取内容。如果没有提供索引,则读取第一个工作表(索引0)。
{
"file_path": "path/to/your/excel/file.xlsx",
"sheet_index": 0 # 可选
}
服务器以以下JSON格式返回数据:
{
"Sheet1": [
["Header1", "Header2", "Header3"],
["Value1", "Value2", "Value3"],
["Value4", "Value5", "Value6"]
]
}
服务器为常见问题提供清晰的错误消息:
本项目发布在Apache 2许可下。详情见LICENSE文件。
欢迎贡献!请随时提交Pull Request。