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 分