Safe DocxBLOCK
Safe DOCX suite: docx-primitives, docx-comparison, safe-docx MCP server
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Edit Word and OpenDocument files with coding agents.
[](https://github.com/usejunior/safe-docx/actions/workflows/ci.yml) [](https://app.codecov.io/gh/usejunior/safe-docx) [](https://www.npmjs.com/package/@usejunior/safe-docx) [](https://github.com/UseJunior/safe-docx/blob/main/LICENSE) [](https://github.com/UseJunior/safe-docx/commits/main) [](https://github.com/UseJunior/safe-docx/issues?q=is%3Aissue+is%3Aclosed)
English · Español · 简体中文 · Português · Deutsch
Safe Docx is a local MCP server and CLI for reading, searching, editing, comparing, converting, and saving document files. It preserves DOCX structure and can produce clean or tracked-changes output.
Example
Ask your coding agent:
Edit NDA.docx. Change the governing law from New York to Delaware. Save a clean copy and a tracked-changes copy. Do not change anything else.
Safe Docx finds the clause, applies the targeted edit, and writes both files for review. The rest of the document stays outside the requested edit.
Follow the complete editing walkthrough.
Comparisons
- SuperDoc
- Claude's built-in DOCX editing
- python-docx
- [DOCX compatibility matrix](docs/comparisons.md
4457f499c9f3OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add safe-docx -- npx -y @usejunior/[email protected]
Trust audit
BLOCKgrade D · trust 61/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (9 observation(s))
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
const INVISIBLE_FORMAT_CHARS_RE = /[--︀-️]/g;
const url = new URL(request.url, 'https://127.0.0.1');
const icon = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAAAXNSR0IArs4c6QAAAKVJREFUeF7t0AEJAAAMBKFD/Xv7GZiwgSTX3Qe8VcQqYhWxilhFrCJWEauIVcQqYhWxilhFrCJWEauIVcQqYhWxilhFrCJWEauIVcQqYhWxil'ΔLines'.padStart(9),
'ΔBranches'.padStart(11),
assert.equal(hasExecutableEvidenceTest('const token = "ADV-CONTENT-RESOLUTION-01";', 'stuffed.ts', 'ADV-CONTENT-RESOLUTION-01'), false);const name = stagedFileName({ port: 43123, jobId: '657d7133-f504-45cf-aef4-a04394615230', token: 'Mkt4qFNf8wjhgbUU_NnF9at63wEdfGlxy29853mcJZo', originalFileName: 'original file.docx' });assert.deepEqual(connection, { bridge: 'https://localhost:43123', jobId: '657d7133-f504-45cf-aef4-a04394615230', token: 'Mkt4qFNf8wjhgbUU_NnF9at63wEdfGlxy29853mcJZo' });original.docx
revised.docx
original.docx
revised.docx
original.docx
.release-manual-tag
.mcpbignore
.eleventy.js
return createHash('sha1').update(content, 'utf8').digest('hex');return createHash('sha1').update(input).digest('hex').slice(0, 12);const iconHash = crypto.createHash('sha1').update(iconBuffer).digest('hex').slice(0, 8);} from '../../../../packages/docx-compare/dist/index.js';
'../../../../tests/test_documents/nvca-regression/source.docx',
'../../../../tests/test_documents/nvca-regression/filled.docx',
'../../../tests/test_documents/open-agreements',
const REPO_ROOT = resolve(fileURLToPath(new URL('.', import.meta.url)), '../../../../');expect(computeContentFingerprint('AB')).toBe(computeContentFingerprint('AB'));Gates applied: no_behavioural_pass.
4457f499c9f3full audit observations/trust-audit/mcp-server/usejunior__safe-docx.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 4457f499c9f3 | BLOCK | D | 61 | first audit |
Questions
What is the Safe Docx MCP server?
Safe DOCX suite: docx-primitives, docx-comparison, safe-docx MCP server
Is Safe Docx safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (61/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What credentials does Safe Docx need?
It reads GOOGLE_SERVICE_ACCOUNT_KEY, SAFE_DOCX_AI_AUTHOR and SAFE_DOCX_WORD_ORACLE_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Safe Docx run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as @usejunior/safe-docx-site at 0.23.0.
How current is this page?
The grade is for one exact copy of the source (4457f499c9f3), read on 2026-10-08. The repository is watched and re-audited when it changes.