{
  "markdown": "# Adeu: Track Changes for the LLM era\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/dealfluence/adeu?style=social)](https://github.com/dealfluence/adeu)\n[![PyPI version](https://img.shields.io/pypi/v/adeu.svg)](https://pypi.org/project/adeu/)\n[![npm version](https://img.shields.io/npm/v/@adeu/core.svg)](https://www.npmjs.com/package/@adeu/core)\n[![Downloads](https://img.shields.io/pepy/dt/adeu)](https://pepy.tech/project/adeu)\n[![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)\n[![Smithery](https://img.shields.io/badge/Smithery-Available-blue.svg)](https://smithery.ai/servers/adeu/adeu)\n[![CI](https://github.com/dealfluence/adeu/actions/workflows/ci.yml/badge.svg)](https://github.com/dealfluence/adeu/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n**LLMs speak Markdown; reviewers speak \"Track Changes.\"**\n\nAdeu 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.\n\nWhile 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.\n\nAdeu acts as an **intelligent proxy**, processing AI edits as safe, atomic transactions:\n\n1. **Read:** Translates the document (from disk or live Word) into LLM-friendly **[CriticMarkup](https://fletcher.github.io/MultiMarkdown-6/syntax/critic.html)** with a **Semantic Appendix** of defined terms, cross-references, and likely typos. The agent starts with semantic structure, not raw data.\n2. **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.\n3. **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.\n\nBuilt and maintained by the team at [Adeu](https://adeu.ai).\n\n---\n\n## Installation\n\nAdeu 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.\n\n### Claude Code (Plugin)\nAdeu ships as a [Claude Code plugin](https://docs.claude.com/en/docs/claude-code/plugins) with a built-in agent skill that teaches Claude how to use the engine effectively. Inside Claude Code:\n\n```\n/plugin marketplace add dealfluence/adeu\n/plugin install adeu-redlining@adeu-skills\n```\n\nFor 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.\n\n### Other Skills-Compatible Agents (Cursor, Windsurf, VS Code Copilot, etc.)\nAdeu's redlining skill follows the open [Agent Skills specification](https://agentskills.io) and works with any compatible agent:\n\n```bash\nnpx skills add dealfluence/adeu\n```\n\nThe skill installs to your agent's skills directory and activates automatically when you ask Claude to redline, edit, or review a `.docx` file.\n\n### Claude Desktop\nYou can install Adeu directly into Claude Desktop using the official extension package:\n1. Download the latest `Adeu.mcpb` file from the [GitHub Releases](https://github.com/dealfluence/adeu/releases) page.\n2. Open Claude Desktop and navigate to **Settings > Extensions**.\n3. Click **Advanced settings** and find the Extension Developer section.\n4. Click **Install Extension...**, select the downloaded `.mcpb` file, and follow the prompts.\n\n### Gemini CLI\nAdeu is available as a native [Gemini CLI extension](https://geminicli.com/extensions/). To install:\n```bash\ngemini extensions install https://github.com/dealfluence/adeu\n```\n\n### Other MCP Clients (Cursor, Windsurf, etc.)\nFor IDEs or clients that configure MCP servers via JSON, you can use either the Node.js or Python backend:\n\n**Node.js**\n```json\n{\n  \"mcpServers\": {\n    \"adeu\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@adeu/mcp-server\"]\n    }\n  }\n}\n```\n\n**Python (Required for Live MS Word integration on Windows)**\n```json\n{\n  \"mcpServers\": {\n    \"adeu\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"adeu\", \"adeu-server\"]\n    }\n  }\n}\n```\n\n### Smithery\nTo install Adeu using the Smithery package manager:\n```bash\nnpx -y @smithery/cli install adeu --client claude\n```\n\n---\n\n## Agent Workflows\n\nAdeu provides agents with specific tools to read, review, and edit documents safely.\n\n> **MCP Apps UI:** The `read_docx` tool 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.\n\n**Recommended Agent Prompt:**\nYou can guarantee the best behavioral results by adding this context to your agent's system prompt or project instructions:\n\n> **Role:** Document Specialist\n> **Tools:**\n>\n> - `read_docx(clean_view=True)`: Read the final \"clean\" version of the text to understand context. Use `search_query` and `page` filters to locate specific clauses without reading the whole document.\n> - `process_document_batch`: **Commit & Negotiate Mode.** Apply a unified list of changes. Use `type: \"modify\"` for specific search-and-replace text edits (supports `match_mode=\"all\"` and `regex=True` for bulk updates), and `type: \"accept\"`, `\"reject\"`, or `\"reply\"` to manage existing Track Changes and Comments by ID.\n> - `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.\n\n### Live MS Word Integration\nIf 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).\n\n---\n\n## Developer Tools (Python & TypeScript)\n\nIf you are building a legal-tech application, an automated pipeline, or want to use the local CLI, use our SDKs.\n\n### The Python CLI\nThe Python toolchain is managed via [uv](https://docs.astral.sh/uv/).\n\n```bash\npip install uv\nuv tool install adeu\n\n# Extract clean text for RAG or prompting\nadeu extract contract.docx -o contract.md\n\n# Generate a visual diff between two versions\nadeu diff v1.docx v2.docx\n\n# Apply edits to the DOCX\nadeu apply contract.docx edits.json --author \"Review Bot\"\n\n# Apply valid edits in salvage mode while reporting failing edits\nadeu apply contract.docx edits.json --partial\n\n# High-throughput JSON-Lines daemon\nadeu serve\n\n# Scrub author metadata and internal trackers\nadeu sanitize redline.docx -o clean.docx --keep-markup --author \"My Firm\" --report\n```\n\nWhat the text projection preserves exactly, what it normalizes (lists,\nstyles, synthetic pages), and what stays read-only is specified in\n[docs/FIDELITY.md](docs/FIDELITY.md).\n\n### The Python SDK\n```python\nfrom adeu import RedlineEngine, ModifyText\nfrom io import BytesIO\n\nwith open(\"MSA.docx\", \"rb\") as f:\n    stream = BytesIO(f.read())\n\nedit = ModifyText(\n    target_text=\"State of New York\",\n    new_text=\"State of Delaware\",\n    comment=\"Standardizing governing law.\"\n)\n\nengine = RedlineEngine(stream, author=\"AI Copilot\")\nengine.apply_edits([edit])\n\nwith open(\"MSA_Redlined.docx\", \"wb\") as f:\n    f.write(engine.save_to_stream().getvalue())\n```\n\n### The TypeScript SDK\nThe entire core parsing and diffing engine is also available in pure TypeScript.\n\n```typescript\nimport { readFileSync, writeFileSync } from \"fs\";\nimport { DocumentObject, RedlineEngine } from \"@adeu/core\";\n\nconst buffer = readFileSync(\"MSA.docx\");\nconst doc = await DocumentObject.load(buffer);\n\nconst engine = new RedlineEngine(doc, \"AI Copilot\");\nengine.process_batch([{\n  type: \"modify\",\n  target_text: \"State of New York\",\n  new_text: \"State of Delaware\",\n  comment: \"Standardizing governing law.\"\n}]);\n\nconst outBuffer = await doc.save();\nwriteFileSync(\"MSA_Redlined.docx\", outBuffer);\n```\n\nSee the [@adeu/core documentation](https://github.com/dealfluence/adeu/tree/main/node/packages/core#readme) for full installation and usage details.\n\n### n8n Community Node\nAdeu ships as an [n8n](https://n8n.io) 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.\n\n```bash\n# In n8n: Settings → Community Nodes → Install: n8n-nodes-adeu\n```\n\nSee the [n8n-nodes-adeu README](https://github.com/dealfluence/adeu/blob/main/node/packages/n8n-nodes-adeu/README.md) for installation, `$fromAI` recipes, and example workflows.\n\n---\n\n## LangChain Integration\n\n`langchain-adeu` is an official integration package that exposes Adeu's local, offline-capable document manipulation tools directly to the LangChain ecosystem.\n\n```bash\npip install langchain-adeu\n```\n\nBundle its capabilities as tools in your agent workflow:\n```python\nfrom langchain_adeu import AdeuToolkit\n\n# Instantiate and retrieve all document tools\ntools = AdeuToolkit().get_tools()\n```\n\nRefer to the [LangChain Workspace Guide](langchain/README.md) for full development instructions and detailed parameters.\n\n---\n\n## Ecosystem & Integrations\n\nAdeu is designed as a Virtual DOM for DOCX. Because we keep the core strictly focused on OpenXML safety, we maintain a dedicated [`ecosystem/`](ecosystem/) directory for third-party integrations.\n\nThe ecosystem folder hosts policies and guidelines for third-party contributions such as legal validation workflows, CLM sync scripts, and specialized multi-agent architectures.\n\n**Are you a vendor or builder?** We welcome PRs to the ecosystem folder! Please see our [Vendor & Integration Policy](ecosystem/VENDOR_POLICY.md) to get started.\n\n---\n\n## Adeu Cloud\n\nBy 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).\n\nHowever, for teams requiring end-to-end workflows, you can connect to **Adeu Cloud** to unlock:\n\n- **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.\n\n[Learn more about Adeu Cloud](https://adeu.ai).\n\n---\n\n## Contributing\n\nWe welcome contributions from the community! Whether it's fixing bugs, adding capabilities, or improving documentation, please see our [Contributing Guide](CONTRIBUTING.md) for instructions on setting up the local `uv` environment, running tests, and understanding the project's strict XML safety guidelines.\n\n---\n\n## License\n\nMIT License. Open source and free to use in commercial applications.\n\n",
  "bytes": 11418,
  "sha": "8478d5b84711a04124e9339c04cd8de8c7ec4c24e6a1104adf4c6a74136fe2d4",
  "repo_slug": "dealfluence/adeu",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_dealfluence_adeu_2e970a6e/readme"
}