Safe Docx

io.github.UseJuniorPublished by GitHub account UseJuniorv0.25.0Updated Oct 24, 2026

AI-native surgical editing of Word .docx and OpenDocument .odt files with formatting preservation

Overview

AI-generated overview

Local MCP server and CLI that lets an assistant read, search, edit, compare and convert Word .docx and OpenDocument .odt files while preserving formatting.

What you can do
  • Read and navigate documents: read files, get outlines and sections, and grep text
  • Edit content: replace text, insert paragraphs, run batch edits, clear formatting
  • Apply formatting: layout, numbering, sections and section breaks
  • Handle tracked changes: detect, extract, accept or reject revisions, including AI edits
  • Compare documents and manage comments and footnotes
  • Save, export, convert to ODT, check file status and close files
When to use it
Useful when an assistant needs to make targeted edits to Word or OpenDocument files, such as changing a clause in a contract, and produce clean and tracked-changes copies for review without disturbing the rest of the document.
Requirements
Runs as a local stdio process on the user's desktop, installed from the npm package @usejunior/safe-docx (Node.js/npx). Clients should be configured with the absolute path to the safe-docx executable, since desktop apps may not inherit the terminal PATH. No authentication, environment variables or headers are declared.
Before you install
Tools write, modify and delete document content, comments and footnotes, and can accept or reject tracked changes, so edits should be reviewed before saving over originals. It is not a visual editor or layout engine and gives no pixel-level pagination guarantees; .dotx templates must be converted to .docx first.

Installation

In SourceWeft

  1. Open Safe Docx in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@usejunior/safe-docx

Edit Word and OpenDocument files with coding agents.

[npm version] [License: Apache 2.0]

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. Documents are processed on your machine.

Example

Ask your coding agent:

text
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.

Install

bash
npm install --global @usejunior/safe-docxsafe-docx --help

The package installs both safe-docx and safedocx; use safe-docx in new configurations.

Configure An MCP Client

Locate the installed executable with command -v safe-docx (where safe-docx on Windows). Desktop applications may not inherit your terminal's PATH, so configure clients with that absolute path. The server takes no arguments and uses stdio.

Claude Code:

bash
claude mcp add safe-docx -- /absolute/path/to/safe-docx

JSON-based clients, including Antigravity CLI (~/.gemini/config/mcp_config.json):

json
{  "mcpServers": {    "safe-docx": {      "command": "/absolute/path/to/safe-docx",      "args": []    }  }}

See installation and verification for pinning a version, inspecting the package before install, and building from source.

Tools

  • Read and navigate: read_file, get_document_outline, get_sections, grep
  • Edit: replace_text, insert_paragraph, batch_edit, clear_formatting
  • Format: format_layout, format_numbering, format_section, insert_section_break
  • Tracked changes: has_tracked_changes, extract_revisions, accept_changes, accept_ai_edits, reject_ai_edits
  • Compare: compare_documents
  • Comments and footnotes: add_comment, get_comments, delete_comment, get_footnotes, add_footnote, update_footnote, delete_footnote
  • Save and convert: save, export, convert_to_odt, get_file_status, close_file

Parameters and behavior for each tool are in the tool reference.

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.

Links

Source: packages/safe-docx/README.md at commit d972566

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

9
  1. v0.25.0LatestOct 9, 2026
  2. v0.24.0Oct 9, 2026
  3. v0.23.1Oct 8, 2026
  4. v0.23.0Oct 4, 2026
  5. v0.22.1Oct 2, 2026
  6. v0.22.0Oct 1, 2026
  7. v0.21.3Oct 1, 2026
  8. v0.21.2Sep 29, 2026
  9. v0.19.1Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts