Skip to main content
Runtime requirement: Node.js >= 18. Safe Docx uses npx for all clients — no global install required. The server command is always:
npx -y @usejunior/safe-docx

Client setup

Open your Claude Desktop config file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the safe-docx entry to the mcpServers object:
{
  "mcpServers": {
    "safe-docx": {
      "command": "npx",
      "args": ["-y", "@usejunior/safe-docx"]
    }
  }
}
Restart Claude Desktop. The server starts automatically when Claude launches.

Runtime options

Safe Docx includes archive guardrails that reject suspicious .docx files before processing them. You can tune these limits with environment variables.
VariableDefaultDescription
SAFE_DOCX_MAX_ARCHIVE_ENTRIES2000Maximum number of entries allowed in the .docx zip archive.
SAFE_DOCX_MAX_UNCOMPRESSED_BYTES209715200Maximum total uncompressed size in bytes (200 MB).
SAFE_DOCX_MAX_COMPRESSION_RATIO200Maximum allowed compression ratio. Archives that exceed this ratio are rejected as potential zip bombs.
To set an environment variable, pass it in your MCP client config. For example, in Claude Desktop:
{
  "mcpServers": {
    "safe-docx": {
      "command": "npx",
      "args": ["-y", "@usejunior/safe-docx"],
      "env": {
        "SAFE_DOCX_MAX_ARCHIVE_ENTRIES": "5000"
      }
    }
  }
}
Safe Docx runs entirely as a local process on your machine. It reads and writes local filesystem paths only. No document content is sent to external servers.

Build docs developers (and LLMs) love