home / mcp / excel mcp server

Excel MCP Server

Provides programmatic access to create, read, modify, format, chart, and manage Excel workbooks without Excel installed.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aifornorms-excelmcp": {
      "command": "uv",
      "args": [
        "run",
        "excel-mcp-server"
      ],
      "env": {
        "FASTMCP_PORT": "8000",
        "EXCEL_FILES_PATH": "./excel_files"
      }
    }
  }
}

You can manipulate Excel workbooks without Microsoft Excel by running a dedicated MCP server that exposes Excel-related actions you can invoke from your AI agent. This server lets you create, read, modify, format, chart, and manage worksheets and ranges in Excel files from any compatible MCP client.

How to use

To use this MCP server, connect your MCP client to the local server endpoint and issue the available Excel actions. The server runs locally on port 8000 by default and exposes a stream-based API that your client uses to request operations. Typical workflows include loading Excel files from a directory, creating new workbooks, updating cell values, applying formatting, generating charts, and organizing worksheets and ranges. You can point your client to the SSE endpoint at http://localhost:8000/sse and set the file directory via an environment variable named EXCEL_FILES_PATH.

How to install

Prerequisites
- Python 3.10 or higher

Installation
1. Create a virtual environment
   python -m venv .venv
2. Activate the virtual environment
   # Windows
   .venv\Scripts\activate
   # macOS/Linux
   source .venv/bin/activate
3. Install the MCP runner tool
   pip install uv
4. Install this MCP package in editable mode
   uv pip install -e .
Running the Server
Start the server (default port 8000):
uv run excel-mcp-server

Custom port (e.g., 8080):
# Bash/Linux/macOS
export FASTMCP_PORT=8080 && uv run excel-mcp-server

# Windows PowerShell
$env:FASTMCP_PORT = "8080"; uv run excel-mcp-server

Configuration and environment

Set the directory that contains your Excel files using an environment variable. By default, the server looks for Excel files in ./excel_files. You can override this by setting EXCEL_FILES_PATH to the desired directory before starting the server.

Port binding is controlled via FASTMCP_PORT. The default port is 8000, but you can run the server on a different port as shown above.