
Mcp Server Spreadsheet
io.github.marekrost由 GitHub 账号 marekrost 发布v0.3.3更新于 Oct 25, 2026
MCP server for spreadsheet files (.xlsx, .csv, .ods) - cell-level ops + DuckDB SQL engine.
概览
本地 MCP 服务器,用于读写 Excel、CSV 和 ODS 表格,提供单元格级工具和 DuckDB SQL 引擎。
- 可以做什么
- 列出、创建和复制工作簿文件,并列出、新增、重命名、删除或复制工作表(CSV 视为名为 default 的单表)。读取整张表、单个单元格、区域和已用范围尺寸。写入单元格、区域和追加行;插入、删除、清空和复制行、列与区域。按值或正则搜索工作表。查看表结构并执行只读 SQL SELECT(含跨表 JOIN 和聚合),或执行 INSERT、UPDATE、DELETE 并写回文件。
- 适用场景
- 适合让助手在本机查看或修改表格数据,例如汇总 CSV、调整 Excel 工作簿结构,或用 SQL 查询多个工作表而无需逐格读取。
- 运行要求
- 以 PyPI 包 mcp-server-spreadsheet 通过 uvx 本地 stdio 运行,或用 uv 从源码运行;需要 Python 3.10 及以上。无需认证。可选设置 MCP_SPREADSHEET_ROOT 为绝对目录,将所有路径参数限制在该目录内。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Server Spreadsheet,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
fileandsheetexplicitly; 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)
No local checkout needed — just configure your MCP client (see below).
From source (for development)
Usage
Claude Desktop
Add to your claude_desktop_config.json:
Using PyPI (recommended):
Using local source:
Claude Code
Add to your .mcp.json:
Using PyPI (recommended):
Using local source:
Standalone (stdio transport)
Restricting file access to a directory (optional)
Set MCP_SPREADSHEET_ROOT to confine all path arguments to a single directory tree. Paths outside it are rejected with a clear error returned to the agent.
Unset (the default), any path the server process can access is allowed.
Format notes
Sheet management tools (add_sheet, delete_sheet, copy_sheet) raise an error for CSV files.
Tools
Workbook Operations
Sheet Operations
Reading Data
Writing Data
Column Operations
Search
Table Mode (SQL)
SQL examples:
Sheet names with spaces must be quoted: SELECT * FROM "Q1 Sales".
Sheets whose table doesn't start at row 1
All three SQL tools accept header_row and data_start_row. Each can be an
int (applied to every sheet) or a {sheet_name: row} mapping (sheets not
listed fall back to the default). Use header_row when column titles live
below row 1, and data_start_row when extra rows (e.g. a units row) sit
between the header and the data.
sql_execute preserves rows above header_row when writing changes back.
Running tests
Every tool is exercised against .xlsx, .csv, and .ods fixtures generated into a temp directory.
Common Parameters
Every sheet-level tool accepts:
All row/column indices are 1-based. Cell references use A1 notation (A1, $B$2).
来源:README.md,提交 13e9e25
工具
0版本历史
1- v0.3.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分