excel-mcp-server logo

Excel MCP Server

by haris-musa

7 forks
38 stars
Free

What is excel-mcp-server

excel-mcp-server is an innovative server implementation developed by haris-musa, designed to provide comprehensive Excel file manipulation capabilities without the need for Microsoft Excel installation. Utilizing the Model Context Protocol (MCP), this server allows users to create, manipulate, and format Excel workbooks. It offers advanced features such as charts and pivot tables, all while maintaining ease of use and integration.

How to Use excel-mcp-server

To get started with excel-mcp-server, ensure you have the following requirements:

  • Python 3.10+
  • MCP SDK 1.2.0+
  • OpenPyXL 3.1.2+

Environment Configuration

Before starting the server, configure the environment by setting the directory where Excel files will be stored. This is done through the EXCEL_FILES_PATH environment variable, with a default path of ./excel_files. Here’s how you can set it:

  • Windows CMD:

    set EXCEL_FILES_PATH=C:\path\to\excel\files
    uv run excel-mcp-server
    
  • Windows PowerShell:

    $env:EXCEL_FILES_PATH="C:\path\to\excel\files"
    uv run excel-mcp-server
    
  • Linux/MacOS:

    export EXCEL_FILES_PATH=/path/to/excel/files
    uv run excel-mcp-server
    

Starting the Server

To start the server, execute the following command:

uv run excel-mcp-server

Once started, it operates in SSE mode, ready to accept connections from MCP clients. You can connect to this server using tools like Cursor IDE at the endpoint: http://localhost:8000/sse.

Key Features of excel-mcp-server

  • Full Excel Support: Offers complete Excel functionality, allowing for detailed workbook and worksheet management.
  • Data Manipulation: Easily read, write, and transform data with seamless integration into workflows.
  • Advanced Features: Includes support for creating charts, pivot tables, and applying complex formatting styles.
  • Error Handling: Provides robust error handling with clear and informative messages to help troubleshoot issues effectively.

Resources and Tools

The server leverages OpenPyXL to perform various Excel operations, such as:

  • Creating and modifying workbooks
  • Managing worksheets and cell ranges
  • Applying styles and formatting
  • Generating charts and pivot tables

For a comprehensive understanding of the tools available, including their parameters and usage, refer to the included documentation in the server package.

excel-mcp-server is a powerful tool for anyone needing to manipulate Excel files programmatically, offering a broad array of features without the need for Excel software. Its integration with MCP makes it particularly suitable for AI-driven applications and environments, providing a secure and efficient way to handle Excel data.

How to Use

To use the excel-mcp-server, follow these steps:

  1. Visit https://github.com/haris-...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using excel-mcp-server capabilities within your Claude conversations

Additional Information

Created

March 12, 2025

Company

haris-musa

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More