Listed from the MCP registry; nobody on Odel publishes it.

MCP server: One MCP server.

ooxml-integrity

@dmitry-kovRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Checks .docx and .pptx files after automated editing for lost comments, tracked changes and notes.

Office documentsv0.10.0MITPython
Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: only reads or looks up information.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

PyPIooxml-integrityv0.10.0

Run

uvx ooxml-integrity

MCP client config

{
  "mcpServers": {
    "ooxml-integrity": {
      "command": "uvx",
      "args": [
        "ooxml-integrity"
      ]
    }
  }
}
README9 min read

CI PyPI Python License: MIT Dmitry-Kov/ooxml-integrity MCP server

An edited Word file can open normally and still have lost a reviewer's comment, another author's tracked change or a footnote. ooxml-integrity finds these losses after a script, library or agent edits a .docx, and finds .pptx text that overflows its box. It runs locally, with no rendering, model calls or network.

bash
pip install ooxml-integrity
ooxml-integrity check edited.docx --against original.docx
edited.docx: 2 error(s), 0 warning(s), 1 info
  [ERROR] CMT005  comment id=1 is orphaned - present in comments.xml but anchored to nothing - the reviewer's note is invisible in Word
            -> word/comments.xml
  [ERROR] FID001  comment anchors: 2 -> 1 (1 lost)
  [INFO ] FID014  document: paragraph 15 changed: 'EUR 12,000' -> 'EUR 12,500'
            -> document/p15

python-docx changed the fee as asked, and dropped the anchor of the reviewer's comment on that cell. Exit code 1 fails a CI job; --json gives machine-readable output.

Benchmark. Thirty ordinary edit requests on two reviewed contracts went to six document tools and three coding agents. 69 of the 636 attempts that ran damaged the review record: replies Word does not show, bullets turned into •, another reviewer's pending insertion turned into accepted text. The frozen checker (0.4.6) reported 41 of the 69. With each task's requested change declared, 0.4.9 reports 65 and 0.8.0 all 69, and both flag 12 of 537 correct outputs, each a true report outside the benchmark's scope, such as a reply Word does not show. Those rules came after the benchmark and were measured on the same captures. Counts are attempts on two documents, not independent documents. Results · evidence · fixed upstream

Next: browser demo · CI action · MCP server for agents · Python API · fix · decks · rules and coverage · how it started · limitations

Two questions

A document can lose all its styles, footnotes and revisions and still be internally consistent. The checker therefore supports two kinds of inspection.

Are the internal references intact? Check comments, footnotes, styles, numbering, relationships and tracked changes within one file.

bash
ooxml-integrity check report.docx

What did the edit lose? Compare construct counts and text with the source. This can find losses even when the edited file has no broken references.

bash
ooxml-integrity check edited.docx --against original.docx

When the original may already be broken, as with a document a user uploads to an agent, add --introduced (0.10.0) to fail only on what the edit added. A finding the original already has is listed as suppressed instead; lost content always counts. What counts as the same finding.

Exit codes are 0 for no findings at or above --fail-on (default error), 1 when such findings exist, and 2 for a usage error. Use --json for machine-readable output and --quiet to print only findings that fail the run.

Three repairs, and no more

Most findings cannot be repaired from the file: putting back a lost comment, style or tracked change means guessing what was there. fix makes only the three repairs whose result is unique, and checks the copy again before writing it.

bash
ooxml-integrity fix edited.docx -o repaired.docx
  • anchor-replies (CMT005): a reply whose parent comment is anchored is given its parent's range, in the order Word writes a thread. In Word for Mac, the reply appears in its thread only after the repair.
  • renumber-revisions (REV001): every repeated revision id after the first gets a fresh id.
  • content-type (PKG010): a related part's Override in [Content_Types].xml gets the content type its relationship type requires. Word for Mac refused all five Codex outputs that fix repairs this way, and opened the copy fix writes from one of them, with the reply in its thread.

Every other finding is listed as not repaired, with the reason. The input is never changed. In the copy, only the repaired bytes differ, and every other ZIP member is copied as stored. Exit 0 means a verified copy was written; 1, nothing to repair; 2, a usage error or a package fix does not rewrite; 3, a failed re-check. What it repairs, refuses and guarantees.

Decks: does the text fit the box?

bash
ooxml-integrity check deck.pptx
deck.pptx: 6 error(s), 4 warning(s), 1 info
  [ERROR] PPT001  text needs 144pt in a 40pt box - 104pt too tall (260% over), 3 line(s)
            -> slide1/OVER_huge_type_tiny_box
  [ERROR] PPT003  word wrap is off and the longest line is 304pt in a 182pt box
                  - 122pt runs outside the shape
            -> slide2/OVER_nowrap_single_line
  [WARN ] PPT004  shape extends 142pt past the right edge - content will be cut off
            -> slide3/OFFCANVAS_right
  [WARN ] PPT006  overlaps 'OVERLAP_upper_right' over 23% of the smaller shape
            -> slide3/OVERLAP_lower_left

Text fitting requires the effective font and size, which may be inherited through runs, paragraphs, list styles, layout and master placeholders, presentation defaults and themes. The checker resolves these values and reads widths from the font's hmtx/cmap tables through fontTools. The related python-pptx discussion describes the need for text measurement when fitting text.

In the reference-deck check against PowerPoint for Mac, all 21 checkable shapes matched the predicted verdict and line count. Other renderers disagreed on a shape close to its width limit. The checker reports predicted vertical overflow of up to 5% as PPT002 borderline, and missing fonts as PPT007. The validation record gives the method and the limits of that comparison.

Later checks in 0.4.0 cover long basic-Latin words, TTC/OTC font members, presentation slide order and each slide master's Latin theme fonts. Their four dedicated decks add 29 recorded PowerPoint slide observations. The long-token, font-collection, slide-order and theme notes record the cases and their remaining limits.

In CI

yaml
- uses: Dmitry-Kov/ooxml-integrity@v0.11.0
  with:
    files: "out/**/*.docx"
    against: templates/master.docx   # optional, enables the fidelity check
    fail-on: error

Run the check after a generation script, agent edit or template merge, while the source and edited files are still available for comparison.

The action writes a summary to the job page and can produce JSON and SARIF reports. SARIF findings can appear as code-scanning annotations in a pull request. The configuration guide covers severity overrides, path-scoped ignores with a required reason, and counted baselines for repositories that already have findings.

From an agent

bash
claude mcp add ooxml-integrity -- ooxml-integrity mcp

An agent can run the same checks on a document it has just edited, before it returns the file. ooxml-integrity mcp is a local MCP server with two tools, check and compare; it talks over stdin and stdout and opens no socket. A call returns the report of check --json --coverage and a one-line verdict. The MCP guide has the configuration for Claude Code, Codex and OpenCode.

From Python

python
from ooxml_integrity import check, compare

for f in check("edited.docx"):
    print(f.code, f.severity.value, f.message, f.where)

for f in compare("original.docx", "edited.docx"):
    print(f.code, f.message)

Python 3.9+. Two dependencies: lxml, fonttools (plus tomli on 3.10 and older, only to read the config file). If the console script is not on your PATH, python -m ooxml_integrity check report.docx works anywhere.

What it reports

Every finding has a stable code and severity. The full rule tables for .docx and .pptx, and how --coverage reports what was checked, are in docs/rules.md; the exact scope of each rule is in the support matrix.

Limitations

  • The DOCX evidence corpus is 50 synthetic sources and 220 labelled pairs across five producers: 120 clean controls and 100 seeded-defect pairs, with 111 error-level true positives and zero false positives or negatives (recorded result). The 100% precision and recall apply to that corpus and the 14 rules it labels. Accuracy on customer documents has not been measured.
  • The review-history benchmark used two contracts written for it, one version of each tool and agent, and one build of Word for Mac. It compares review content, not formatting or layout.
  • PPTX evidence comes from PowerPoint for Mac; Windows and Slide Show mode are untested. Grouped shapes, tables, SmartArt and charts are not modelled, rotated shapes are only partially checked, and complex scripts are estimates.
  • A separate existing-revision tranche has 30 pairs. Of its nine seeded defects the checker of the time found seven; 0.4.2 finds all nine.
  • The full list, with the numbers behind each, is in docs/research.md.

Where this is going

The benchmark showed that tools and agents given the same request can preserve or lose review information on the same document, and that a checker told which change was requested separates the two. Its documents were written for it. The next question is how the checker does on real reviewed documents and the edits real pipelines make to them.

If your workflow includes automated DOCX edits followed by human review, try a 30-minute pilot with one local before/after pair. Share feedback about a useful finding, false alarm, missed defect or setup problem. Include the generator and checker versions, finding code and expected/actual behavior. GitHub reports are public; attaching a document is optional.

To attach a confidential pair, anonymize it first. The copies keep the structure and lose the text, authors, dates, properties and pictures, and the command checks that every finding is still there:

bash
ooxml-integrity anonymize original.docx edited.docx -o share/

What it replaces, what a reader can still learn, and how it was measured.

Contributing and compatibility

See CONTRIBUTING.md for reproducible reports, development setup, evidence requirements and the checks relevant to a PR. Compatibility and upgrades explains rule codes, severity, JSON/coverage versions, baseline migration and changes that can affect a CI gate even in a patch release; each release's upgrade notes describe changed findings. For sensitive vulnerability reports, use the private channel in SECURITY.md.

Repository layout

src/ooxml_integrity/   inspector, fidelity, fonts, pptx layout and checks,
                       coverage, doctor, policy, sarif, cli, MCP server
tests/                 labelled-corpus, story-fidelity and false-positive regressions
research/              corpus builders, mutators, calibration, renderer comparison
docs/                  research notes, configuration, support matrix, validation records
demo/                  browser checker, landing page, bundled fonts and examples
corpus/                reference .docx and .pptx, byte-reproducible
evidence/docx-beta/    50 producer sources and 220 labelled DOCX pairs
evidence/docx-revisions/  30 pairs with existing revisions and explicit known misses
evidence/review-history-benchmark/  frozen protocol, tool and agent captures, evaluation
runs/                  the first eight agent outputs, used as fixtures
action.yml             the GitHub Action

License

MIT.

Similar modules

Browse Office documents