@usejunior/docx-core is the production engine behind Safe Docx. It provides the primitives, comparison engine, and track-changes infrastructure used by the MCP server — packaged for direct import in any TypeScript or JavaScript application.
Primary capabilities:
- Tracked-change comparison output for review workflows
- Revision extraction and OOXML-safe document primitives
- Formatting-preserving text and paragraph operations
- Comment and footnote primitive support
When to use it directly
Use@usejunior/docx-core when you need to:
- Run document comparison programmatically inside your own server or serverless function
- Build tooling on top of the OOXML primitives (accept/reject changes, add comments, etc.)
- Integrate Safe Docx into a pipeline without a running MCP server
@usejunior/safe-docx via npx when you want the MCP server for agent-driven editing workflows where a coding assistant (Claude, Cursor, etc.) invokes tools.
Installation
Quickstart
Runtime requirements
| Requirement | Detail |
|---|---|
| Node.js | >= 18.0.0 |
| Cloudflare Workers | Supported |
| Vercel Functions | Supported |
| AWS Lambda / Lambda@Edge | Supported |
| Any V8 isolate | Supported |
Dependency footprint
Runtime dependencies are intentionally minimal:@xmldom/xmldom— XML DOM handlingjszip— DOCX zip container handling

