{"id":49620840,"url":"https://github.com/marekrost/mcp-server-spreadsheet","last_synced_at":"2026-06-07T06:00:40.172Z","repository":{"id":341413298,"uuid":"1169968536","full_name":"marekrost/mcp-server-spreadsheet","owner":"marekrost","description":"Data-first MCP server for reading and writing spreadsheet files (.xlsx, .csv, .ods) - cell-level ops + DuckDB SQL engine","archived":false,"fork":false,"pushed_at":"2026-03-08T07:19:59.000Z","size":167,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T02:58:01.144Z","etag":null,"topics":["claude","csv","duckdb","mcp","mcp-server","model-context-protocol","ods","openpyxl","python","spreadsheet","sql","xlsx"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marekrost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T14:04:30.000Z","updated_at":"2026-03-08T16:49:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/marekrost/mcp-server-spreadsheet","commit_stats":null,"previous_names":["marekrost/mcp-server-spreadsheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marekrost/mcp-server-spreadsheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekrost%2Fmcp-server-spreadsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekrost%2Fmcp-server-spreadsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekrost%2Fmcp-server-spreadsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekrost%2Fmcp-server-spreadsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marekrost","download_url":"https://codeload.github.com/marekrost/mcp-server-spreadsheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marekrost%2Fmcp-server-spreadsheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34010556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","csv","duckdb","mcp","mcp-server","model-context-protocol","ods","openpyxl","python","spreadsheet","sql","xlsx"],"created_at":"2026-05-05T02:00:24.248Z","updated_at":"2026-06-07T06:00:40.167Z","avatar_url":"https://github.com/marekrost.png","language":"Python","funding_links":[],"categories":["カテゴリ"],"sub_categories":["📁 \u003ca name=\"file-system--storage\"\u003e\u003c/a\u003eファイルシステム・ストレージ"],"readme":"# mcp-server-spreadsheet\n\nmcp-name: io.github.marekrost/mcp-server-spreadsheet\n\nData-first MCP server for reading and writing spreadsheet files (`.xlsx`, `.csv`, `.ods`).\n\n## Key features\n\n- **Multi-format** — works with Excel (`.xlsx`), CSV (`.csv`), and OpenDocument (`.ods`) files through a unified tool interface.\n- **Dual mode** — cell-level workbook operations and a DuckDB-powered SQL query engine, interleaved freely on the same file.\n- **Workbook essentials** — worksheets, rows, columns, cells, search.\n- **Data-only** — preserves existing formatting but only reads and writes values.\n- **Stateless** — every call specifies `file` and `sheet` explicitly; no handles or sessions.\n- **Atomic saves** — writes go to a temp file, then `os.replace()` into the target path.\n- **Type coercion on write** — numeric strings become numbers, everything else is text.\n- **SQL across sheets** — JOINs, GROUP BY, aggregates, subqueries via in-memory DuckDB; mutations write back to the file.\n- **CSV as single-sheet workbook** — CSV files are treated as a workbook with one sheet named `default`.\n\n## Requirements\n\n- Python 3.13+\n\n## Installation\n\n### From PyPI (recommended)\n\nNo local checkout needed — just configure your MCP client (see below).\n\n### From source (for development)\n\n```bash\ngit clone https://github.com/marekrost/mcp-server-spreadsheet.git\ncd mcp-server-spreadsheet\nuv sync\n```\n\n## Usage\n\n### Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n**Using PyPI (recommended):**\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-spreadsheet\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-server-spreadsheet\"]\n    }\n  }\n}\n```\n\n**Using local source:**\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-spreadsheet\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"/path/to/mcp-server-spreadsheet\", \"main.py\"]\n    }\n  }\n}\n```\n\n### Claude Code\n\nAdd to your `.mcp.json`:\n\n**Using PyPI (recommended):**\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-spreadsheet\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-server-spreadsheet\"]\n    }\n  }\n}\n```\n\n**Using local source:**\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-spreadsheet\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"/path/to/mcp-server-spreadsheet\", \"main.py\"]\n    }\n  }\n}\n```\n\n### Standalone (stdio transport)\n\n```bash\n# PyPI\nuvx mcp-server-spreadsheet\n\n# Local source\nuv run main.py\n```\n\n## Format notes\n\n| Format | Sheets | Formulas | Types |\n|---|---|---|---|\n| `.xlsx` | Multiple | Preserved as strings | Native (int, float, date, bool) |\n| `.ods` | Multiple | Not preserved | Native (int, float, date, bool) |\n| `.csv` | Single (`default`) | N/A | Inferred on load (int, float, text) |\n\nSheet management tools (`add_sheet`, `delete_sheet`, `copy_sheet`) raise an error for CSV files.\n\n## Tools\n\n### Workbook Operations\n\n| Tool | Description |\n|---|---|\n| `list_workbooks` | List all spreadsheet files in a directory (non-recursive) |\n| `create_workbook_file` | Create a new empty spreadsheet file (format by extension) |\n| `copy_workbook` | Copy an existing file to a new path |\n\n### Sheet Operations\n\n| Tool | Description |\n|---|---|\n| `list_sheets` | List all sheet names in a workbook |\n| `add_sheet` | Add a new sheet (optional name and position) |\n| `rename_sheet` | Rename an existing sheet |\n| `delete_sheet` | Delete a sheet by name |\n| `copy_sheet` | Duplicate a sheet within a workbook (optional new name and position) |\n\n### Reading Data\n\n| Tool | Description |\n|---|---|\n| `read_sheet` | Read entire sheet as rows (optional row/column bounds) |\n| `read_cell` | Read a single cell value, e.g. `B3` |\n| `read_range` | Read a rectangular range, e.g. `A1:D10` |\n| `get_sheet_dimensions` | Get row and column count of the used range |\n\n### Writing Data\n\n| Tool | Description |\n|---|---|\n| `write_cell` | Write a value to a single cell |\n| `write_range` | Write a 2D array starting at a given cell |\n| `append_rows` | Append rows after the last used row |\n| `insert_rows` | Insert blank or pre-filled rows at a position (shifts rows down) |\n| `delete_rows` | Delete rows by index (shifts rows up) |\n| `clear_range` | Clear values in a range without removing rows/columns |\n| `copy_range` | Copy a block of cells to another location (optionally to a different sheet) |\n\n### Column Operations\n\n| Tool | Description |\n|---|---|\n| `insert_columns` | Insert blank columns at a position |\n| `delete_columns` | Delete columns by index |\n\n### Search\n\n| Tool | Description |\n|---|---|\n| `search_sheet` | Search for a value or regex pattern, returns matching cell references |\n\n### Table Mode (SQL)\n\n| Tool | Description |\n|---|---|\n| `describe_table` | Inspect column names, inferred types, row count, and sample values |\n| `sql_query` | Execute a read-only SQL `SELECT` (supports JOINs across sheets, GROUP BY, aggregates, subqueries) |\n| `sql_execute` | Execute `INSERT INTO`, `UPDATE`, or `DELETE FROM` — writes changes back to the file |\n\nSQL examples:\n\n```sql\n-- Filter and sort\nSELECT name, revenue FROM Sales WHERE status = 'Active' ORDER BY revenue DESC LIMIT 20\n\n-- Cross-sheet JOIN\nSELECT o.order_id, c.name FROM Orders o JOIN Customers c ON o.customer_id = c.id\n\n-- Aggregate\nSELECT department, COUNT(*) AS n, AVG(salary) AS avg FROM Employees GROUP BY department\n\n-- Mutate\nUPDATE Sales SET status = 'Closed' WHERE quarter = 'Q1' AND revenue \u003c 1000\nDELETE FROM Logs WHERE date \u003c '2024-01-01'\n```\n\nSheet names with spaces must be quoted: `SELECT * FROM \"Q1 Sales\"`.\n\n## Common Parameters\n\nEvery sheet-level tool accepts:\n\n| Parameter | Required | Description |\n|---|---|---|\n| `file` | yes | Path to the spreadsheet file (.xlsx, .csv, or .ods) |\n| `sheet` | no | Sheet name. Defaults to the first sheet in the workbook |\n\nAll row/column indices are **1-based**. Cell references use A1 notation (`A1`, `$B$2`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekrost%2Fmcp-server-spreadsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarekrost%2Fmcp-server-spreadsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarekrost%2Fmcp-server-spreadsheet/lists"}