marekrost avatar

Mcp Server Spreadsheet

marekrost/mcp-server-spreadsheet

This gives Claude direct access to Excel, CSV, and ODS files through two modes: cell-level operations (read_cell, write_range, append_rows, insert_columns) and SQL queries via an embedded DuckDB engine. You can mix both approaches on the same file. The SQL mode is especially handy when you need to JOIN across sheets, run aggregates, or filter rows before writing them back with UPDATE or DELETE statements. Every operation is stateless and requires explicit file and sheet parameters. It treats CSV files as single-sheet workbooks and preserves formatting while only touching cell values. Useful when you're building data pipelines, cleaning datasets, or need programmatic spreadsheet manipulation without opening Excel.

GitHub stars
2
tools
25
transport
STDIO
env var
1
last updated
Aug 11, 2026

Tools

25 tools

Public tool metadata for what this MCP can expose to an agent.

list_workbooksList all spreadsheet files in a directory (non-recursive)

List all spreadsheet files in a directory (non-recursive)

No parameter schema in public metadata yet.

create_workbook_fileCreate a new empty spreadsheet file (format by extension)

Create a new empty spreadsheet file (format by extension)

No parameter schema in public metadata yet.

copy_workbookCopy an existing file to a new path

Copy an existing file to a new path

No parameter schema in public metadata yet.

list_sheetsList all sheet names in a workbook

List all sheet names in a workbook

No parameter schema in public metadata yet.

add_sheetAdd a new sheet (optional name and position)

Add a new sheet (optional name and position)

No parameter schema in public metadata yet.

rename_sheetRename an existing sheet

Rename an existing sheet

No parameter schema in public metadata yet.

delete_sheetDelete a sheet by name

Delete a sheet by name

No parameter schema in public metadata yet.

copy_sheetDuplicate a sheet within a workbook (optional new name and position)

Duplicate a sheet within a workbook (optional new name and position)

No parameter schema in public metadata yet.

read_sheetRead entire sheet as rows (optional row/column bounds)

Read entire sheet as rows (optional row/column bounds)

No parameter schema in public metadata yet.

read_cellRead a single cell value, e.g. B3

Read a single cell value, e.g. B3

No parameter schema in public metadata yet.

read_rangeRead a rectangular range, e.g. A1:D10

Read a rectangular range, e.g. A1:D10

No parameter schema in public metadata yet.

get_sheet_dimensionsGet row and column count of the used range

Get row and column count of the used range

No parameter schema in public metadata yet.

write_cellWrite a value to a single cell

Write a value to a single cell

No parameter schema in public metadata yet.

write_rangeWrite a 2D array starting at a given cell

Write a 2D array starting at a given cell

No parameter schema in public metadata yet.

append_rowsAppend rows after the last used row

Append rows after the last used row

No parameter schema in public metadata yet.

insert_rowsInsert blank or pre-filled rows at a position (shifts rows down)

Insert blank or pre-filled rows at a position (shifts rows down)

No parameter schema in public metadata yet.

delete_rowsDelete rows by index (shifts rows up)

Delete rows by index (shifts rows up)

No parameter schema in public metadata yet.

clear_rangeClear values in a range without removing rows/columns

Clear values in a range without removing rows/columns

No parameter schema in public metadata yet.

copy_rangeCopy a block of cells to another location (optionally to a different sheet)

Copy a block of cells to another location (optionally to a different sheet)

No parameter schema in public metadata yet.

insert_columnsInsert blank columns at a position

Insert blank columns at a position

No parameter schema in public metadata yet.

delete_columnsDelete columns by index

Delete columns by index

No parameter schema in public metadata yet.

search_sheetSearch for a value or regex pattern, returns matching cell references

Search for a value or regex pattern, returns matching cell references

No parameter schema in public metadata yet.

describe_tableInspect column names, inferred types, row count, and sample values

Inspect column names, inferred types, row count, and sample values

No parameter schema in public metadata yet.

sql_queryExecute a read-only SQL SELECT (supports JOINs across sheets, GROUP BY, aggregates, subqueries)

Execute a read-only SQL SELECT (supports JOINs across sheets, GROUP BY, aggregates, subqueries)

No parameter schema in public metadata yet.

sql_executeExecute INSERT INTO, UPDATE, or DELETE FROM — writes changes back to the file

Execute INSERT INTO, UPDATE, or DELETE FROM — writes changes back to the file

No parameter schema in public metadata yet.

Sponsors

Configuration

MCP_SPREADSHEET_ROOT

Optional. Absolute path to a directory; all tool path arguments are restricted to this tree. Unset = no restriction.

Readme

mcp-server-spreadsheet

mcp-name: io.github.marekrost/mcp-server-spreadsheet

Data-first MCP server for reading and writing spreadsheet files (.xlsx, .csv, .ods).

Key features

  • Multi-format — works with Excel (.xlsx), CSV (.csv), and OpenDocument (.ods) files through a unified tool interface.
  • Dual mode — cell-level workbook operations and a DuckDB-powered SQL query engine, interleaved freely on the same file.
  • Workbook essentials — worksheets, rows, columns, cells, search.
  • Data-only — preserves existing formatting but only reads and writes values.
  • Stateless — every call specifies file and sheet explicitly; no handles or sessions.
  • Atomic saves — writes go to a temp file, then os.replace() into the target path.
  • Type coercion on write — numeric strings become numbers, everything else is text.
  • SQL across sheets — JOINs, GROUP BY, aggregates, subqueries via in-memory DuckDB; mutations write back to the file.
  • CSV as single-sheet workbook — CSV files are treated as a workbook with one sheet named default.

Requirements

  • Python 3.10+

Installation

From PyPI (recommended)


View the full README on GitHub

Details

Repository
github.com/marekrost/mcp-server-spreadsheet
Categories
Databases, Data & Analytics
Package
mcp-server-spreadsheet
Transport
STDIO
Registry
MCP registry, active

Related Databases MCP servers

View all
1nsphung avatarSnowflake MCP Servernsphung/mcp-snowflake-serverA Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants2stars
2teralabx avatarLogBearteralabx/logbearLocal dev server logs for coding agents: errors, runs and diffs as read-only SQL.2stars
3cyanheads avatarUsda Mcp Servercyanheads/usda-mcp-serverSearch foods, compare nutrients, and look up the full USDA FoodData Central database.1stars
4heshamfs avatarMcp Tool Factoryheshamfs/mcp-tool-factory-tsGenerate MCP servers from natural language, OpenAPI specs, or database schemas.0stars
5pipeworx-io avatarDiscogspipeworx-io/mcp-discogsDiscogs MCP — music release / artist / label database1stars
6pipeworx-io avatarGdeltpipeworx-io/mcp-gdeltGDELT MCP — Global Database of Events, Language, and Tone (free, no auth)1stars