Skip to content

Repository files navigation

excel-mcp-live

MCP server for Microsoft Excel with OLE automation on Windows.

Platform: Windows + macOS/Linux License: MIT Tools: 14 Language: Go

6 cross-platform tools (Excelize) work everywhere. 8 Windows-only OLE tools add conditional formatting, charts, AutoFilter, sorting, cell merge, PDF export, and data validation — all working on files open in Excel with no locking issues.

What's New vs the Original

This project builds on negokaz/excel-mcp-server (6 tools) and adds 8 Windows OLE tools:

New Tool What It Does
excel_screen_capture Screenshot of the Excel sheet (with pagination)
excel_add_conditional_format Add conditional formatting rules to a range
excel_create_chart Create embedded charts (10 types: column, bar, line, pie, area, scatter)
excel_auto_filter Apply or toggle AutoFilter on a range
excel_sort_range Sort a range by a key column
excel_merge_cells Merge or unmerge cells
excel_export_pdf Export a worksheet to PDF
excel_add_data_validation Add data validation (7 types: whole number, decimal, list, date, time, text length, custom)

Architecture

The server uses a dual-backend approach: each operation first attempts OLE automation (if on Windows and file is open in Excel), then falls back to the Excelize library. This means cross-platform tools also benefit from live editing when available.

Tool List

Cross-Platform Tools (6)

These work on Windows, macOS, and Linux using the Excelize library.

Tool Description
excel_describe_sheets List all sheet info (names, dimensions, row/column counts)
excel_read_sheet Read cell values with pagination (showFormula, showStyle options)
excel_write_to_sheet Write values and formulas to cells
excel_create_table Create a named table from a range
excel_copy_sheet Copy a sheet to a new sheet
excel_format_range Format cells (borders, font, fill, number format)

Windows OLE Tools (8)

These require Windows with Microsoft Excel installed. They work on files currently open in Excel via OLE automation.

Tool Description
excel_screen_capture Screenshot of the Excel sheet with pagination
excel_add_conditional_format Conditional formatting rules (color scales, data bars, icon sets, etc.)
excel_create_chart Embedded charts (10 chart types with full formatting)
excel_auto_filter AutoFilter on/off for a range
excel_sort_range Sort by a key column (ascending/descending)
excel_merge_cells Merge or unmerge a cell range
excel_export_pdf Export worksheet to PDF
excel_add_data_validation Data validation (dropdown lists, number ranges, date ranges, etc.)

Quick Start

Claude Code (.mcp.json)

{
  "mcpServers": {
    "excel": {
      "command": "path/to/excel-mcp-server",
      "args": [],
      "env": {
        "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "excel": {
      "command": "npx",
      "args": ["--yes", "@negokaz/excel-mcp-server"],
      "env": {
        "EXCEL_MCP_PAGING_CELLS_LIMIT": "4000"
      }
    }
  }
}

From source

git clone https://github.com/ykarapazar/excel-mcp-live.git
cd excel-mcp-live
go build -o excel-mcp-server .
./excel-mcp-server

Supported File Formats

  • .xlsx (Excel workbook)
  • .xlsm (Macro-enabled workbook)
  • .xltx (Excel template)
  • .xltm (Macro-enabled template)

Configuration

Environment Variable Description Default
EXCEL_MCP_PAGING_CELLS_LIMIT Max cells per page when reading 4000

Requirements

  • Go 1.21+ (to build from source)
  • Windows OLE tools only: Windows 10/11 + Microsoft Excel

Acknowledgments

Built on top of negokaz/excel-mcp-server (MIT License).

Built with Excelize and go-ole.

License

MIT License — see LICENSE for details.

About

MCP server for Microsoft Excel with OLE automation - 14 tools

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages