Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides comprehensive read/write access to Word documents, including comments, track changes, and reply threads.

README.md

docx-comments-mcp

An MCP server for Claude Desktop that provides comprehensive read/write access to Word documents, including comments, track changes, and reply threads — features that python-docx doesn't fully expose.

<!-- mcp-name: io.github.kosh-jelly/docx-comments -->

Features

  • Read documents: Extract text, comments (with reply threads), and track changes
  • Add comments: Anchor comments to specific text in the document
  • Reply to comments: Create threaded replies on existing comments
  • Track changes: Make edits with insertions and deletions tracked
  • Resolve comments: Mark comments as done
  • Accept/reject changes: Apply or undo tracked changes

Installation

# Clone the repository
git clone https://github.com/your-username/docx-comments-mcp.git
cd docx-comments-mcp

# Install with uv
uv sync

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "docx-comments": {
      "command": "uv",
      "args": ["--directory", "/path/to/docx-comments-mcp", "run", "docx-comments-mcp"]
    }
  }
}

Available Tools

read_document

Read a Word document and extract content, comments, and track changes.

Parameters:

  • path (required): Path to the .docx file
  • include_text (default: true): Include full document text
  • include_comments (default: true): Include comments with anchors
  • include_track_changes (default: true): Include insertions/deletions

Returns: ``json { "metadata": { "path": "/path/to/file.docx", "author": "Original Author", "created": "2025-01-15T10:30:00Z", "modified": "2025-01-18T14:22:00Z", "word_count": 4523 }, "paragraphs": [ {"index": 0, "text": "The paragraph content...", "style": "Heading 1"} ], "comments": [ { "id": 0, "author": "Dr. Smith", "date": "2025-01-16T09:15:00Z", "text": "Consider citing Main & Hesse here", "anchor_text": "disorganized attachment patterns", "anchor_paragraph": 12, "resolved": false, "replies": [ { "id": 1, "parent_id": 0, "author": "Josh", "date": "2025-01-17T11:00:00Z", "text": "Added citation — see revision" } ] } ], "track_changes": [ { "id": 5, "type": "deletion", "author": "Dr. Smith", "date": "2025-01-16T09:20:00Z", "text": "invariably", "paragraph": 8 } ] } ``

create_comment

Add a comment anchored to specific text in a Word document.

Parameters:

  • path (required): Path to the .docx file
  • anchor_text (required): Text to anchor the comment to (must exist and be unique)
  • comment_text (required): The comment content
  • author (default: "Claude"): Comment author name
  • output_path (optional): Save to new file; if omitted, creates timestamped backup and overwrites

Returns: ``json { "success": true, "comment_id": 3, "anchored_to": "the exact text that was matched", "paragraph": 15, "output_path": "/path/to/output.docx" } ``

create_reply

Add a reply to an existing comment.

Parameters:

  • path (required): Path to the .docx file
  • parent_comment_id (required): ID of comment to reply to
  • reply_text (required): The reply content
  • author (default: "Claude"): Reply author name
  • output_path (optional): Save to new file; if omitted, creates backup

create_track_change

Make an edit with track changes enabled (insertion, deletion, or replacement).

Parameters:

  • path (required): Path to the .docx file
  • find_text (required): Text to find and modify
  • replace_with (required): Replacement text (empty string for deletion)
  • author (default: "Claude"): Change author name
  • output_path (optional): Save to new file; if omitted, creates backup

mark_comment_resolved

Mark a comment as resolved/done.

Parameters:

  • path (required): Path to the .docx file
  • comment_id (required): ID of comment to resolve
  • output_path (optional): Save to new file; if omitted, creates backup

accept_change

Accept a tracked change (apply permanently).

Parameters:

  • path (required): Path to the .docx file
  • change_id (required): ID of the track change to accept
  • output_path (optional): Save to new file; if omitted, creates backup

reject_change

Reject a tracked change (undo the change).

Parameters:

  • path (required): Path to the .docx file
  • change_id (required): ID of the track change to reject
  • output_path (optional): Save to new file; if omitted, creates backup

Safety Features

  • Automatic backups: When modifying a file without specifying output_path, a timestamped backup is created (e.g., document.backup_20250119_143022.docx)
  • Atomic writes: Uses temporary files and atomic moves to prevent corruption
  • Unique anchor matching: Comments require unique anchor text to prevent ambiguity

Development

# Install dev dependencies
uv sync
uv pip install pytest pytest-asyncio

# Run tests
uv run pytest -v

# Run specific test file
uv run pytest tests/test_reader.py -v

Architecture

src/docx_comments_mcp/
├── __init__.py
├── server.py          # MCP server with tool definitions
├── reader.py          # Read operations (document, comments, track changes)
├── writer.py          # Write operations (add comments, track changes)
└── xml_helpers.py     # Low-level OOXML parsing utilities

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Files & Docs servers.