Skip to main content
Glama

ironcalc-mcp

PyPI Python 3.13+ License: MIT Tests

MCP server for the IronCalc spreadsheet engine. Create, read, edit, and save xlsx files through the Model Context Protocol.

Built on the typed high-level API in IronCalc 0.8.3. It exposes workbook editing, formulas, styles, structure, names, conditional formatting, and xlsx persistence through MCP.

Motivation

I was really inspired by paper.design's real-time MCP workflow, where exposing a design tool via MCP enables custom, extensible agent workflows that feel native rather than bolted on.

Current AI-spreadsheet integrations (like Claude's cowork mode for Excel) add an unnecessary layer of abstraction - the agent writes Python code that manipulates Excel, instead of talking to the spreadsheet directly. This MCP server removes that indirection. Agents read cells, write formulas, and get evaluated results in one hop. No codegen middleman, no openpyxl glue scripts.

Huge thanks to the IronCalc contributors - their Python SDK API is so clean that this entire MCP server is basically thin wrappers. The hard work is all theirs.

Current limitation: the server works with an in-memory workbook - load a file, edit it, save it back. There's no real-time streaming to a running IronCalc UI yet. The engine already has a diff queue for syncing, so the plumbing is there. If IronCalc adds a WebSocket bridge to their web app, we can wire up live sync and get a true reactive workflow - agent edits appearing in the browser as they happen.

Related MCP server: Excel MCP Server

Quick start

uvx ironcalc-mcp

Claude Code

claude mcp add ironcalc -- uvx ironcalc-mcp

Claude Desktop / Cursor

Add to your MCP config:

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

Examples

Build a spreadsheet from scratch

Create a budget with formulas and save it

Audit an existing xlsx for errors

Load quarterly_report.xlsx and find all #NAME?, #REF!, #VALUE! errors. Tell me which formulas are broken and why.

Fix broken cross-sheet references

The P&L sheet was renamed but formulas in the DCF sheet still reference the old name. Find and fix all broken references.

Build a financial model

Create a 5-year DCF model with revenue assumptions in one sheet, P&L in another, and free cash flow calculation in a third. Use =NPV() and =IRR() for valuation.

Analyze and transform data

Load sales_data.xlsx, add a column with running totals, insert a summary row at the bottom, and save.

Available tools (56)

Workbook

Tool

Description

create_workbook

Create an empty workbook with locale, timezone, and formula language

load_workbook

Load an xlsx file

save_workbook

Save to xlsx

get_workbook_info

Get metadata, theme, sheets, dimensions, states, and colors

set_workbook_properties

Update name, locale, timezone, language, or theme

undo

Undo the latest action

redo

Redo the latest undone action

Cells and ranges

Tool

Description

get_cell

Get content, formatted value, and type

get_cells

Read non-empty cells from an inclusive range

set_cell

Set a value or formula

set_cells

Batch-write cells with one evaluation pass

set_array_formula

Set an array formula over a result area

clear_range

Clear contents, formatting, or everything

paste_csv

Paste tab-delimited rows into a range

Sheets

Tool

Description

add_sheet

Create a sheet

delete_sheet

Delete a sheet

rename_sheet

Rename a sheet

set_sheet_color

Set the tab color

duplicate_sheet

Duplicate a sheet

hide_sheet / unhide_sheet

Change sheet visibility

move_sheet

Reorder a sheet

set_grid_lines

Show or hide grid lines

Rows and columns

Tool

Description

insert_rows / delete_rows

Insert or delete rows

insert_columns / delete_columns

Insert or delete columns

move_rows / move_columns

Move a contiguous row or column block

set_column_width

Size one column or an inclusive range

set_row_height

Size one row or an inclusive range

set_rows_hidden / set_columns_hidden

Hide or unhide inclusive ranges

set_frozen_rows / set_frozen_columns

Set frozen panes

auto_fill_rows / auto_fill_columns

Extend values and formulas from a source area

Formatting

Tool

Description

get_cell_style

Get font, fill, border, alignment, and number format

set_cell_style

Update selected style properties on a cell or range

set_range_border

Apply inner, outer, side, or full borders

Named styles and conditional formatting

Tool

Description

list_named_styles / get_named_style

Inspect named styles

create_named_style / update_named_style / delete_named_style

Manage named styles

apply_named_style

Apply a named style to a range

list_conditional_formats

List conditional formatting rules

add_conditional_format / update_conditional_format / delete_conditional_format

Manage rules

raise_conditional_format_priority / lower_conditional_format_priority

Reorder rules

Defined names

Tool

Description

list_defined_names

List workbook- and sheet-scoped names

create_defined_name

Create a defined name

update_defined_name

Rename, re-scope, or update a defined name

delete_defined_name

Delete a defined name

Contributing

Prerequisites: uv and just.

git clone https://github.com/yolonir/ironcalc-mcp
cd ironcalc-mcp
just init

just init syncs the locked environment and installs the deterministic prek commit hook.

just test                      # Behavioral tests
just quality-check             # Ruff, mypy, and ty
just quality-check src/path.py # Targeted quality checks
just precommit                 # Run all commit-time hooks
just format                    # Format and apply safe lint fixes

Please create a new branch for your changes and open a focused pull request against main.

License

MIT

Available Tools

21 tools
add_sheetA

Add a new sheet to the workbook.

Args: name: Optional sheet name. If omitted, auto-named (Sheet2, Sheet3, etc.)

Inputs: name. Returns: result

create_workbookA

Create a new empty workbook.

Args: name: Workbook name locale: Locale code (e.g. en, de, es, fr) timezone: Timezone (e.g. UTC, America/New_York) language: Language code for formulas (e.g. en, es, de)

Inputs: name, locale, timezone, language. Returns: result

delete_columnsB

Delete columns starting at the given position.

Args: sheet: Sheet index (0-based) column: First column to delete (1-based) count: Number of columns to delete

Inputs: sheet (required), column (required), count. Returns: result

delete_rowsB

Delete rows starting at the given position.

Args: sheet: Sheet index (0-based) row: First row to delete (1-based) count: Number of rows to delete

Inputs: sheet (required), row (required), count. Returns: result

delete_sheetB

Delete a sheet by index.

Args: sheet: Sheet index (0-based)

Inputs: sheet (required). Returns: result

get_cellA

Get a single cell's content, formatted value, and type.

Args: sheet: Sheet index (0-based) row: Row number (1-based) column: Column number (1-based)

Inputs: sheet (required), row (required), column (required). Returns: result

get_cellsA

Get cells in a rectangular range.

Args: sheet: Sheet index (0-based) row_start: First row (1-based) col_start: First column (1-based) row_end: Last row (1-based, inclusive) col_end: Last column (1-based, inclusive)

Inputs: sheet (required), row_start (required), col_start (required), row_end (required), +1 more. Returns: result

get_cell_styleA

Get the style (font, fill, border, alignment, number format) of a cell.

Args: sheet: Sheet index (0-based) row: Row number (1-based) column: Column number (1-based)

Inputs: sheet (required), row (required), column (required). Returns: result

get_workbook_infoA

Get information about the current workbook: sheets, dimensions, and metadata.

Inputs: no named parameters. Returns: result

insert_columnsB

Insert columns at the given position.

Args: sheet: Sheet index (0-based) column: Column number where new columns are inserted (1-based) count: Number of columns to insert

Inputs: sheet (required), column (required), count. Returns: result

insert_rowsB

Insert rows at the given position.

Args: sheet: Sheet index (0-based) row: Row number where new rows are inserted (1-based) count: Number of rows to insert

Inputs: sheet (required), row (required), count. Returns: result

load_workbookA

Load a workbook from an xlsx file.

Args: file_path: Absolute path to the .xlsx file locale: Locale code (e.g. en, de, es) timezone: Timezone (e.g. UTC) language: Language code for formulas (e.g. en)

Inputs: file_path (required), locale, timezone, language. Returns: result

rename_sheetA

Rename a sheet.

Args: sheet: Sheet index (0-based) name: New sheet name

Inputs: sheet (required), name (required). Returns: result

save_workbookA

Save the current workbook to an xlsx file.

Args: file_path: Path to save to. If omitted, saves to the path it was loaded from.

Inputs: file_path. Returns: result

set_cellA

Set a single cell's value. Use '=' prefix for formulas.

Args: sheet: Sheet index (0-based) row: Row number (1-based) column: Column number (1-based) value: Cell value (text, number, or formula starting with '=')

Inputs: sheet (required), row (required), column (required), value (required). Returns: result

set_cellsA

Set multiple cells in batch. Each entry needs sheet, row, column, value.

Args: cells: List of {sheet: int, row: int, column: int, value: str}

Inputs: cells (required). Returns: result

set_column_widthB

Set the width of a column.

Args: sheet: Sheet index (0-based) column: Column number (1-based) width: Column width in points

Inputs: sheet (required), column (required), width (required). Returns: result

set_frozen_columnsA

Freeze the left N columns.

Args: sheet: Sheet index (0-based) count: Number of columns to freeze (0 to unfreeze)

Inputs: sheet (required), count (required). Returns: result

set_frozen_rowsA

Freeze the top N rows.

Args: sheet: Sheet index (0-based) count: Number of rows to freeze (0 to unfreeze)

Inputs: sheet (required), count (required). Returns: result

set_row_heightA

Set the height of a row.

Args: sheet: Sheet index (0-based) row: Row number (1-based) height: Row height in points

Inputs: sheet (required), row (required), height (required). Returns: result

set_sheet_colorA

Set the tab color of a sheet.

Args: sheet: Sheet index (0-based) color: Hex color string (e.g. '#FF0000')

Inputs: sheet (required), color (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 21 tools

    Disambiguation5/5

    Each tool targets a distinct action and resource (e.g., get_cell vs get_cells vs get_cell_style, delete_columns vs delete_rows vs delete_sheet). There is no overlap in functionality, and descriptions make the purpose clear.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (e.g., add_sheet, create_workbook, get_cell). Even compound names like get_cell_style and get_workbook_info adhere to this pattern, maintaining uniformity.

    Tool Count5/5

    With 21 tools, the count is well-suited for a spreadsheet server, covering workbook lifecycle, sheet management, cell operations, row/column manipulation, and formatting. It is neither too sparse nor overwhelming.

    Completeness4/5

    The tool set covers essential CRUD operations for cells, sheets, rows, and columns, plus workbook load/save and basic formatting (column width, row height, freeze panes, sheet color). However, it lacks tools to set cell styles (font, fill, border, alignment) or merge cells, which are notable gaps for a spreadsheet server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI agents to freely operate Excel spreadsheets, providing tools for workbook creation, cell manipulation, formatting, formula handling, and data export.
      11
      81 npm
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to perform comprehensive Microsoft Excel operations including data analysis, cell editing, advanced formatting, and VBA execution on Windows systems. It provides a structured workflow for managing workbooks and worksheets through a dedicated Model Context Protocol interface.
      5
      81 npm
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to automate Microsoft Excel tasks such as reading/writing cells, formatting, creating charts, and managing sheets through natural language using the Model Context Protocol.
      1
      Apache 2.0