Carrot MCP Office Server
Project description
carrot-mcp-office
Carrot MCP Office Server — Excel and Word automation via MCP.
Features
- Auto-backup: All modifications are automatically versioned to
%APPDATA%/carrot-mcp/office/ - Legacy format support: Automatically converts
.doc→.docxand.xls→.xlsxvia win32com (Windows) - Version history: Track and restore file versions
Tools
Excel Tools
| Tool | Description |
|---|---|
workbook_metadata |
Get workbook metadata (sheet names, properties) |
workbook_search |
Search for values in a sheet |
create_sheet |
Create a new sheet |
rename_sheet |
Rename a sheet |
delete_sheet |
Delete a sheet |
insert_rows |
Insert rows into a sheet |
delete_rows |
Delete rows from a sheet |
insert_columns |
Insert columns into a sheet |
delete_columns |
Delete columns from a sheet |
read_range |
Read cell values from a range |
write_range |
Write a 2D array to a range (supports formulas) |
copy_range |
Copy a range to another location |
delete_range |
Clear cell contents in a range |
read_chart |
Read chart information from a sheet |
write_chart |
Create a chart (bar, line, pie, scatter) |
format_range |
Format cells (font, color, alignment, merge/unmerge) |
Word Tools
| Tool | Description |
|---|---|
inspect |
Inspect document structure |
insert_para |
Insert a paragraph |
modify_para |
Modify paragraph text |
format_para |
Format a paragraph (style, alignment, font) |
delete_para |
Delete a paragraph |
insert_table |
Insert a table with optional data |
modify_table |
Modify a table cell |
format_table |
Apply a table style |
delete_table |
Delete a table |
insert_image |
Insert an image |
delete_image |
Delete an inline image |
Backup Tools
| Tool | Description |
|---|---|
backup_history |
List all backup versions of a file |
backup_restore |
Restore a file to a specific backup version |
Backup System
Backups are stored in %APPDATA%/carrot-mcp/office/ with mirrored directory structure:
%APPDATA%/carrot-mcp/office/
├── _last_modified.txt
├── D/
│ └── docs/
│ └── reports/
│ ├── _versions.json
│ ├── file_v001.xlsx
│ ├── file_v002.xlsx
│ └── ...
- Auto-versioning: Every modification creates a new version
- 100 version limit: Old versions are pruned when exceeded
- 14-day expiry: Versions older than 14 days are automatically deleted
- Version numbers: Each mutation returns a
versionnumber in the result for LLM context
Configuration
| Environment Variable | Default | Description |
|---|---|---|
CARROT_MCP_BACKUP_MAX_VERSIONS |
100 |
Max versions to keep per file |
CARROT_MCP_BACKUP_MAX_AGE_DAYS |
14 |
Days before auto-deletion |
CARROT_MCP_BACKUP_ROOT |
%APPDATA%/carrot-mcp/office/ |
Override backup root directory |
Legacy Format Conversion
When you pass a .doc or .xls file path, the server automatically:
- Detects the legacy format
- Converts to
.docx/.xlsxvia win32com (preserves original file) - Operates on the new format
Requires pywin32 on Windows. Returns error on other platforms.
Usage
# Standalone
uv run carrot-mcp office
# Via main CLI
uv run carrot-mcp office
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carrot_mcp_office-0.1.2.tar.gz.
File metadata
- Download URL: carrot_mcp_office-0.1.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a2b378305517cb4718bc2ae3f73b5347e1715d7858d12d7d8fbce6f9b2a8340
|
|
| MD5 |
13fb1c8ab31515e8310dda1e05509fda
|
|
| BLAKE2b-256 |
46bb1e816fee370fd6d1e3963734556a8cf52a52255493d4108a8bee7f90db6e
|
File details
Details for the file carrot_mcp_office-0.1.2-py3-none-any.whl.
File metadata
- Download URL: carrot_mcp_office-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb7ee2e1d6d8d158c1df535bfb046cefb0e18cb54d4520ebc0946c6b735b2b0
|
|
| MD5 |
d174e1e18cdf6503893d6d55e499d642
|
|
| BLAKE2b-256 |
06e29d3fd453d0d8581bcc5e4e33f490331c89fdef9fbcaa7c8fe14718d337c9
|