@xmldom/xmldom and jszip). It works in any JavaScript environment that supports Node.js-compatible Buffer and async I/O.
Supported environments
| Environment | How to use |
|---|---|
| Local MCP server | npx -y @usejunior/safe-docx |
| Cloudflare Workers / Durable Objects | Import @usejunior/docx-core directly |
| Vercel Functions / workflow steps | Import @usejunior/docx-core directly |
| AWS Lambda / Lambda@Edge | Import @usejunior/docx-core directly |
| Docker / any container runtime | Run the MCP server or import the library |
| Any V8 isolate or Node.js process | Import @usejunior/docx-core directly |
Node.js requirement
"type": "module").
No native dependencies
Safe Docx has no native binary dependencies and no .NET prerequisite for supported API usage. All document processing runs in-process using:jszip— DOCX zip container reading and writing@xmldom/xmldom— OOXML XML parsing and DOM manipulation
Local MCP server (default use case)
For agent-driven document editing with Claude, Cursor, or other MCP-capable clients:read_file, grep, replace_text, save, compare_documents, etc.) over stdio.

