Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

excel-mcp-server

MCP.Pizza Chef: haris-musa

The excel-mcp-server is a Model Context Protocol server that allows AI agents to create, read, modify, and visualize Excel workbooks without requiring Microsoft Excel. It supports data manipulation, formatting, chart creation, pivot tables, and worksheet management, enabling seamless Excel file operations programmatically via MCP.

Use This MCP server To

Create and modify Excel workbooks programmatically Read and write data in Excel files without Excel installed Apply formatting and styles to Excel worksheets Generate charts and visualizations within Excel files Create pivot tables for data summarization Manage multiple worksheets and cell ranges dynamically

README

Excel MCP Server Logo

PyPI version PyPI downloads License: MIT

A Model Context Protocol (MCP) server that lets you manipulate Excel files without needing Microsoft Excel installed. Create, read, and modify Excel workbooks with your AI agent.

Features

  • πŸ“Š Create and modify Excel workbooks
  • πŸ“ Read and write data
  • 🎨 Apply formatting and styles
  • πŸ“ˆ Create charts and visualizations
  • πŸ“Š Generate pivot tables
  • πŸ”„ Manage worksheets and ranges
  • πŸ”Œ Dual transport support: stdio and SSE

Quick Start

Prerequisites

  • Python 3.10 or higher

Running the Server

The server supports two transport modes: stdio and SSE.

Using stdio transport

Stdio transport is ideal for direct integration with tools like Cursor Desktop or local development, which can manipulate local files:

uvx excel-mcp-server stdio

Using SSE transport

SSE transport is perfect for remote connections, which manipulate remote files:

uvx excel-mcp-server sse

Add to Cursor

Install MCP Server

Using with AI Tools

  1. Add this configuration to your client, choosing the appropriate transport method for your needs:

Stdio transport connection (for local integration):

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

SSE transport connection:

{
   "mcpServers": {
      "excel": {
         "url": "http://localhost:8000/sse",
      }
   }
}
  1. The Excel tools will be available through your AI assistant.

Environment Variables & File Path Handling

SSE Transport

When running the server with the SSE protocol, you must set the EXCEL_FILES_PATH environment variable on the server side. This variable tells the server where to read and write Excel files.

  • If not set, it defaults to ./excel_files.

You can also set the FASTMCP_PORT environment variable to control the port the server listens on (default is 8000 if not set).

  • Example (Windows PowerShell):
    $env:EXCEL_FILES_PATH="E:\MyExcelFiles"
    $env:FASTMCP_PORT="8080"
    uvx excel-mcp-server sse
  • Example (Linux/macOS):
    EXCEL_FILES_PATH=/path/to/excel_files FASTMCP_PORT=8080 uvx excel-mcp-server sse

Stdio Transport

When using the stdio protocol, the file path is provided with each tool call, so you do not need to set EXCEL_FILES_PATH on the server. The server will use the path sent by the client for each operation.

Available Tools

The server provides a comprehensive set of Excel manipulation tools. See TOOLS.md for complete documentation of all available tools.

Star History

Star History Chart

License

MIT License - see LICENSE for details.

excel-mcp-server FAQ

How do I install the excel-mcp-server?
Clone the GitHub repo and install dependencies using 'uv pip install -e .'.
Do I need Microsoft Excel installed to use this server?
No, the server manipulates Excel files independently of Microsoft Excel.
What Python version is required?
Python 3.10 or higher is required to run the excel-mcp-server.
How do I start the server on a custom port?
Set the FASTMCP_PORT environment variable before running the server, e.g., 'export FASTMCP_PORT=8080'.
Can this server create charts and pivot tables?
Yes, it supports creating charts, visualizations, and pivot tables in Excel workbooks.
Is it possible to apply styles and formatting to Excel files?
Yes, the server supports applying various formatting and styles to worksheets.
How does this server integrate with AI agents?
It exposes Excel file manipulation capabilities via MCP, allowing AI agents to interact with Excel files programmatically.
Can I manage multiple worksheets and ranges?
Yes, the server provides functionality to manage worksheets and cell ranges dynamically.