MCP Server

Excel automation via xlwings COM. DRM-protected files, live sessions, VBA macros. Windows only.

Local serverstdioPython

What is the MCP MCP server?

Connect MCP to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Excel automation via xlwings COM. DRM-protected files, live sessions, VBA macros. Windows only. The mcp mcp server is what makes that connection.

What the server does

  • DRM / file-level encryption — is applied (common in enterprise environments)
  • You need to interact with a live Excel session (formulas, macros, add-ins)
  • Files are locked by another process

Installation

The server ships on PyPI as mcp-server-xlwings, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • get_active_workbook — Get active workbook info, sheets, and current selection with data
  • manage_workbooks — List, open, save, close, or recalculate workbooks
  • read_data — Read a range with merge_info, header_row, sheet="*" batch read, and detail mode
  • write_data — Write a 2D array (data) or a single-cell formula (formula)
  • manage_sheets — List, add, delete, rename, copy, activate sheets. Insert/delete rows and columns
  • find_replace — Search for text, optionally replace it
  • format_range — Apply formatting (bold, italic, color, borders, alignment, number format, etc.)
  • run_macro — Execute a VBA macro and get its return value
  • get_formulas — Get all formulas in a range with optional calculated values
  • get_cell_styles — Get formatting/style info (bold, colors, borders, etc.) for cells in a range
  • get_objects — List charts, images, and shapes on a sheet
  • Cursor — The Cursor tool exposed by this server

Credentials and setup notes

  • Windows (Excel COM automation is Windows-only) - Microsoft Excel installed - Python 3.10+

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 13 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MCP's toolset — get_active_workbook, manage_workbooks, read_data and 10 more — is a fair guide to whether it matches your workflow. It is maintained by geniuskey; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
get_active_workbookGet active workbook info, sheets, and current selection with data
manage_workbooksList, open, save, close, or recalculate workbooks
read_dataRead a range with merge_info, header_row, sheet="*" batch read, and detail mode
write_dataWrite a 2D array (data) or a single-cell formula (formula)
manage_sheetsList, add, delete, rename, copy, activate sheets. Insert/delete rows and columns
find_replaceSearch for text, optionally replace it
format_rangeApply formatting (bold, italic, color, borders, alignment, number format, etc.)
run_macroExecute a VBA macro and get its return value
get_formulasGet all formulas in a range with optional calculated values
get_cell_stylesGet formatting/style info (bold, colors, borders, etc.) for cells in a range
get_objectsList charts, images, and shapes on a sheet
CursorThe Cursor tool exposed by this server.
WindsurfThe Windsurf tool exposed by this server.

How to install the MCP MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Windows (Excel COM automation is Windows-only) - Microsoft Excel installed - Python 3.10+

Example prompts to try

  • Use MCP to get active workbook.
  • Use MCP to manage workbooks.
  • Use MCP to read data.

Frequently asked questions

It connects MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 13 tools (get_active_workbook, manage_workbooks, read_data, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP directly.