Safe Docx
io.github.UseJunior由 GitHub 帳號 UseJunior 發布v0.25.0更新於 Oct 24, 2026
AI-native surgical editing of Word .docx and OpenDocument .odt files with formatting preservation
概覽
本機 MCP 伺服器兼命令列工具,讓助理在保留格式的前提下讀取、搜尋、編輯、比對與轉換 Word .docx 及 OpenDocument .odt 檔案。
- 可以做什麼
- 讀取與瀏覽文件:讀取檔案、取得大綱與章節、依文字搜尋
- 編輯內容:取代文字、插入段落、批次編輯、清除格式
- 設定格式:版面配置、編號、節與分節符號
- 處理追蹤修訂:偵測、擷取、接受或拒絕修訂,包含 AI 編輯
- 比對文件,並管理註解與註腳
- 儲存、匯出、轉換為 ODT、查看檔案狀態與關閉檔案
- 適用情境
- 適合需要助理對 Word 或 OpenDocument 檔案做精準局部修改的情境,例如修改合約中的某個條款,並產生乾淨版與追蹤修訂版供審閱,同時不影響文件其餘部分。
- 執行需求
- 以本機 stdio 程序在使用者桌面執行,透過 npm 套件 @usejunior/safe-docx 安裝(Node.js/npx)。用戶端應以 safe-docx 執行檔的絕對路徑設定,因為桌面應用程式可能不會繼承終端的 PATH。未宣告驗證、環境變數或標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Safe Docx,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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:
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
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:
JSON-based clients, including Antigravity CLI (~/.gemini/config/mcp_config.json):
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
來源:packages/safe-docx/README.md,提交 d972566
工具
0版本歷史
9- v0.25.0最新Oct 9, 2026
- v0.24.0Oct 9, 2026
- v0.23.1Oct 8, 2026
- v0.23.0Oct 4, 2026
- v0.22.1Oct 2, 2026
- v0.22.0Oct 1, 2026
- v0.21.3Oct 1, 2026
- v0.21.2Sep 29, 2026
- v0.19.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分