Sandbox
@haris-musa/excel-mcp-server

MCP server for Excel file operations

This is an MCP server that gives an agent tools for Excel workbooks. It supports creating, reading, updating, formatting, charting, pivot tables, and sheet management through stdio or HTTP transport.

4,175 starsβ€’460 forksβ€’Pythonβ€’Updated 5mo ago
Who it's for

Builders who want Claude Code, Cursor, Codex, or another MCP-capable agent to handle Excel files.

What it delivers

You can edit Excel workbooks through your agent instead of opening Excel and copying data by hand.

What it does

Workbook and worksheet operations

Create, read, update, copy, rename, and delete workbooks and sheets.

Data and formula handling

Work with formulas, ranges, validation, and data integrity checks.

Formatting tools

Apply fonts, colors, borders, alignment, and conditional formatting.

Tables, charts, and pivot tables

Create styled Excel tables, chart types, and pivot tables for analysis.

Multiple transport options

Run over stdio for local use, or over SSE and streamable HTTP for remote connections.

File path safety for remote modes

Uses `EXCEL_FILES_PATH` for server-side file access and rejects absolute paths and traversal in remote transports.

How to get it

  1. 1Run
    uvx excel-mcp-server stdio
  2. 2Run
    uvx excel-mcp-server sse
  3. 3Run
    uvx excel-mcp-server streamable-http

README

Excel MCP Server Logo

PyPI version Total Downloads License: MIT smithery badge Install 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

  • πŸ“Š Excel Operations: Create, read, update workbooks and worksheets
  • πŸ“ˆ Data Manipulation: Formulas, formatting, charts, pivot tables, and Excel tables
  • πŸ” Data Validation: Built-in validation for ranges, formulas, and data integrity
  • 🎨 Formatting: Font styling, colors, borders, alignment, and conditional formatting
  • πŸ“‹ Table Operations: Create and manage Excel tables with custom styling
  • πŸ“Š Chart Creation: Generate various chart types (line, bar, pie, scatter, etc.)
  • πŸ”„ Pivot Tables: Create dynamic pivot tables for data analysis
  • πŸ”§ Sheet Management: Copy, rename, delete worksheets with ease
  • πŸ”Œ Triple transport support: stdio, SSE (deprecated), and streamable HTTP
  • 🌐 Remote & Local: Works both locally and as a remote service

Usage

The server supports three transport methods:

1. Stdio Transport (for local use)

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

2. SSE Transport (Server-Sent Events - Deprecated)

uvx excel-mcp-server sse

SSE transport connection:

{
   "mcpServers": {
      "excel": {
         "url": "http://localhost:8000/sse",
      }
   }
}

3. Streamable HTTP Transport (Recommended for remote connections)

uvx excel-mcp-server streamable-http

Streamable HTTP transport connection:

{
   "mcpServers": {
      "excel": {
         "url": "http://localhost:8000/mcp",
      }
   }
}

Environment Variables & File Path Handling

SSE and Streamable HTTP Transports

When running the server with the SSE or Streamable HTTP protocols, 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.
  • With these transports, tool filepath values must be relative to that directory (e.g. reports/q1.xlsx); absolute paths and directory traversal are rejected.

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

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

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.

Files in the repo

Repository payloadβ€’16 top-level entries
  • .github
  • assets
  • docs
  • src
  • tests
  • .gitignore
  • .mcpbignore
  • .python-version
  • excel-mcp-server-0.1.8.mcpb
  • icon.png
  • LICENSE
  • manifest.json
  • pyproject.toml
  • README.md
  • TOOLS.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph β€” average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code β€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300Β΅s in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up β€” it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k