Labsco
MCP SERVER

Safe Docx

by UseJunior

Edit Word and OpenDocument files with an agent and keep the document intact — targeted edits, real tracked changes, comments and footnotes.

Document Conversion, PDF & TranslationVerified
Summary
The tracked-changes handling is the reason to pick this: an agent's edits arrive as revisions a human can accept or reject one by one.

Editing a contract by rewriting the file is unreviewable; here the change is anchored to a paragraph id, formatting survives, and you can save a clean copy and a marked-up copy from the same session. Selective accept and reject by author is the part that makes review practical — the model's suggestions stay separable from everyone else's, and the document comparison tool produces the same kind of output from two files you already have.

What it is

A local server and CLI for DOCX, ODT and Google Docs that works on the document's own structure, and can write clean output, tracked-changes output, or both.

What you get
  • Reading that fits a context window: content returned token-limited with pagination, a compact outline of the headings, and regex search over paragraphs in one file or across several
  • Edits addressed by paragraph id — replace text preserving formatting, insert a paragraph before or after an anchor — applied singly or as a batch of steps in one pass
  • Tracked changes as a first-class surface: check whether the body has any, accept them all for a clean copy, or accept and reject selectively by revision id or author, so an AI's edits can be separated from a colleague's
  • Revisions extracted as structured JSON with the before and after text per paragraph
  • Two documents compared into a tracked-changes output document
  • Comments added as roots or threaded replies, read back with authors, dates and anchors, and deleted with their whole thread
  • Footnotes read, added anchored to a paragraph or after specific text, updated and deleted, with the changes emitted as native tracked revisions
  • Layout and formatting controls: paragraph spacing, table row height and cell padding, and run-level formatting cleared
  • Output on your terms: save the session as clean and tracked copies, export to Markdown, semantic HTML or plain text, or convert DOCX to ODT without LibreOffice
  • Session management, with file status reporting edit counts and normalisation, and sessions closed individually or all at once
Requirements

Nothing to authorize for local files. Installed globally from npm as @usejunior/safe-docx and registered with your client by the executable's absolute path, over stdio. Google Docs are supported alongside DOCX and ODT, with some operations DOCX-only — the outline is one. It is not a layout engine: no rendering, no real-time collaboration, no pagination guarantees, and .dotx templates have to be converted to .docx first.

Setup effort

One command — npm install --global @usejunior/safe-docx