adeu
Summary: This MCP server lets an AI assistant read, edit, review, diff, sanitize, and validate Word documents, and manage Adeu Cloud email workflows.
Read DOCX files as Markdown with CriticMarkup, clean text, outlines, pagination, and structural context.
Apply batch DOCX edits with tracked changes: search/replace text, add comments, accept/reject changes, reply to comments, and insert/delete table rows.
Accept all tracked changes and comments to produce a clean finalized document.
Compare two DOCX files and generate a unified diff.
Sanitize DOCX metadata/redlines and produce an audit report.
Validate documents for inconsistencies, contradictions, and risk.
Open local files in their native desktop applications.
Search and fetch live emails, download attachments, and create or reply to email drafts with attachments.
Log in to or out of Adeu Cloud.
Provides integration with LangChain through the langchain-adeu package, enabling AI agents to use Adeu's document manipulation tools within LangChain workflows.
Adeu: Track Changes for the LLM era
LLMs speak Markdown; reviewers speak "Track Changes."
Adeu is a docx ↔ LLM translator: a Model Context Protocol (MCP) server (Python and Node.js implementations) and accompanying SDKs that act as a Virtual DOM for Microsoft Word. It provides a two-way abstraction layer that lets AI agents freely edit document text without destroying the underlying formatting or complex DOCX XML.
While standard libraries like python-docx excel at generating documents from scratch, they fail at non-destructive redlining. Adeu solves this by translating .docx files into a token-efficient Markdown representation. This frees AI agents to focus entirely on document semantics instead of wasting tokens wrestling with OpenXML.
Adeu acts as an intelligent proxy, processing AI edits as safe, atomic transactions:
Read: Translates the document (from disk or live Word) into LLM-friendly CriticMarkup with a Semantic Appendix of defined terms, cross-references, and likely typos. The agent starts with semantic structure, not raw data.
Validate: Acts as a strict safety gate. It protects the document's integrity by automatically blocking ambiguous text matches or invalid structural changes before they touch the file.
Apply: Translates the AI's text edits into native Word Track Changes. Adeu handles the complex XML under the hood, ensuring existing layouts, fonts, and margin comments are perfectly preserved.
Built and maintained by the team at Adeu.
Installation
Adeu can be installed directly into AI assistants as an MCP server, used as a Claude Code plugin or Agent Skill, CLI tool, or used locally as a developer toolchain.
Claude Code (Plugin)
Adeu ships as a Claude Code plugin with a built-in agent skill that teaches Claude how to use the engine effectively. Inside Claude Code:
/plugin marketplace add dealfluence/adeu
/plugin install adeu-redlining@adeu-skillsFor best results, also connect either the Node MCP server (npx -y @adeu/mcp-server) or the Python MCP server (uvx --from adeu adeu-server). The plugin works without an MCP server too — it falls back to driving the uvx adeu CLI via Bash.
Other Skills-Compatible Agents (Cursor, Windsurf, VS Code Copilot, etc.)
Adeu's redlining skill follows the open Agent Skills specification and works with any compatible agent:
npx skills add dealfluence/adeuThe skill installs to your agent's skills directory and activates automatically when you ask Claude to redline, edit, or review a .docx file.
Claude Desktop
You can install Adeu directly into Claude Desktop using the official extension package:
Download the latest
Adeu.mcpbfile from the GitHub Releases page.Open Claude Desktop and navigate to Settings > Extensions.
Click Advanced settings and find the Extension Developer section.
Click Install Extension..., select the downloaded
.mcpbfile, and follow the prompts.
Gemini CLI
Adeu is available as a native Gemini CLI extension. To install:
gemini extensions install https://github.com/dealfluence/adeuOther MCP Clients (Cursor, Windsurf, etc.)
For IDEs or clients that configure MCP servers via JSON, you can use either the Node.js or Python backend:
Node.js
{
"mcpServers": {
"adeu": {
"command": "npx",
"args": ["-y", "@adeu/mcp-server"]
}
}
}Python (Required for Live MS Word integration on Windows)
{
"mcpServers": {
"adeu": {
"command": "uvx",
"args": ["--from", "adeu", "adeu-server"]
}
}
}Related MCP server: docx-mcp
Agent Workflows
Adeu provides agents with specific tools to read, review, and edit documents safely.
MCP Apps UI: The
read_docxtool supports the MCP Apps UI protocol. When an agent reads a document, Adeu dynamically renders a custom, interactive Markdown view directly inside the chat window.
Recommended Agent Prompt: You can guarantee the best behavioral results by adding this context to your agent's system prompt or project instructions:
Role: Document Specialist Tools:
read_docx: Start withmode="changes"to triage existing tracked changes (Chg:N) and comments (Com:N),search_query(with optionalpage="4-5"range) to locate specific clauses,mode="fields"to inspect form fields (CC:<N>), ormode="outline"followed by bounded page ranges (page="1-8") to read sections without loading the whole file.
process_document_batch: Commit & Negotiate Mode. Apply a unified, sequentially evaluated list of changes in one call:type: "modify"for search-and-replace text edits (supports Markdown headings/bold/italic/pipe tables,{#cell:<id>}empty-cell anchors,match_mode="all",regex=True, and single or[{"text": ..., "author": ...}]comments),type: "set_field"for form fields,type: "accept","reject"(with optionalpart), or"reply"for existing markup, andtype: "insert_row"/"delete_row"for table rows. Passmarkup_mode="manual"when inline strikethrough/underline formatting is requested instead of Track Changes.
diff_docx_files: Compare two.docxfiles; passoutput_pathandauthor_nameto write the comparison as a tracked-changes.docxin one step.
finalize_document: Pre-Send Scrub. Strip metadata, author names, and internal tracking IDs, lock the document (protection_mode="read_only"), and prepare it for distribution.
Live MS Word Integration
If you are running on Windows with Microsoft Word installed, Adeu can act as a real-time copilot, editing the active document right in front of you. This requires running the Python MCP server backend (see Developer Tools below).
Developer Tools (Python & TypeScript)
If you are building a legal-tech application, an automated pipeline, or want to use the local CLI, use our SDKs.
The Python CLI
The Python toolchain is managed via uv.
pip install uv
uv tool install adeu
# Extract clean text for RAG or prompting
adeu extract contract.docx -o contract.md
# Generate a visual diff between two versions
adeu diff v1.docx v2.docx
# Apply edits to the DOCX
adeu apply contract.docx edits.json --author "Review Bot"
# Apply valid edits in salvage mode while reporting failing edits
adeu apply contract.docx edits.json --partial
# High-throughput JSON-Lines daemon
adeu serve
# Scrub author metadata and internal trackers
adeu sanitize redline.docx -o clean.docx --keep-markup --author "My Firm" --reportWhat the text projection preserves exactly, what it normalizes (lists, styles, synthetic pages), and what stays read-only is specified in docs/FIDELITY.md.
The Python SDK
from adeu import RedlineEngine, ModifyText
from io import BytesIO
with open("MSA.docx", "rb") as f:
stream = BytesIO(f.read())
edit = ModifyText(
target_text="State of New York",
new_text="State of Delaware",
comment="Standardizing governing law."
)
engine = RedlineEngine(stream, author="AI Copilot")
engine.apply_edits([edit])
with open("MSA_Redlined.docx", "wb") as f:
f.write(engine.save_to_stream().getvalue())The TypeScript SDK
The entire core parsing and diffing engine is also available in pure TypeScript.
import { readFileSync, writeFileSync } from "fs";
import { DocumentObject, RedlineEngine } from "@adeu/core";
const buffer = readFileSync("MSA.docx");
const doc = await DocumentObject.load(buffer);
const engine = new RedlineEngine(doc, "AI Copilot");
engine.process_batch([{
type: "modify",
target_text: "State of New York",
new_text: "State of Delaware",
comment: "Standardizing governing law."
}]);
const outBuffer = await doc.save();
writeFileSync("MSA_Redlined.docx", outBuffer);See the @adeu/core documentation for full installation and usage details.
n8n Community Node
Adeu ships as an n8n community node (n8n-nodes-adeu) for teams who prefer visual workflow automation over code. It exposes the full engine (extract Markdown, apply tracked changes, generate diffs, and finalize documents) as drop-in nodes that work in both deterministic pipelines and AI Agent tool calls.
# In n8n: Settings → Community Nodes → Install: n8n-nodes-adeuSee the n8n-nodes-adeu README for installation, $fromAI recipes, and example workflows.
LangChain Integration
langchain-adeu is an official integration package that exposes Adeu's local, offline-capable document manipulation tools directly to the LangChain ecosystem.
pip install langchain-adeuBundle its capabilities as tools in your agent workflow:
from langchain_adeu import AdeuToolkit
# Instantiate and retrieve all document tools
tools = AdeuToolkit().get_tools()Refer to the LangChain Workspace Guide for full development instructions and detailed parameters.
Ecosystem & Integrations
Adeu is designed as a Virtual DOM for DOCX. Because we keep the core strictly focused on OpenXML safety, we maintain a dedicated ecosystem/ directory for third-party integrations.
The ecosystem folder hosts policies and guidelines for third-party contributions such as legal validation workflows, CLM sync scripts, and specialized multi-agent architectures.
Are you a vendor or builder? We welcome PRs to the ecosystem folder! Please see our Vendor & Integration Policy to get started.
Adeu Cloud
By default, the core Adeu redlining engine and local file tools are fully open-source and execute entirely on your machine. Adeu never phones home with your local documents (though your chosen LLM provider will naturally process the text the agent reads).
However, for teams requiring end-to-end workflows, you can connect to Adeu Cloud to unlock:
Email Processing & Fetching: We offer an extended MCP server with secure email thread fetching, document extraction, and automated drafting capabilities to handle contracts directly from your inbox.
Contributing
We welcome contributions from the community! Whether it's fixing bugs, adding capabilities, or improving documentation, please see our Contributing Guide for instructions on setting up the local uv environment, running tests, and understanding the project's strict XML safety guidelines.
License
MIT License. Open source and free to use in commercial applications.
Available Tools
11 toolsaccept_all_changesADestructive
Accepts all tracked changes and removes all comments in a single operation, producing a finalized clean document. Use this when a document review is entirely complete and you want to clear all redlines. For selective acceptance/rejection of specific changes, use process_document_batch instead.
Inputs: docx_path (required), output_path. Returns: result
create_email_draftA
Creates an email draft in the user's native draft box (e.g., Outlook/Gmail). Can either start a NEW email, or REPLY to an existing thread. To REPLY, provide 'reply_to_email_id' (the short ID from search_and_fetch_emails). To start a NEW email, omit the ID but provide 'subject' and 'to_recipients'. Allows attaching local files (PDF/DOCX) by providing their absolute paths. The body should be formatted in Markdown.
Inputs: body_markdown (required), reply_to_email_id, subject, to_recipients, +1 more.
diff_docx_filesARead-only
Compares two DOCX files and generates a text-based Unified Diff. Use this to see exactly what changed between two versions of a document. By default (compare_clean=True), it compares the 'Accepted' finalized states of both documents. Set compare_clean=False if you need to compare the raw underlying text including Tracked Change CriticMarkup.
Inputs: original_path (required), modified_path (required), compare_clean. Returns: result
login_to_adeu_cloudA
Logs the user into the Adeu Cloud backend. Securely opens a browser window for authentication.
Inputs: no named parameters. Returns: result
logout_of_adeu_cloudA
Logs out of the Adeu Cloud backend by clearing the local API key from the OS Keychain.
Inputs: no named parameters. Returns: result
open_local_fileA
Opens a local file in its native desktop application (e.g., Microsoft Word for DOCX files).
Inputs: file_path (required). Returns: result
process_document_batchADestructive
Applies a batch of structural edits, text modifications, and review actions to a document. This is your primary tool for editing DOCX files.
CRITICAL: All changes in the batch evaluate against the ORIGINAL document state. Do not send sequential edits that depend on each other within the same batch (e.g. rename X to Y, then modify Y). Instead, apply the rename in one batch, then modify Y in a subsequent batch.
The changes parameter is a list of operations. Each item MUST have a type:
'modify': Search-and-replace text. Provide exact
target_text(CRITICAL: include surrounding context if the word appears multiple times to ensure unique matching) andnew_text(the replacement).new_textsupports full Markdown structure: '# Heading 1' through '###### Heading 6' at the start of a line for heading styles, 'bold' and 'italic' inline formatting, and blank lines ('\n\n') to splitnew_textinto multiple paragraphs. Multi-paragraph inserts are tracked as one logical revision. To delete text, makenew_textempty. Do NOT manually write CriticMarkup tags ({++, {--, {>>). To add a comment, use the 'comment' parameter.'accept': Finalize a tracked change. Requires
target_id(e.g., 'Chg:12'). (Note: Accepting one half of a paired modify cascades to accept the other half).'reject': Revert a tracked change. Requires
target_id(e.g., 'Chg:12'). (Note: Rejecting one half cascades to reject the other half).'reply': Reply to a comment. Requires
target_id(e.g., 'Com:5') andtext.'insert_row': Insert table row. Requires
target_text(anchor),position('above'/'below'), andcells(Markdown strings).'delete_row': Delete table row. Requires
target_textinside the row to be deleted.
Always provide a realistic author_name for Tracked Changes. This name will be used for attribution in the document's tracked changes and comments.
Inputs: original_docx_path (required), author_name (required), changes (required), output_path. Returns: result
read_docxARead-only
Reads a DOCX file and extracts its text content. Use this to ingest documents into your context window. By default (clean_view=False), it returns text with inline CriticMarkup (e.g., {++inserted++}, {--deleted--}, {==highlighted==}{>>comment<<}) representing Tracked Changes and Comments. Set clean_view=True ONLY if you want to read the final, clean text, ignoring all redlines and comments.
PAGINATION & OUTLINE:
mode='outline' returns a structural map of headings with page numbers, styles, table presence, and referenced footnotes. Body content is omitted. Use this first on large documents to plan targeted reads.
mode='full' (default) returns the document body. Documents over ~19,000 characters are split into pages; use page=N to read a specific page (1-indexed). Documents under the limit are returned in full on page 1.
Page boundaries differ between clean_view=True and clean_view=False.
The Structural Appendix (defined terms, anchors, diagnostics) is repeated on every page.
Inputs: file_path (required), clean_view, mode, page.
sanitize_docxADestructive
Sanitizes a DOCX file by stripping dangerous metadata (rsids, author names, template paths, DMS metadata, hidden text, orphaned content) and producing an audit report of everything removed. Use this before sending documents to external parties. Supports three modes: full scrub (for signing/closing), keep-markup (preserves your track changes and open comments), or baseline (recomputes your delta against the original document).
Inputs: file_path (required), output_path, keep_markup, baseline_path, +2 more. Returns: object
search_and_fetch_emailsARead-only
Searches the user's live email inbox. By default, searches only the Inbox folder (matching what the user sees in their mail client) — this excludes deleted items, drafts, and spam. Use filters to find specific emails (e.g., 'is_unread=True' for new emails, 'days_ago=7' for last week, 'folder=sent' for sent items, 'folder=all' to search the entire mailbox including trash). It returns a list of lightweight email previews. To read the full email body, thread history, and automatically download attachments to local disk, call this tool again and provide the specific email_id. Emails often contain attachments. It is highly recommended to always provide the working_directory parameter so attachments are saved directly to the user's actual project folder. This directory path refers to the user's native operating system, not the LLM's sandbox environment.
Inputs: sender, subject, has_attachments, attachment_name, +7 more.
validate_documentsA
Validates documents for inconsistencies, contradictions, and risk assessments. To START a new validation, provide 'file_paths' as a JSON-encoded string representing a list of file paths. This will immediately return a task_id. To CHECK the status of a validation, call this tool AGAIN and provide ONLY the 'task_id'. The checking process will poll for up to 50 seconds. If it times out, continue checking.
Inputs: file_paths, task_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation (auth, email, document reading/editing/finalization/comparison/sanitization/validation) with clear boundaries. No two tools serve overlapping purposes.
All tool names follow a consistent verb_noun snake_case pattern (e.g., accept_all_changes, create_email_draft, sanitize_docx). No mixing of styles or vague verbs.
The 11 tools cover the core functionality (document editing, email handling, authentication) without being excessive. Each tool serves a well-defined purpose.
The set covers read, edit, finalize, compare, sanitize, search/create drafts, and validate. However, adding new comments is not directly exposed (only replying), which is a minor gap.
Maintenance
Related MCP Connectors
Contract review that keeps your contracts: cited answers, Word redlines, key-date alerts.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Create documents and reusable templates, request signatures, and track approvals — for AI agents.
AI contract management (CLM): contract review, data extraction, reminders and renewal deadlines.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables creating professional Word documents from markdown or structured content with fast, customized formatting via natural language.71ISC
- AlicenseAqualityDmaintenanceLegal document redlining engine that applies AI-generated JSON changes as professional tracked changes with comments in .docx files, producing Word-indistinguishable output.61MIT

BitsBound MCP Serverofficial
AlicenseAqualityDmaintenanceEnables AI-powered contract analysis with partner-level redlines and real OOXML Track Changes for Claude Desktop and Claude.ai.12254 npmMIT- AlicenseBqualityCmaintenanceStructure-preserving Word DOCX editing MCP server with a .NET Open XML backend and Office.js live sessions. Enables safe, auditable, incremental editing of Microsoft Word documents for AI agents.6313 npm10AGPL 3.0