adeu
Agentic DOCX Redlining Engine. Enables LLMs to read Word documents and inject native Track Changes (w:ins, w:del) and Comments without breaking formatting. Includes Model Context Protocol (MCP) Server.
claude mcp add --transport stdio dealfluence-adeu python -m adeu
How to use
Adeu is an MCP server that enables AI agents to read, review, and surgically apply edits to DOCX documents without disrupting formatting, numbering, or complex layouts. It exposes tools to extract clean text for prompting, generate previews in CriticMarkup, and apply native Word Track Changes through structured edits. Specifically, agents can use read_docx(clean_view=True) to understand context, apply_edits_as_markdown to draft changes as CriticMarkup, and apply_structured_edits to commit precise edits as w:ins/w:del in the document. For developers building legal-tech pipelines, the RedlineEngine Python SDK handles the heavy lifting of XML manipulation, offering a programmatic way to load a DOCX, define edits, and save the redlined document. The CLI provides convenient commands to extract text, diff documents, preview edits, and apply edits directly to DOCX files, making it straightforward to integrate AI-driven change management into workflows.
How to install
Prerequisites:
- Python 3.8+ (recommended 3.9+)
- pip (or pipx) installed
- Optionally uv (for environment orchestration) if you plan to use uvx tooling
Installation steps:
-
Install the Python package for Adeu
- Using pip: pip install adeu
- Or using pipx (isolated environment): pipx install adeu
-
Verify installation
- Run: python -m adeu --version
- Expected output: a version string for Adeu
-
Start the MCP server
- Run: python -m adeu
- The server should start and listen for MCP requests. If you need to bind to a specific host/port, consult the package CLI options (e.g., --host and --port).
-
(Optional) Install uv if you plan to use uvx tooling for zero-configuration setup
- Follow uv installation instructions from the uv project: https://github.com/astral-sh/uv
- After installing uv, you can initialize or interact with Adeu via uvx as described in the README.
Additional notes
Tips and notes:
- Adeu patches the DOCX in-place by injecting native Word XML elements for insertions/deletions, while leaving images, layout, and most formatting intact to preserve document fidelity.
- Use read_docx(clean_view=True) to get a concise, AI-friendly view of the content for prompting.
- CriticMarkup is used as an intermediate representation to visualize changes before applying them as actual Track Changes in Word.
- The RedlineEngine provides a Pythonic interface to load a DOCX, define edits (target_text and new_text), and apply them with an author attribute for provenance.
- For automation, the CLI commands include:
- adeu extract contract.docx -o contract.md
- adeu diff v1.docx v2.docx
- adeu markup contract.docx edits.json --output preview.md
- adeu apply contract.docx edits.json --author "Review Bot"
- Ensure you are editing compatible DOCX files; extremely large documents may require batching edits.
- If you run into formatting mismatches, verify that the edits target correctly coalesced text runs, which Adeu handles via Run Coalescing and fuzzy matching.
Related MCP Servers
PPTAgent
An Agentic Framework for Reflective PowerPoint Generation
joinly
Make your meetings accessible to AI Agents
mcp-reddit
A Model Context Protocol (MCP) server that provides tools for fetching and analyzing Reddit content.
mcp-aktools
📈 提供股票、加密货币的数据查询和分析功能MCP服务器
lihil
2X faster ASGI web framework for python, offering high-level development, low-level performance.
mcp-interviewer
Catch MCP server issues before your agents do.