mcp_excel_server
MCP Excel Server — A Python-based Model Context Protocol (MCP) server using openpyxl to enable LLMs and agents to interact with Excel files: create workbooks, read/write sheets and cell ranges, apply formulas, take screenshots (Windows), and more. Features fully automatic tool registration via decorators and seamless integration with AI workflows
claude mcp add --transport stdio bassem-elsodany-mcp_excel_server python -m mcp_excel_server
How to use
The MCP Excel Server exposes a set of workbook, worksheet, and range operations as MCP tools. Clients can connect to this MCP server to automate common Excel file tasks through a structured, language-agnostic interface. Core capabilities include creating and listing workbooks, reading and writing data to cells and ranges, and managing worksheets (create, delete, rename, copy, move, and retrieve information). This enables an agent or client to orchestrate Excel workflows, such as importing data from external sources, transforming it within Excel, and saving results back to disk, all via standardized tool calls.
To use the server, connect via MCP client tooling and invoke the available tools by name. For example, you can call create_workbook with a target filename and an initial sheet, read_workbook_data to fetch sheet contents, and write_workbook_data to populate a sheet with structured data. The API signatures are exposed as documented under each tool, including required arguments like filepath, sheet_name, and data. You can chain these tools to automate end-to-end Excel processing tasks, such as building a report workbook from multiple sources, updating ranges, and reorganizing worksheets programmatically.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Access to install Python packages (pip)
Installation steps:
-
Create a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # on macOS/Linux venv\Scripts\activate # on Windows
-
Install dependencies. This project uses openpyxl for Excel manipulation. If a requirements.txt is provided, install with: pip install -r requirements.txt
If not, install openpyxl directly:
pip install openpyxl
-
Install the MCP server package (if distributed via PyPI): pip install mcp-excel-server # or the appropriate package name used by the project
-
Run the MCP Excel Server:
Example using the module entry point
python -m mcp_excel_server
-
Verify the server is running and reachable by your MCP client tooling. If you maintain a local configuration, ensure the server host/port match your client settings.
Additional notes
Tips and common issues:
- Ensure Python environment has write access to the directory containing or intended for Excel workbooks.
- The server relies on openpyxl; ensure the target Excel files are not open in another application during read/write operations to avoid-file locking errors.
- When using write operations, provide explicit start_cell values to control where data is inserted; omitting it may append data to the end of the sheet.
- If you run into module import errors, verify that the mcp_excel_server module is installed in the active Python environment and that your PYTHONPATH includes the project location.
- For large workbooks, consider reading or writing data in slices (start_cell/end_cell) to manage memory usage.
- Ensure the MCP client and server share a compatible MCP version to avoid protocol negotiation issues.
Related MCP Servers
google_ads_mcp
The Google Ads MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models (LLMs), such as Gemini, to interact directly with the Google Ads API.
snippy
🧩 Build AI-powered MCP Tools with Azure Functions, Durable Agents & Cosmos vector search. Features orchestrated multi-agent workflows using OpenAI.
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.
AI-SOC-Agent
Blackhat 2025 presentation and codebase: AI SOC agent & MCP server for automated security investigation, alert triage, and incident response. Integrates with ELK, IRIS, and other platforms.
ultrasync
MCP server from darvid/ultrasync
MCP-Mathematics
A comprehensive Model Context Protocol (MCP) server that turns any AI assistant into a powerful mathematical computation engine.