Skip to main content
Safe Docx’s runtime is pure TypeScript with two lightweight dependencies (@xmldom/xmldom and jszip). It works in any JavaScript environment that supports Node.js-compatible Buffer and async I/O.

Supported environments

Node.js requirement

Node.js 18 or later is required. The library uses ESM ("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
This means the same package deploys to Cloudflare Workers, AWS Lambda, Vercel Edge Functions, and standard Node.js servers without any build step changes or platform-specific binaries.

Local MCP server (default use case)

For agent-driven document editing with Claude, Cursor, or other MCP-capable clients:
This starts the MCP server locally. No install required. The server exposes the full tool surface (read_file, grep, replace_text, save, compare_documents, etc.) over stdio.

Direct library import

For programmatic use inside your own application — serverless functions, API routes, pipelines:
See Library overview for the full installation and quickstart guide.