mcp-excel

mcp-excel

Provides full read and write access to Excel workbooks (sheets, cell ranges, tables, formulas, formatting, and cross-workbook references) via MCP, running locally or as an HTTP/SSE service.

Category
Visit Server

README

mcp-excel

License: MIT Model Context Protocol

A Model Context Protocol server that gives Claude Code (or any MCP client) full read and write access to Excel workbooks: sheets, cell ranges, structured tables, formulas, formatting, and cross-workbook references. It reads and writes real .xlsx files on disk using ExcelJS; no copy of Excel, no Microsoft account, and no cloud service are required.

It runs locally as a stdio subprocess, or as an HTTP/SSE service (handy for sharing one instance with a desktop client over your LAN via Docker).

Status: 11 tools, stdio + SSE transports, zero external dependencies beyond npm. License: MIT.

Tools

Tool What it does
list_sheets List all sheets in a workbook with row/column counts
read_range Read a range of cells; returns values, formulas, and types
write_cells Write values or formulas to specific cells (creates the file/sheet if missing)
write_rows Write multiple rows of data from a starting cell (bulk dataset building)
create_table Create a structured Excel Table (ListObject) with headers, data, and optional column formulas
create_workbook Create a new empty workbook with one or more named sheets
add_sheet Add a new sheet to an existing workbook
delete_sheet Delete a sheet from a workbook
format_cells Apply font, fill, number format, alignment, and borders to a range
cross_workbook_reference Read from one workbook and write values (or linking formulas) into another
get_defined_names List named ranges and table names in a workbook

All file-path arguments are resolved with path.resolve() against the server's working directory, so absolute paths are the safest. In Docker (SSE) mode, paths resolve inside the container against the mounted /data volume (see below).

Requirements

  • Node.js 18 or newer (stdio mode), or
  • Docker (SSE / shared-instance mode)

Setup: Claude Code (stdio, local)

Clone and install:

git clone https://github.com/Corvalon/mcp-excel.git
cd mcp-excel
npm ci

Register the server. Either add it with the CLI:

claude mcp add excel -- node /absolute/path/to/mcp-excel/index.js

or add it by hand to your Claude Code config (~/.claude.json):

{
  "mcpServers": {
    "excel": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-excel/index.js"]
    }
  }
}

Restart Claude Code. The tools appear under the mcp__excel__* prefix.

Setup: Claude Desktop (stdio, local)

Add the same block to Claude Desktop's config (Settings > Developer > Edit Config, which opens claude_desktop_config.json):

{
  "mcpServers": {
    "excel": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-excel/index.js"]
    }
  }
}

Save and restart. When the hammer / tools icon appears, the server is connected.

Setup: Docker (SSE, shared instance)

Run one container that any MCP client on your network can reach over SSE. This is useful for driving Excel files from a machine that does not have Node.js.

  1. Point the container at the folder that holds your workbooks and start it:

    MCP_EXCEL_DATA_DIR=/path/to/your/spreadsheets docker compose up -d --build
    

    The compose file mounts that folder as /data inside the container and listens on port 3001.

  2. Add the SSE endpoint to your client config (replace the host with the container host's LAN IP if the client is on another machine):

    {
      "mcpServers": {
        "excel": {
          "url": "http://localhost:3001/sse"
        }
      }
    }
    
  3. Because paths resolve inside the container, address files relative to the /data mount. If MCP_EXCEL_DATA_DIR is ~/spreadsheets, then ~/spreadsheets/2025/Budget.xlsx is /data/2025/Budget.xlsx in tool calls.

When a client on a different host connects over SSE, set MCP_ALLOWED_HOSTS so the server accepts the request. Create a .env file next to docker-compose.yml:

MCP_ALLOWED_HOSTS='localhost,127.0.0.1,::1,192.168.1.50,my-host.local'

Container management:

docker compose up -d --build   # start / rebuild after code changes
docker compose down            # stop
docker compose logs -f         # tail logs

A health check is available at http://<host>:3001/health.

Configuration

Variable Default Purpose
MCP_TRANSPORT stdio stdio for a local subprocess, sse for the HTTP/SSE service
MCP_PORT 3000 Port for SSE mode (the Docker compose file uses 3001)
MCP_ALLOWED_HOSTS localhost,127.0.0.1,::1 Comma-separated Host-header allowlist for SSE mode
MCP_EXCEL_DATA_DIR ./data Host folder mounted as /data in the Docker container

Security

This server reads and writes real files, and in SSE mode it opens a network port. Treat it as trusted-local tooling, not an internet-facing service.

  • File access. Tool calls can read or write any .xlsx path the server process can reach. In stdio mode that is your whole filesystem; in Docker (SSE) mode it is scoped to the mounted /data volume, so Docker is the safer way to bound access.
  • SSE has no authentication. The HTTP/SSE endpoint listens on 0.0.0.0 and does not authenticate callers. Only run it on a trusted LAN, and restrict who can reach it with MCP_ALLOWED_HOSTS (a Host-header allowlist) plus your own firewall. Do not expose port 3001 to the public internet.
  • Formulas are data, not code. ExcelJS writes formula strings; it does not execute macros or VBA, so opening a produced workbook runs no code from this server.

Example prompts

  • "Create a new budget workbook with columns Category, Budget, Actual, and Difference."
  • "Read the data in Sales.xlsx and summarize the totals by region."
  • "Add a SUM formula at the bottom of column B in the Q1 sheet."
  • "Build a formatted table from this data with a totals row."
  • "Pull the monthly totals from Budget.xlsx into a Summary sheet in Report.xlsx."

Notes and gotchas

Operator/agent notes (permission wildcards, exact-parameter-name behavior, the openpyxl fallback, and formula-result caching) live in CLAUDE.md.

License

MIT (c) 2026 Corvalon.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured