Excel MCP server

Integrates with Microsoft Excel to enable reading and writing of text data in xlsx files for spreadsheet manipulation and analysis tasks.
Back to servers
Setup instructions
Provider
Kazuki Negoro
Release date
Feb 16, 2025
Language
TypeScript
Package
Stats
2.5K downloads
481 stars

The Excel MCP Server is a Model Context Protocol server that allows you to interact with Microsoft Excel files, enabling you to read and write data, work with formulas, create new sheets, and more.

Installation

Via NPM

The Excel MCP server can be installed by adding the appropriate configuration to your MCP servers configuration.

For Windows:

{
    "mcpServers": {
        "excel": {
            "command": "cmd",
            "args": ["/c", "npx", "--yes", "@negokaz/excel-mcp-server"],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

For other platforms:

{
    "mcpServers": {
        "excel": {
            "command": "npx",
            "args": ["--yes", "@negokaz/excel-mcp-server"],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

Via Smithery

You can install Excel MCP Server automatically via Smithery:

npx -y @smithery/cli install @negokaz/excel-mcp-server --client claude

Requirements

  • Node.js 20.x or later

Supported File Formats

  • xlsx (Excel book)
  • xlsm (Excel macro-enabled book)
  • xltx (Excel template)
  • xltm (Excel macro-enabled template)

Available Tools

Describing Sheets

List all sheet information in an Excel file:

excel_describe_sheets

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file

Reading Sheet Data

Read values from an Excel sheet with pagination:

excel_read_sheet

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • sheetName: Sheet name in the Excel file
  • range: Range of cells to read (e.g., "A1:C10"). Default: first paging range
  • showFormula: Show formula instead of value (default: false)
  • showStyle: Show style information for cells (default: false)

Capturing Screenshots (Windows Only)

Take a screenshot of an Excel sheet with pagination:

excel_screen_capture

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • sheetName: Sheet name in the Excel file
  • range: Range of cells to read (e.g., "A1:C10"). Default: first paging range

Writing to Sheets

Write values to an Excel sheet:

excel_write_to_sheet

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • sheetName: Sheet name in the Excel file
  • newSheet: Create a new sheet if true, otherwise write to the existing sheet
  • range: Range of cells to write to (e.g., "A1:C10")
  • values: Values to write to the sheet. If the value is a formula, it should start with "="

Creating Tables

Create a table in an Excel sheet:

excel_create_table

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • sheetName: Sheet name where the table is created
  • range: Range to be a table (e.g., "A1:C10")
  • tableName: Table name to be created

Copying Sheets

Copy an existing sheet to a new sheet:

excel_copy_sheet

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • srcSheetName: Source sheet name in the Excel file
  • dstSheetName: Sheet name to be copied

Formatting Ranges

Format cells in an Excel sheet with style information:

excel_format_range

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file
  • sheetName: Sheet name in the Excel file
  • range: Range of cells to format (e.g., "A1:C3")
  • styles: 2D array of style objects for each cell

Configuration

You can customize the MCP Server behavior using environment variables:

EXCEL_MCP_PAGING_CELLS_LIMIT

The maximum number of cells to read in a single paging operation. Default value: 4000

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" '{"command":"npx","args":["--yes","@negokaz/excel-mcp-server"],"env":{"EXCEL_MCP_PAGING_CELLS_LIMIT":"4000"}}'

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": {
            "command": "npx",
            "args": [
                "--yes",
                "@negokaz/excel-mcp-server"
            ],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

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": {
            "command": "npx",
            "args": [
                "--yes",
                "@negokaz/excel-mcp-server"
            ],
            "env": {
                "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
            }
        }
    }
}

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