safe-docx
safe-docx is a TypeScript-based MCP server for surgically editing, comparing, and analyzing existing Microsoft Word .docx files and Google Docs in agent workflows, with a focus on formatting preservation and deterministic edits.
Reading & Searching
read_file– Read document content in various formats (toon,json,simple) with paginationgrep– Search paragraphs using regex across one or multiple files, with optional XML-level searchget_file_status– Retrieve file/session metadata (edit count, normalization stats, cache info)
Editing
replace_text– Replace text within a paragraph by ID, preserving formattinginsert_paragraph– Insert a new paragraph before/after an anchor, with optional style cloningformat_layout– Apply paragraph spacing, table row height, and cell padding controlsclear_formatting– Remove specific run-level formatting (bold, italic, underline, highlight, color, font)
Batch & Multi-Agent Planning
init_plan– Initialize revision-bound context for coordinated multi-agent planningmerge_plans– Deterministically merge sub-agent plans and detect conflicts before applyingapply_plan– Validate and apply a batch of edit steps atomically
Saving & Comparing
save– Save as clean output, tracked-changes output, or both; supports Google Docs checkpointingcompare_documents– Compare two DOCX files and produce a tracked-changes output document
Tracked Changes
has_tracked_changes– Check whether a document contains tracked-change markersaccept_changes– Accept all tracked changes to produce a clean documentextract_revisions– Extract tracked changes as structured JSON with before/after text and comments (paginated)
Comments
add_comment/get_comments/delete_comment– Add, retrieve, and delete comments and threaded replies anchored to paragraphs or specific text
Footnotes
add_footnote/get_footnotes/update_footnote/delete_footnote– Full CRUD for footnotes anchored to paragraphs
Session Management
close_file– Close an open file session or clear all sessions
The server runs entirely locally with no external server dependencies, supporting both DOCX files and Google Docs integration.
Allows editing of Google Docs documents alongside DOCX files, supporting operations such as reading, searching, replacing text, inserting paragraphs, adding comments and footnotes, and applying layout formatting controls to documents stored in Google Drive.
Safe Docx
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.
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.
Related MCP server: DOCX MCP Server
Comparisons
Install
npm install --global @usejunior/safe-docxThen configure your MCP client with the installed executable's absolute path. For Claude Code:
claude mcp add safe-docx -- /absolute/path/to/safe-docxSee Installation and verification for locating the executable, pinning a version, and configuring clients.
Documentation
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA powerful Word document processing service based on FastMCP, enabling AI assistants to create, edit, and manage docx files with full formatting support. Preserves original styles when editing content.Last updated190
- AlicenseCqualityDmaintenanceEnables creation, editing, and management of Word documents through JSON schema with support for rich content including text formatting, tables, images, code blocks, and lists. Provides comprehensive DOCX operations including opening existing documents, modifying content, and saving files to disk.Last updated12871MIT
- AlicenseBqualityDmaintenanceEnables comprehensive management of Microsoft Word documents with 30+ tools for reading, writing, formatting, template merging, image extraction, equation extraction, and style application.Last updated241MIT
- Alicense-qualityDmaintenanceEnterprise-grade document editing and management server that enables AI-powered operations on Microsoft Word DOCX files, including creating, editing, formatting, and exporting documents through both MCP protocol and RESTful API.Last updated3MIT
Related MCP Connectors
Generate PDF/DOCX/XLSX/PPTX from templates+JSON. Convert Office/HTML/MD to PDF. Universal templating
Document API for AI-native software: render PDFs, e-sign, PAdES-seal, and verify.
AI document editing for agents: draft, edit, export .docx/PDF. 37 MCP tools; agent self-signup.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/UseJunior/safe-docx'
If you have feedback or need assistance with the MCP directory API, please join our Discord server