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

MseeP.ai Security Assessment Badge

Excel MCP Server

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

Quick Start

Prerequisites

  • Python 3.10 or higher

Installation

  1. Clone the repository:
git clone https://github.com/haris-musa/excel-mcp-server.git
cd excel-mcp-server
  1. Install using uv:
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

Using with AI Tools

Cursor IDE

  1. Add this configuration to Cursor:
{
  "mcpServers": {
    "excel": {
      "url": "http://localhost:8000/sse",
      "env": {
        "EXCEL_FILES_PATH": "/path/to/excel/files"
      }
    }
  }
}
  1. The Excel tools will be available through your AI assistant.

Remote Hosting & Transport Protocols

This server uses Server-Sent Events (SSE) transport protocol. For different use cases:

  1. Using with Claude Desktop (requires stdio):

  2. Hosting Your MCP Server:

Environment Variables

  • FASTMCP_PORT: Server port (default: 8000)
  • EXCEL_FILES_PATH: Directory for Excel files (default: ./excel_files)

Available Tools

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

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.