Skip to main content
Glama

excel-mcp

An MCP server for safe .xlsx inspection and controlled workbook writes.

Directory listing

This project is also listed in the MCP directory:

Related MCP server: formulon-mcp

Status

This is an MVP. It supports workbook inspection, sheet/schema discovery, reads, search, simple filtering and numeric aggregation, plus preview-based writes. Writes are guarded by workspace confinement, SHA-256 compare-and-swap, a per-workbook lock, backup, temporary-file save, re-open verification, atomic replacement and JSONL audit logging.

Macro-enabled workbooks, external links, charts, formatting operations and non-.xlsx files are intentionally out of scope.

Quick start from GitHub

You do not need to clone this repository. Install uv once, then configure your MCP client to run the latest version directly from GitHub.

The command is:

uvx --from git+https://github.com/Matsu132/excel-mcp.git excel-mcp

The only local setting you need is the folder containing the Excel files:

EXCEL_MCP_WORKSPACE=/Users/your-name/Documents/Excel

This keeps Excel data on your computer. The public GitHub repository provides the server code and dependencies; it does not upload your workbooks.

Developer installation

uv sync

Set the workbook directory that the server is allowed to access:

export EXCEL_MCP_WORKSPACE="/absolute/path/to/workbooks"

The server accepts only .xlsx files inside this directory. Relative paths are resolved from this workspace.

Starting the server

This server uses MCP over stdio. The command to register in an MCP client is:

uvx --from git+https://github.com/Matsu132/excel-mcp.git excel-mcp

For a direct local check:

EXCEL_MCP_WORKSPACE="/absolute/path/to/workbooks" uv run excel-mcp

Keep the process running when the client starts it; MCP clients normally manage the process lifecycle automatically.

Claude Desktop

Add the following entry to Claude Desktop's MCP configuration file. Replace the paths with absolute paths on your machine.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "excel-mcp": {
  "command": "uvx",
      "args": ["--from", "git+https://github.com/Matsu132/excel-mcp.git", "excel-mcp"],
      "env": {
        "EXCEL_MCP_WORKSPACE": "/Users/your-name/Documents/Excel"
      }
    }
  }
}

Restart Claude Desktop after saving the file. The excel_* tools should then appear in the MCP tools list.

OpenAI-compatible clients

For an OpenAI application, Agent SDK, or other client that supports local MCP stdio servers, register the same command as a local MCP server:

{
  "name": "excel-mcp",
  "command": "uvx",
  "args": ["--from", "git+https://github.com/Matsu132/excel-mcp.git", "excel-mcp"],
  "env": {
    "EXCEL_MCP_WORKSPACE": "/Users/your-name/Documents/Excel"
  }
}

The exact configuration key varies by product. Use the product's local MCP or stdio server setting and map it to command, args, and env above. If the client only supports remote MCP endpoints, this repository needs an HTTP transport deployment before it can be used directly.

Other MCP clients

Clients such as Cursor, VS Code MCP extensions, Cline, Windsurf, and MCP Inspector generally accept the same stdio definition. Use:

Command: uvx
Arguments: --from git+https://github.com/Matsu132/excel-mcp.git excel-mcp
Environment: EXCEL_MCP_WORKSPACE=/Users/your-name/Documents/Excel

For MCP Inspector, run:

EXCEL_MCP_WORKSPACE="/absolute/path/to/workbooks" uv run mcp dev src/excel_mcp/server.py

Japanese documentation

日本語のセットアップ手順は README_JAPANESE.md を参照してください。

MCP SDK

This project uses the official MCP Python SDK v2 with MCPServer and @mcp.tool(). The default transport is stdio for local MCP clients. See the official v2 documentation for the SDK API and transport details.

Available Tools

12 tools
excel_aggregateD

Inputs: path (required), sheet (required), column (required), operation. Returns: result

excel_filterD

Inputs: path (required), sheet (required), value (required), column (required), +1 more. Returns: result

excel_group_byD

Inputs: path (required), sheet (required), key_column (required), value_column (required). Returns: object

excel_group_by_advancedD

Inputs: path (required), sheet (required), key_column (required), value_column (required), +1 more. Returns: object

excel_inspectD

Inputs: path (required). Returns: object

excel_list_sheetsD

Inputs: path (required). Returns: result

excel_preview_writeD

Inputs: path (required), sheet (required), values (required), cell, +1 more. Returns: object

excel_readD

Inputs: path (required), sheet (required), range, max_rows. Returns: result

excel_schemaD

Inputs: path (required), sheet (required). Returns: object

excel_write_cellD

Inputs: preview_id (required). Returns: object

excel_write_rangeD

Inputs: preview_id (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.1/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: reading, writing, searching, filtering, aggregating, and listing sheets. The only potential ambiguity is between excel_group_by and excel_group_by_advanced, and excel_inspect versus excel_schema, but their names suggest one is basic vs advanced and one is file-level vs structure-level, so agents can differentiate.

    Naming Consistency5/5

    All tools follow a consistent excel_<action> pattern using snake_case, making the naming scheme highly predictable. Even though some are verbs (read, write) and some are nouns (schema, group_by), the uniform prefix and casing create a clear, uniform convention.

    Tool Count5/5

    With 12 tools, the set is well-scoped for an Excel MCP server. Each tool addresses a distinct aspect of spreadsheet interaction—from inspection and reading to writing and data transformation—without being excessive or sparse.

    Completeness4/5

    The tool set covers core Excel operations: listing sheets, reading data, writing cells/ranges, inspecting structure, and performing search, filter, aggregate, and group-by operations. It lacks workbook-level creation/deletion or sheet management, but for data analysis and manipulation tasks, it provides a solid lifecycle without dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for reading and writing Excel (xlsx) files using SheetJS, providing tools to list sheets, read data, create files, add sheets, and update cells.
      5
      10 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for Excel-compatible formula evaluation and workbook operations, enabling agents to open, inspect, mutate, recalculate, and save .xlsx files in-memory over stdio.
      99 npm
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for reading and inspecting local Excel files (.xlsx, .xlsm, .xls, .xlsb, .ods) with tools for inspecting metadata, reading ranges, and profiling structure.
      3
      6 npm
      MIT