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
1.4K downloads
342 stars

Excel MCP Server is a tool that allows you to interact with Microsoft Excel files through the Model Context Protocol (MCP). It enables reading and writing data, working with formulas, creating sheets, and for Windows users, offers live editing and screen capture capabilities.

Installation

Via NPM

You can install the excel-mcp-server by adding the following 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

For Claude Desktop users, you can install Excel MCP Server automatically using Smithery:

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

Usage

Listing Sheets

To list all sheets in an Excel file:

excel_describe_sheets

Arguments:

  • fileAbsolutePath: Absolute path to the Excel file

Reading Sheet Data

To 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 Sheet Screenshots (Windows Only)

To take a screenshot of an Excel sheet:

excel_screen_capture

Arguments:

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

Writing to Sheets

To 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 Excel sheet. For formulas, start with "="

Creating Tables

To 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

To 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

Configuration

You can customize the server behavior using environment variables:

EXCEL_MCP_PAGING_CELLS_LIMIT

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

Supported File Formats

Excel MCP Server works with the following file formats:

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

Requirements

  • Node.js 20.x or later
  • Windows is required for live editing and screen capture features

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