If you're building AI workflows that need to edit existing Word documents without breaking formatting, this gives your MCP client surgical tools for the job. It exposes read_file to parse docx into stable paragraph IDs, grep to locate text, replace_text for pinpoint edits, and save to write both clean and tracked changes outputs. The architecture is TypeScript native, no Python or LibreOffice required. You get comment and footnote support, revision extraction as JSON, and compare_documents for diff workflows. It's built for the specific pain point where an agent proposes contract or document changes and you need deterministic, formatting-preserving edits that a human can review in Word's track changes.
Edit Word and OpenDocument files with coding agents.
English · Español · 简体中文 · Português · Deutsch
Safe Docx is a local MCP server and CLI for reading, searching, editing, comparing, converting, and saving document files. It preserves DOCX structure and can produce clean or tracked-changes output.
Ask your coding agent:
Edit NDA.docx. Change the governing law from New York to Delaware.
Save a clean copy and a tracked-changes copy. Do not change anything else.
Safe Docx finds the clause, applies the targeted edit, and writes both files for review. The rest of the document stays outside the requested edit.
Follow the complete editing walkthrough.
npm install --global @usejunior/safe-docx
Then configure your MCP client with the installed executable's absolute path. For Claude Code:
claude mcp add safe-docx -- /absolute/path/to/safe-docx
See Installation and verification for locating the executable, pinning a version, and configuring clients.
See the generated ECMA-376 conformance report for targeted sections, explicit non-goals, and verification references.
Safe Docx is not a visual editor or layout engine. It does not provide browser rendering, real-time collaboration, or pixel-level pagination guarantees. .dotx templates must be converted to .docx before use.
csoai-org/pdf-document-mcp
xt765/mcp-document-converter
io.github.xjtlumedia/markdown-formatter
io.github.ai-aviate/better-notion
suekou/mcp-notion-server
meterlong/mcp-doc