RX

ruriazz/xlsx-tools-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

4 stars 0 forks Качество 79 Тренд 19MIT

An MCP server for reading and writing Excel (.xlsx) files with high accuracy, while preserving the file's existing structure, styles, and formulas.

Обзор

An MCP server for reading and writing Excel (.xlsx) files with high accuracy, while preserving the file's existing structure, styles, and formulas. xlsx-tools-mcp exposes 29 Model Context Protocol (MCP) tools that give an LLM agent accurate, structure-preserving read write access to Excel .xlsx files. It runs as a standard stdio MCP server: you install it and register it with an MCP client (Claude Code, OpenCode, etc.), and the client's agent can list sheets, read cell ranges, search values, aggregate data, write cells/formulas, manage sheets/rows/columns, apply styles, and force formula recalculation. It is built around the principle that editing an existing workbook should destroy what it doesn't touch. - — writes load the existing workbook and save it back, preserving styles, merged cells, comments, and any aspect the edit doesn't touch. - — openpyxl writes formula strings but never evaluates them.

README

Показан фрагмент оригинального README. Открыть оригинал.

xlsx-tools-mcp

An MCP server for reading and writing Excel (.xlsx) files with high accuracy, while preserving the file’s existing structure, styles, and formulas.


Overview

xlsx-tools-mcp exposes 29 Model Context Protocol (MCP) tools that give an LLM agent accurate, structure-preserving read and write access to Excel .xlsx files. It runs as a standard stdio MCP server: you install it and register it with an MCP client (Claude Code, OpenCode, etc.), and the client’s agent can list sheets, read cell ranges, search values, aggregate data, write cells/formulas, manage sheets/rows/columns, apply styles, and force formula recalculation.

It is built around the principle that editing an existing workbook should not destroy what it doesn’t touch.

Features

  • Structure-preserving writes via openpyxl — writes load the existing workbook and save it back, preserving styles, merged cells, comments, and any aspect the edit doesn’t touch.
  • Never-stale formula results via LibreOffice recalculation — openpyxl writes formula strings but never evaluates them. After every value/formula write the server runs a headless LibreOffice pass to recompute real results, then returns errors_found — any Excel error values (#REF!, #DIV/0!, #N/A, …) produced by the recalculation.
  • Fast reads via python-calamine — a Rust-backed parser for accurate, fast type inference, with an automatic openpyxl fallback when you need formulas/styles/comments or when calamine can’t parse the file.
  • pandas-based grouping/aggregation & querying — aggregate_sheet and query_sheet perform operations without destroying source structure, equipped with AST expression validation to block code injection.
  • Native Excel objects — create formal Excel Tables (create_table) with autofilter and styles, and native charts (create_chart for bar, line, pie, scatter).
  • Sheet lifecycle & formatting — rename sheets (rename_sheet), duplicate sheets with styles intact (copy_sheet), clear ranges (clear_range), and auto-fit column widths (autofit_columns).
  • Cross-platform reliability (Windows, macOS, Linux) — case-insensitive path confinement, comma or semicolon ; environment delimiters, safe atomic file replacement with transient lock retry (WinError 32 / antivirus defense), and silent headless recalculation without window flicker.
Открыть полный README на GitHub

Установка

uvx xlsx-tools-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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