docx-mcp

by SecurityRonin

422 downloads
Not rated
GitHub

About

MCP server for reading and editing Word (.docx) documents with track changes, comments, footnotes, and structural validation. The only cross-platform MCP server combining tracked changes, threaded comments, and footnotes with OOXML-level structural validation.

Details

Author
SecurityRonin
Downloads
422
Categories
Productivity, Other, File Management

- Track changes with proper w:ins/w:del markup for revisions
- Add, reply to, and read threaded comments
- Add, list, and validate footnotes
- Validate paraId uniqueness across all document parts
- Detect and remove VML watermarks (e.g., DRAFT)
- Perform comprehensive structural audits (footnotes, headings, bookmarks, images)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name docx-mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via pip (pip install docx-mcp-server) or uvx (uvx docx-mcp-server). Configure the server in your MCP client’s settings JSON (e.g., Claude Desktop, Cursor, VS Code), then use the provided tools such as open_document, insert_text, and save_document to interact with .docx files.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "docx-mcp": {
            "docx-mcp": {
                "command": "uvx",
                "args": [
                    "docx-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "docx-mcp": {
        "command": "uvx",
        "args": [
            "docx-mcp-server"
        ]
    }
}

Give your AI coding agent the ability to create, read, and edit Word documents. Edits appear as tracked changes in Microsoft Word — red strikethrough for deletions, green underline for insertions — and after any revision session your agent can produce an email-ready change log listing every insertion, deletion, and replacement. Or compare two separate files to get the same output automatically.

Professionals who produce Word deliverables and want their AI agent to handle the document work directly:

- Legal— contract review with tracked redlines, batch clause replacement across templates, comment annotations explaining each change, footnote management
- Security & Penetration Testing— generate pentest reports from markdown findings, merge appendices from multiple engagements, add executive-summary comments, remove DRAFT watermarks before delivery
- Consulting— build proposals and SOWs from templates, convert meeting notes to formatted deliverables, bulk-update payment terms across document sets
- Compliance & Audit— structural validation of document integrity, cross-reference checking, heading-level audits, protection enforcement

"Open contract.docx, find every instance of 'Net 30', change it to 'Net 60', and add a comment on each explaining it was updated per Amendment 3. Save as contract_revised.docx."

"Convert my pentest-findings.md to a Word document using the client's report template. Add footnotes for each CVE reference."

"Open the MSA template, replace 'ACME Corp' with 'GlobalTech Inc' everywhere, update the effective date in the header, and set document protection to track-changes-only."

"Open the final deliverable, run a structural audit, check for any DRAFT or TODO markers, validate all footnote cross-references, and remove any watermarks."

Your agent handles the entire workflow — opening the file, navigating the structure, making precise edits with full revision history, validating integrity, and saving — while you focus on the substance.

claude mcp add docx-mcp -- uvx docx-mcp-server

That's it. A companionskillauto-installs the first time the server starts, teaching Claude the document editing workflow, OOXML pitfalls, and audit checklist. It auto-updates on every upgrade.

{ "mcpServers": { "docx-mcp": { "command": "uvx", "args": ["docx-mcp-server"] } } }
{ "mcpServers": { "docx-mcp": { "command": "uvx", "args": ["docx-mcp-server"] } } }
mcpServers: docx-mcp: command: uvx args: - docx-mcp-server
1. open_document("services-agreement.docx") 2. get_headings() → see document structure 3. search_text("30 days") → find the payment clause 4. delete_text(para_id, "30 days") → tracked deletion (red strikethrough) 5. insert_text(para_id, "60 days") → tracked insertion (green underline) 6. add_comment(para_id, "Extended per client request — see Amendment 3") 7. audit_document() → verify structural integrity 8. save_document("services-agreement_redlined.docx")

Open the output in Word and you see exactly what a human reviewer would produce — revision marks, comments in the margin, clean document structure.

Example: Change Log After a Revision Session

1. open_document("contract.docx") 2. replace_text(para_id, "30 days", "60 days") → tracked revision (del + ins) 3. add_comment(para_id, "Extended per Amendment 3") 4. save_document("contract_redlined.docx") 5. generate_change_summary("contract_changes.txt")
1. REPLACEMENT by Claude on 2026-05-25 Deleted: "30 days" Inserted: "60 days"

Paste it into an email, a PR description, or a handover note.

Example: Compare Two Separate Document Versions

No editing session required — point it at any two files:

1. diff_to_text("proposal_v1.docx", "proposal_v2.docx")

- proposal_v1_diff.docx— open in Word to see tracked changes inline
- proposal_v1_diff.txt— plain-text summary, ready to paste anywhere

1. create_from_markdown("pentest-report.docx", md_path="findings.md", template_path="client-template.dotx") 2. audit_document() → verify integrity 3. save_document() → ready for delivery

Your markdown findings — headings, tables of affected hosts, code blocks with proof-of-concept output, severity ratings — become a formatted Word document matching the client's template. Smart typography is applied automatically (curly quotes, em dashes, proper ellipses).

This feature is experimental and NOT suitable for production use or as the sole control for privileged, regulated, or legally sensitive documents.

scrub_piiuses Microsoft Presidio with a spaCy NER model (en_core_web_lg, ~560 MB, downloaded on first call) to detect and permanently redact personal information. Redacted spans are replaced with solid black DrawingML rectangles — the original text is deleted from the XML, not merely hidden.

What it detects reliably(via regex/pattern matching, high confidence):

- Email addresses, phone numbers, credit card numbers, SSNs, IBANs, IP addresses, US passport numbers

What it detects statistically(via NER, will have misses):

- Person names, organisation names, locations, dates

- Names in ALL-CAPS (common in ledgers, table headers, legal party designations)
- Single-token names with no surrounding context
- Non-English names (Arabic, CJK, African name patterns have low recall on this English model)
- Names embedded in legal boilerplate (Lender: Jane Doe,Authorized Signatory: John Smith)

1. open_document("sensitive.docx") 2. scrub_pii(dry_run=True) → review detected entities — check for misses 3. scrub_pii("sensitive_redacted.docx") → produce redacted copy 4. open the output in Word and verify manually before sharing

Always treat the output as a first pass requiring human review, not a finished redaction.

A.docxfile is a ZIP archive of XML files. This server unpacks the archive, edits the XML directly, and repacks it. This is what gives it the ability to produce real tracked changes, comments, and footnotes — things that higher-level document libraries can't do.

Every edit is validated against the OOXML specification before saving, catching issues like orphaned footnotes, duplicate internal IDs, and broken cross-references that would otherwise cause Word to "repair" (and silently rewrite) your document.

- Python 3.10+
- Works on macOS, Linux, and Windows

Privacy Policy·Terms of Service· © 2026 Security Ronin Ltd

Carryo is a remote MCP server for sharing Claude or ChatGPT-created HTML artifacts as live links.

MCP server that reads and writes the system clipboard — tables, text, code, JSON, URLs, images, and more. Preserves spreadsheet structure (rows/columns) that is lost when pasting into Claude directly. Claude can also write results back to your clipboard.

Read and write data from Microsoft Excel files. Supports text, formulas, sheet creation, and Windows-only live editing.

Interact with Google Docs and Google Drive for document creation, editing, and file management, with support for shared drives.

Create, read, and manipulate Microsoft Word documents.

Manage notes and files in an Obsidian vault. Requires the Obsidian Local REST API plugin.

A server for manipulating PDF files, including merging, page extraction, and searching.

Automatically tailors resumes for specific job applications using LibreOffice.

Edit Word (.docx) documents with tracked changes, redlines, and formatting preservation. MIT licensed, 100% local processing.

An MCP server for reading and writing local XMind mind map files. Exposes over 25 tools that let any MCP-compatible AI client create, navigate, and edit .xmind files directly on disk.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.