Safe Docx MCP Server
io.github.UseJunior/safe-docx
AI-native surgical editing of Word .docx and OpenDocument .odt files with formatting preservation
What is the Safe Docx MCP server?
Safe Docx is a local MCP server and CLI for reading, searching, editing, comparing, converting, and saving Word and OpenDocument files. It preserves document structure and formatting, enabling coding agents to make targeted edits while producing both clean and tracked-changes output.
Safe Docx lets AI agents perform precise, surgical edits on .docx and .odt files without corrupting formatting or document structure. You can ask it to find and change specific clauses, generate clean and tracked-changes versions, and compare documents—ideal for contract editing, document automation, and collaborative review workflows.
How to install Safe Docx
Copy-paste configuration for popular MCP clients.
Tools & capabilities
Tools this server exposes to the agent.
read_document— Read and parse Word .docx and OpenDocument .odt filessearch_document— Search for text and content within documentsedit_document— Make targeted edits to document content while preserving formattingcompare_documents— Compare two documents to identify differencesconvert_document— Convert between document formatssave_document— Save documents in clean or tracked-changes format
Use cases
- Edit contracts by finding and changing specific clauses (e.g., governing law) while preserving all other formatting
- Generate both clean and tracked-changes versions of edited documents for review and approval
- Search large documents for specific text or content patterns
- Compare two versions of a document to identify what changed
- Automate document editing workflows with AI agents without manual intervention
Safe Docx MCP server FAQ
Safe Docx is an MCP server that lets AI coding agents read, search, edit, and save Word (.docx) and OpenDocument (.odt) files while preserving formatting and document structure. It can produce both clean copies and tracked-changes versions.
Yes, Safe Docx is open-source under the Apache 2.0 license and available for free on npm.
Install via npm with `npm install --global @usejunior/safe-docx`, then configure your MCP client (Claude Code, Cursor, or Antigravity) with the absolute path to the safe-docx executable.
No, Safe Docx is a local MCP server that runs on your machine and does not require any authentication or external API keys.
Safe Docx supports Word .docx files and OpenDocument .odt files. It does not support .dotx templates; they must be converted to .docx first.
No, Safe Docx is not a visual or layout editor. It focuses on precise content and structure editing without browser rendering or pixel-level pagination guarantees.
README (reference)
Source of truth, from the repository.
Safe Docx
Edit Word and OpenDocument files with coding agents.
<!-- SYNC:badges BEGIN --> <!-- SYNC:badges END --> <!-- SYNC:lang-nav BEGIN -->English · Español · 简体中文 · Português · Deutsch
<!-- SYNC:lang-nav END -->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.
Example
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.
Comparisons
Install
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
Antigravity CLI
Add Safe Docx to ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"safe-docx": {
"command": "/absolute/path/to/safe-docx",
"args": []
}
}
}
Restart agy, then ask it to edit a .docx file. Antigravity may ask you to approve the MCP server before first use.
See Installation and verification for locating the executable, pinning a version, and configuring clients.
Documentation
- Installation and verification
- Tool reference
- TypeScript library
- Architecture
- Testing and evidence
- Trust and conformance
- Contributing
Standards Conformance
Browse the Safe Docx Conformance Explorer to navigate ECMA-376 sections, OOXML schema declarations, capability claims, explicit non-goals, and measured cross-implementation outcomes.
The generated repository conformance report remains the source-controlled record of targeted sections, non-goals, and verification references.
What Safe Docx Is Not Optimized For
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.
Related MCP servers

Agent Email
Local email connectivity for AI agents — read, draft, send, and organize Outlook mail via MCP

Screenshot, extract content, and render web pages. PNG/JPEG/WebP/PDF, batch, signed URLs.

Utilify
AI agents compare and sign up for Texas utility plans: electricity, internet, gas, water, trash.

Uuriko Project Room hosted MCP: agent room packets and kits. No OAuth.

VAAS-X Cognitive Memory
Persistent, outcome-grounded episodic memory for Claude. 14ms CPU retrieval, no GPU, no vector DB.
