
Adeu
MCP把 agent 对 Word 合同的修改写成原生修订痕迹和批注,保留原有格式,还能比对两个版本、在发出前清除作者等元数据,适合律师和法务做合同红线审阅。本地运行无需账号,需要 Node.js;修改内容必须由律师复核后再使用。
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-skills
For 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/adeu
The 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/adeu
Other 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"]
}
}
}
Smithery
To install Adeu using the Smithery package manager:
npx -y @smithery/cli install adeu --client claude
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(clean_view=True): Read the final "clean" version of the text to understand context. Usesearch_queryandpagefilters to locate specific clauses without reading the whole document.process_document_batch: Commit & Negotiate Mode. Apply a unified list of changes. Usetype: "modify"for specific search-and-replace text edits (supportsmatch_mode="all"andregex=Truefor bulk updates), andtype: "accept","reject", or"reply"to manage existing Track Changes and Comments by ID.finalize_document: Pre-Send Scrub. Strip dangerous 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" --report
What 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-adeu
See 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-adeu
Bundle 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.
相關資源

OpenAgreements
MCP面向美国法律的合同起草工具:agent 按 NDA、SAFE、录用通知书、云服务协议等标准模板逐项收集要素,生成可在 Word 里审阅的 DOCX,另有引用原始法条的实务指南与审查清单。托管版填网址即可接入,敏感材料可改用本地版;结果只是草稿,签署前须由律师复核。
open-agreements/open-agreements61
Nutrient DWS MCP Server
MCPNutrient(原 PSPDFKit)官方 MCP:用自然语言合并 PDF、在 Office 与 PDF 间互转、OCR、加水印、涂黑脱敏个人信息、添加数字签名,并按字段提取发票、合同中的数据。文件会上传到 Nutrient 云端处理,需注册账号(可免费注册,按页消耗额度),本机需 Node.js。
PSPDFKit/nutrient-dws-mcp-server71
signature-request
Skill合同定稿后做签署前检查:是否还有未处理的修订、附件是否齐全、主体名称和签字栏是否正确,再设置顺序或并行签署。接入 DocuSign 等电子签服务后可直接发起签署,未接入时生成签署说明文档。Anthropic 官方 legal 插件的一部分,发出前需法务确认。
anthropics/knowledge-work-plugins29.9k
pdf2docx
CLI把 PDF 转成可编辑的 Word 文档,尽量还原段落、表格、图片和版面,也能单独抽取表格,适合修改只拿到 PDF 版的合同、公文和试卷。需 Python 环境;只适用于电子版 PDF,扫描件需先 OCR。Artifex 已不再主动维护,靠社区修复。
ArtifexSoftware/pdf2docx3.5k
Claude Office Skills
Skill130 多个办公技能合集,覆盖合同审查、NDA 起草、职位描述与录用通知、发票报销、会议纪要、邮件及 Excel、PPT、PDF 处理;文书类复制即用,Airtable、Slack 等自动化类需另接服务,合同与财务结果需律师或会计复核。
claude-office-skills/skills526
Box Agent Skills
PluginBox 官方插件:教 agent 通过 Box MCP 或 Box CLI 搜索文件、整理文件夹、设置协作权限,并用 Box AI 问答、摘要和抽取字段;内置合同审查、客户接案、并购数据室三套律所工作流,AI 只整理事实,法律判断须由律师复核。需 Box 账号并完成 Box MCP 授权。
box/skills7