Excel File Manipulation MCP server

Enables Excel file manipulation without Microsoft Excel installation using openpyxl, providing workbook operations, data validation detection, formatting, formulas, charts, pivot tables, and native Excel table support for automating spreadsheet workflows and report generation.
Back to servers
Setup instructions
Provider
Haris Musa
Release date
Feb 12, 2025
Language
Python
Stats
1.8K stars

The Excel MCP Server is a powerful Model Context Protocol server that allows AI agents to manipulate Excel files without requiring Microsoft Excel to be installed. This tool enables creating, reading, and modifying Excel workbooks with comprehensive support for formulas, formatting, charts, pivot tables, and more.

Installation

You can install the Excel MCP Server using UVX:

uvx excel-mcp-server stdio

Transport Methods

The server supports three different transport methods, each with its own configuration requirements.

Stdio Transport (Local Use)

The simplest way to use the Excel MCP Server is with the stdio transport for local operation:

uvx excel-mcp-server stdio

Configure your application to connect to the server:

{
   "mcpServers": {
      "excel": {
         "command": "uvx",
         "args": ["excel-mcp-server", "stdio"]
      }
   }
}

Streamable HTTP Transport (Recommended for Remote)

For remote connections, the streamable HTTP transport is recommended:

uvx excel-mcp-server streamable-http

Configure your client to connect:

{
   "mcpServers": {
      "excel": {
         "url": "http://localhost:8000/mcp",
      }
   }
}

SSE Transport (Deprecated)

Server-Sent Events transport is available but deprecated:

uvx excel-mcp-server sse

Client configuration:

{
   "mcpServers": {
      "excel": {
         "url": "http://localhost:8000/sse",
      }
   }
}

Environment Variables & File Path Setup

For Remote Transports (SSE and Streamable HTTP)

When using SSE or Streamable HTTP, you must set the EXCEL_FILES_PATH environment variable on the server side to specify where Excel files will be read from and written to.

Windows PowerShell example:

$env:EXCEL_FILES_PATH="E:\MyExcelFiles"
$env:FASTMCP_PORT="8007"
uvx excel-mcp-server streamable-http

Linux/macOS example:

EXCEL_FILES_PATH=/path/to/excel_files FASTMCP_PORT=8007 uvx excel-mcp-server streamable-http

Notes:

  • If not set, EXCEL_FILES_PATH defaults to ./excel_files
  • FASTMCP_PORT controls the server port (default: 8000)

For Stdio Transport

When using the stdio protocol, you don't need to set EXCEL_FILES_PATH as the file path is provided with each tool call.

Key Features

The Excel MCP Server offers a comprehensive set of Excel manipulation capabilities:

  • Excel Operations: Create, read, and update workbooks and worksheets
  • Data Manipulation: Work with formulas, formatting, charts, pivot tables, and Excel tables
  • Data Validation: Ensure data integrity with built-in validation
  • Formatting Options: Control font styling, colors, borders, alignment, and conditional formatting
  • Table Management: Create and customize Excel tables
  • Chart Generation: Create various chart types including line, bar, pie, and scatter plots
  • Pivot Table Creation: Build dynamic pivot tables for data analysis
  • Sheet Management: Easily copy, rename, and delete worksheets

Using the Tools

The server provides numerous tools for Excel manipulation. Here's a basic example of how you might use them to create a workbook and add data:

  1. Create a new workbook
  2. Add data to cells
  3. Format the data
  4. Create a chart based on the data
  5. Save the workbook

For complete documentation of all available tools and their parameters, refer to the full tools documentation at TOOLS.md on GitHub.

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 "excel-stdio" '{"command":"uvx","args":["excel-mcp-server","stdio"]}'

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": {
        "excel-stdio": {
            "command": "uvx",
            "args": [
                "excel-mcp-server",
                "stdio"
            ]
        }
    }
}

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": {
        "excel-stdio": {
            "command": "uvx",
            "args": [
                "excel-mcp-server",
                "stdio"
            ]
        }
    }
}

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