Home / MCP / Excel MCP Server

Excel MCP Server

Provides Excel file operations, data analysis, and visualization capabilities via MCP.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "excel": {
            "command": "uvx",
            "args": [
                "mcp-excel-server"
            ],
            "env": {
                "PYTHONPATH": " /path/to/your/python"
            }
        }
    }
}

You can run and use an MCP server that specializes in Excel file management, data analysis, and visualization. It lets you read and write Excel-like data, analyze it with statistics, create pivot tables, and generate charts, all accessible through your MCP client. This guide shows you how to set up, run, and connect to the server so you can perform practical data workflows from your applications or tools.

How to use

You interact with the Excel MCP Server through an MCP client. Start the local server, then connect your client to run operations such as reading Excel files, obtaining file information, performing data analysis, creating pivot tables, and exporting charts. Use the client’s prompts or built-in templates to guide your tasks, for example: analyze a dataset, filter data by conditions, or generate a visualization from your Excel source.

How to install

Prerequisites: you need Python installed on your system. You will also use a runtime helper to start MCPs locally and a package manager to install dependencies.

# Create a new project folder for the MCP server
# Using uvx runtime (recommended)
uv init excel-mcp-server
cd excel-mcp-server
uv venv

# Activate the virtual environment (choose the appropriate command for your OS)
# macOS/Linux
source .venv/bin/activate

# Windows
# .venv\Scripts\activate

Configuration and usage notes

To run and connect the server from Claude Desktop, you configure Claude to start the MCP process via a stdio command. Use the following configuration snippet to tell Claude Desktop how to start the server.

{
  "mcpServers": {
      "command": "uvx",
      "args": [
        "mcp-excel-server"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/python"
      }
  }
}

Starting the server and connecting

After you install the dependencies, start the server from your CLI using the runtime command shown above. Your MCP client can then connect to the local process to send requests for reading Excel files, performing analyses, and generating visualizations.

Security and best practices

- Read files only from approved paths and avoid processing untrusted sources. - Enforce file size limits to prevent resource exhaustion. - Implement safeguards to avoid accidental file overwrites. - Sanitize inputs and limit data transformations to safe, explicit operations.

Examples and prompts

Common tasks you can perform include: analyze an Excel file, create a bar chart from a dataset, filter records by a condition, or generate a pivot table from a worksheet.

Available tools

read_excel

Read Excel files in multiple formats (XLSX, XLS, CSV, TSV, JSON) and return data for further processing.

get_excel_info

Retrieve file information such as size, format, and metadata.

get_sheet_names

List all worksheet names within a given Excel file.

analyze_excel

Perform statistical analysis and descriptive data exploration on Excel data.

filter_excel

Filter data by conditions to narrow down results.

pivot_table

Create pivot tables from Excel data to summarize and aggregate information.

data_summary

Generate comprehensive summaries of datasets, including quality checks.

export_chart

Generate charts (line, bar, scatter, histogram) from Excel data and export as images.

write_excel

Write new Excel files or create updates to existing ones.

update_excel

Apply updates to existing Excel files based on new data or transformations.