docx-mcp is an MCP (Model Context Protocol)-based server that gives AI coding agents the ability to create, read, and edit Word (.docx) documents. Its core characteristic is that it directly processes the OOXML inside .docx: a .docx is essentially a ZIP archive of XML files, and the server unpacks it, edits the XML directly, and then repackages it, so it can generate real tracked changes, threaded comments, and footnotes, which many high-level document libraries cannot achieve. Every edit is validated against the OOXML specification before saving, which can detect issues such as orphaned footnotes, duplicate internal IDs, and broken cross-references, preventing Word from triggering "repair" and silently rewriting the document.
Purpose and target audience: suitable for professionals who need to produce Word deliverables, allowing AI agents to directly handle document work. In the legal field, it can be used for contract review redlines, batch clause replacement across templates, adding explanatory comments for each revision, and footnote management; in the security and penetration testing field, it can be used to generate penetration test reports from markdown findings, merge appendices from multiple assessments, add executive summary comments, and remove DRAFT watermarks before delivery; in the consulting field, it can be used to generate proposals and statements of work (SOW) from templates, convert meeting notes into formatted deliverables, and batch update payment terms; in the compliance and audit field, it can be used for structural validation of document integrity, cross-reference checking, heading hierarchy auditing, and enforcement of protection policies.
Main capabilities: edits appear in Word as revisions—deletions are shown as red strikethrough, insertions as green underline; after revisions are complete, the agent can generate an email-ready changelog listing every insertion, deletion, and replacement, or directly compare two files to automatically obtain the same output. It supports comment and footnote management, headers and footers and styles, properties and images, sections and cross-references, protection and merging, as well as validation and auditing. Any two documents can be compared, generating proposal_v1_diff.docx (to view revisions inline in Word) and proposal_v1_diff.txt (a plain text summary). Reports can be generated from markdown: headings, tables of affected hosts, code blocks with proof-of-concept output, severity ratings, etc. are converted into a formatted Word document matching the client template, with smart typography automatically applied (curly quotes, dashes, ellipses).
How to use (example instructions): review a contract—"open contract.docx, findChange all ‘Net 30’ to ‘Net 60’, and add a comment at each place stating that it was updated pursuant to Amendment 3, then save as contract_revised.docx.” Generate a report from markdown—“Use the client report template to convert pentest-findings.md into a Word document, adding a footnote for each CVE reference.” Batch-edit a template library—“Open the MSA template, replace all ‘ACME Corp’ with ‘GlobalTech Inc’, update the effective date in the header, and set document protection to allow revisions only.” Pre-send audit—“Open the final deliverable, perform a structural audit, check for DRAFT or TODO markers, verify all footnote cross-references, and remove watermarks.”
Installation and configuration: With Claude Code (recommended), after installation the server automatically installs companion skills on first startup, teaching Claude document-editing workflows, OOXML pitfalls, and audit checklists, and automatically updates with each upgrade; Claude Desktop requires adding the server to MCP settings; Cursor / Windsurf / VS Code require adding it to their respective MCP configuration files. (The source material does not provide specific installation commands or configuration code content.)
Limitations and cautions: PII scrubbing (scrub_pii) is an experimental feature, is not suitable for production environments, and cannot be used as the sole control for privileged, regulated, or legally sensitive documents. It uses Microsoft Presidio and spaCy NER models (en_core_web_lg, about 560 MB, downloaded on first call) to detect and permanently redact personal information; redacted spans are replaced with solid black DrawingML rectangles, and the original text is deleted from the XML rather than merely hidden. Reliable detection (regex/pattern matching, high confidence) includes: email addresses, phone numbers, credit card numbers, SSNs, IBANs, IP addresses, US passport numbers; statistical detection (NER, will have omissions) includes: personal names, organization names, locations, dates; known NER gaps include: all-uppercase names (common in ledgers, headers, legal party designations), single-token names without contextual context, non-English names (Arabic, CJK, and African name patterns have low recall on this English model), names embedded in legal boilerplate text (such as Lender: Jane Doe, Authorized Signatory: John Smith). It is recommended to always treat the output as a first pass requiring human review. Supports macOS, Linux, and Windows.