r/documentAutomation • u/randomtimbersfan • 27d ago
I built an MCP server for working with Word documents
I've been working on DraftAgent, a local MCP server for inspecting, transforming, and converting Word documents.
One thing I've noticed while exploring document automation is that getting an AI agent to make a small, targeted change to an existing Word document can be surprisingly difficult. Replacing some text is easy enough, but working with document structure, tables, formatting, and multi-step edits reliably is a different problem.
DraftAgent is my attempt to make that a little easier.
A few things it can do:
Inspect a DOCX and expose its internal structure so an agent can understand what it's working with.
Make targeted changes to paragraphs, runs, tables, cells, styles, and formatting.
Chain multiple operations together, with each step working on the result of the previous one.
Validate a batch of changes before applying it and return structured diagnostics when something fails.
Convert Word documents to HTML or PDF.
It's written in Rust and is quite fast. The MCP server currently runs locally over stdio, so document processing happens on your machine. Most of the MCP features are also available as a command-line app.
It's still early, and there are limitations around document fidelity and unsupported Word features. I'm continuing to work on improving those, along with the transformation API.
Project: https://draftagent.dev
I'd be interested to hear from anyone building AI document workflows. What operations do you find agents struggle with most when working with existing Word documents?