Skip to main content
@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
Use @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

See compareDocuments for the full API reference.

Runtime requirements

Dependency footprint

Runtime dependencies are intentionally minimal: No native binaries. No .NET prerequisite. The package works in any standard JavaScript runtime.