OpenPyXL Excel MCP server

Enables Excel file interaction with capabilities for retrieving cell values, searching ranges, examining formatting and formulas, and listing worksheet information for data analysis workflows.
Back to servers
Setup instructions
Provider
Jonas Neubert
Release date
Mar 17, 2025
Language
Python
Stats
14 stars

This MCP server provides a streamlined way to interact with Excel files via Claude and other MCP clients by wrapping OpenPyXl functionality. It enables AI assistants to read and analyze Excel spreadsheet data directly.

Installation

Download and Setup

  1. Download the appropriate executable from the releases page:

    • openpyxl_mcp_server for MacOS
    • openpyxl_mcp_server.exe for Windows
  2. For MacOS users, make the file executable:

    chmod a+x /path/to/openpyxl_mcp_server
    
  3. Windows users may need to bypass security warnings by clicking "Keep" or "Keep anyway" when downloading.

Configuring Claude Desktop

  1. Install the Claude Desktop app if you haven't already.

  2. Open Claude Desktop and navigate to "Settings..." → "Developer" section.

  3. Click "Edit Config" to create or modify the configuration file.

  4. For MacOS, add the following to your claude_desktop_config.json (replace <YOUR-USERNAME> with your actual username):

    {
      "mcpServers": {
        "inspect_excel_xlsx_file": {
          "command": "/Users/<YOUR-USERNAME>/Downloads/openpyxl_mcp_server",
          "args": []
        }
      }
    }
    
  5. For Windows, add this configuration (replace <YOUR-USERNAME> with your actual username):

    {
      "mcpServers": {
        "inspect_excel_xlsx_file": {
          "command": "C:\\Users\\<YOUR-USERNAME>\\Downloads\\openpyxl_mcp_server.exe",
          "args": []
        }
      }
    }
    
  6. Restart Claude completely:

    • On Windows: Right-click the Claude icon in the system tray and select "Quit"
    • On macOS: Use Command+Q to quit the application

Using the MCP Server

Once configured, you can interact with Excel files by referencing them in your prompts to Claude. Here are some example use cases:

Analyzing Data from Excel Files

You can ask Claude to analyze Excel files by referencing their file path in your prompt:

I have an Excel file in ~/Downloads/mydata.xlsx. Can you tell me what information is contained in it?

Example Usage Scenarios

  1. Data Analysis: Ask Claude to extract insights from financial or statistical data:

    Using the Excel file at ~/Documents/financial_report.xlsx, what were our top expenses last quarter?
    
  2. Form Assistance: Get help with filling out Excel forms:

    I need to fill out the form in ~/Downloads/tax_form.xlsx. Where do I need to enter my business expenses?
    
  3. Data Extraction: Extract specific information from complex spreadsheets:

    In the file ~/Projects/inventory.xlsx, how many products are currently out of stock?
    
  4. Comparative Analysis: Compare data across different sheets or sections:

    Looking at ~/Data/sales_2023.xlsx, how do the Q1 sales compare to Q2 sales across all regions?
    

Configuring Other MCP Clients

The MCP server can be integrated with several other tools that support the Model Context Protocol:

Refer to each tool's documentation for specific configuration instructions.

Troubleshooting

If you encounter issues:

  • Ensure the file path is correctly specified in your prompts
  • Verify the MCP server is properly configured in your client
  • Check that you've fully restarted the Claude app after configuration changes
  • Consult Anthropic's user documentation for additional guidance

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "inspect_excel_xlsx_file" '{"command":"openpyxl_mcp_server","args":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "inspect_excel_xlsx_file": {
            "command": "openpyxl_mcp_server",
            "args": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "inspect_excel_xlsx_file": {
            "command": "openpyxl_mcp_server",
            "args": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later