Skip to main content

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.docx and .xls.xlsx via win32com (Windows)
  • Version history: Track and restore file versions

Tools

Tool Description
version Get server version info and backup configuration

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)

All Excel tools accept .xls/.xlsx files (.xls auto-converted on Windows).

Word Tools

Tool Description
inspect Inspect document structure (paragraphs, tables, images, styles). Only returns non-empty paragraphs.
get_table Read table content as 2D array.
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
get_outline Get document outline as tree + flat list. Use flat array indices (0-based position) with get_content_by_outline.
get_content_by_outline Get paragraphs, tables, and images for sections identified by flat outline indices. Supports int list, range strings like "0-4", and mixed. Set text_only=true for leaner output (plain text strings, 2D table arrays, no redundant metadata).
search Full-text search in paragraphs. Supports exact match (case-insensitive default) or regex. Returns matches with index, style, and surrounding context.

All Word tools accept .doc/.docx files (.doc auto-converted on Windows).

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 version number 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:

  1. Detects the legacy format
  2. If a .docx/.xlsx with the same name already exists in the same directory, reuses it directly (skips conversion)
  3. Otherwise converts via win32com (preserves original file)
  4. Operates on the .docx/.xlsx 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carrot_mcp_office-0.2.5.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

carrot_mcp_office-0.2.5-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file carrot_mcp_office-0.2.5.tar.gz.

File metadata

  • Download URL: carrot_mcp_office-0.2.5.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for carrot_mcp_office-0.2.5.tar.gz
Algorithm Hash digest
SHA256 699b40e28433bff4664c3c52aec3b7fcc4bf548b771acd9866e01ad707d9d9ee
MD5 d6df1b286d78500a062733ae12f0e434
BLAKE2b-256 cc8299c2233b9c4c67dfa09c3237564778d6337afdf40d62bcdde12e8fdbb6bd

See more details on using hashes here.

File details

Details for the file carrot_mcp_office-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for carrot_mcp_office-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 26fde1579623136dff4f965b4bc7f265a0f9df9e998b5223e677fbcbbc4dd394
MD5 df0798dbb360d63cbeca150271408f99
BLAKE2b-256 3a8273e78305fb1890591d63ebbd9338a6423e82354214d15c6e55d34c6c670d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

This release

0.2.5 This release

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page