mcp excel reader server
A 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.
A 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.
A Model Context Protocol (MCP) server that provides tools for reading Excel (xlsx) files.
Requires Python 3.10 or higher.
# Using pip
pip install excel-reader-server
# Using uv (recommended)
uv pip install excel-reader-server
The server provides three main tools:
Reads content from all sheets in an Excel file.
{
"file_path": "path/to/your/excel/file.xlsx"
}
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
}
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
}
The server returns data in the following JSON format:
{
"Sheet1": [
["Header1", "Header2", "Header3"],
["Value1", "Value2", "Value3"],
["Value4", "Value5", "Value6"]
]
}
The server provides clear error messages for common issues: - File not found - Invalid sheet name - Index out of range - General Excel file reading errors
This project is released under the Apache 2 License. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
[
{
"description": "Read content from Excel (xlsx) files",
"inputSchema": {
"properties": {
"file_path": {
"description": "Path to the Excel file",
"type": "string"
}
},
"required": [
"file_path"
],
"type": "object"
},
"name": "read_excel"
},
{
"description": "Read content from a specific sheet by name in Excel (xlsx) files. Reads first sheet if sheet_name not provided.",
"inputSchema": {
"properties": {
"file_path": {
"description": "Path to the Excel file",
"type": "string"
},
"sheet_name": {
"description": "Name of the sheet to read (optional, defaults to first sheet)",
"type": "string"
}
},
"required": [
"file_path"
],
"type": "object"
},
"name": "read_excel_by_sheet_name"
},
{
"description": "Read content from a specific sheet by index in Excel (xlsx) files. Reads first sheet (index 0) if sheet_index not provided.",
"inputSchema": {
"properties": {
"file_path": {
"description": "Path to the Excel file",
"type": "string"
},
"sheet_index": {
"description": "Index of the sheet to read (optional, defaults to 0)",
"minimum": 0,
"type": "integer"
}
},
"required": [
"file_path"
],
"type": "object"
},
"name": "read_excel_by_sheet_index"
}
]