Logotipo de docx-mcp

docx-mcp

Organización
SecurityRonin

MCP server for reading and editing Word (.docx) documents with track changes, comments, footnotes, and structural validation

EditorSecurityRonin
Repositoriodocx-mcp
IdiomaPython
Forks
17
Estrellas
53
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    docx-mcp ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    53 estrellas y 17 forks en el repositorio enlazado.

docx-mcp

PyPI Python License: MIT CI Coverage Sponsor SafeSkill 91/100

Give your AI coding agent the ability to create, read, and edit Word documents. Edits appear as tracked changes in Microsoft Word — red strikethrough for deletions, green underline for insertions — and after any revision session your agent can produce an email-ready change log listing every insertion, deletion, and replacement. Or compare two separate files to get the same output automatically.

Who This Is For

Professionals who produce Word deliverables and want their AI agent to handle the document work directly:

  • Legal — contract review with tracked redlines, batch clause replacement across templates, comment annotations explaining each change, footnote management
  • Security & Penetration Testing — generate pentest reports from markdown findings, merge appendices from multiple engagements, add executive-summary comments, remove DRAFT watermarks before delivery
  • Consulting — build proposals and SOWs from templates, convert meeting notes to formatted deliverables, bulk-update payment terms across document sets
  • Compliance & Audit — structural validation of document integrity, cross-reference checking, heading-level audits, protection enforcement

What You Can Ask Your Agent To Do

Review a contract:

"Open contract.docx, find every instance of 'Net 30', change it to 'Net 60', and add a comment on each explaining it was updated per Amendment 3. Save as contract_revised.docx."

Generate a report from markdown:

"Convert my pentest-findings.md to a Word document using the client's report template. Add footnotes for each CVE reference."

Batch-edit a template library:

"Open the MSA template, replace 'ACME Corp' with 'GlobalTech Inc' everywhere, update the effective date in the header, and set document protection to track-changes-only."

Audit a document before sending:

"Open the final deliverable, run a structural audit, check for any DRAFT or TODO markers, validate all footnote cross-references, and remove any watermarks."

Your agent handles the entire workflow — opening the file, navigating the structure, making precise edits with full revision history, validating integrity, and saving — while you focus on the substance.

Installation

Claude Code (recommended):

bash
claude mcp add docx-mcp -- uvx docx-mcp-server

That's it. A companion skill auto-installs the first time the server starts, teaching Claude the document editing workflow, OOXML pitfalls, and audit checklist. It auto-updates on every upgrade.

Claude Desktop:

Add to your MCP settings:

json
{
  "mcpServers": {
    "docx-mcp": {
      "command": "uvx",
      "args": ["docx-mcp-server"]
    }
  }
}

Cursor / Windsurf / VS Code:

Add to your MCP configuration file:

json
{
  "mcpServers": {
    "docx-mcp": {
      "command": "uvx",
      "args": ["docx-mcp-server"]
    }
  }
}

OpenClaw:

yaml
mcpServers:
  docx-mcp:
    command: uvx
    args:
      - docx-mcp-server

With pip:

bash
pip install docx-mcp-server

Capabilities

CapabilityWhat your agent can do
Create documentsStart blank, from a .dotx template, or from markdown — headings, tables, lists, images, footnotes, code blocks, smart typography
Track changesInsert, delete, and replace text as tracked revisions — underlined insertions, red strikethrough deletions. Pass tracked=False to any editing tool to write the change directly with no revision markup. Accept or reject changes by author.
Change logAfter editing with tracked changes, call generate_change_summary for a numbered .txt listing every insertion, deletion, and replacement. Or use diff_to_text to compare two separate files and get the same output automatically — useful for document versions you didn't edit yourself.
CommentsAdd comments anchored to specific paragraphs, reply to comment threads
Find and replaceSearch by text or regex across body, footnotes, and comments — then make targeted edits
TablesCreate tables, modify cells, add or delete rows — all with revision tracking
Footnotes & endnotesAdd, list, and validate cross-references
FormattingBold, italic, underline, color — with revision tracking so formatting changes are visible
Headers & footersRead and edit header/footer content with tracked changes
ImagesList embedded images, insert new ones with specified dimensions
Sections & layoutPage breaks, section breaks, page size, orientation, margins
Cross-referencesInternal hyperlinks between paragraphs with bookmarks
Document mergeCombine content from multiple DOCX files
ProtectionLock documents for tracked-changes-only, read-only, or comments-only with passwords
Structural auditValidate footnotes, headings, bookmarks, images, and internal consistency before delivery
Watermark removalDetect and strip DRAFT watermarks from headers
PII scrubbing (experimental)Detect names, emails, phone numbers, SSNs, and more using Presidio + spaCy NER. Produces true XML redaction — original text permanently deleted, replaced with a solid black rectangle. Not for production use — see limitations.

Example: Contract Review with Redlines

1. open_document("services-agreement.docx")
2. get_headings()                              → see document structure
3. search_text("30 days")                      → find the payment clause
4. delete_text(para_id, "30 days")             → tracked deletion  (red strikethrough)
5. insert_text(para_id, "60 days")             → tracked insertion (green underline)
6. add_comment(para_id, "Extended per client request — see Amendment 3")
7. audit_document()                            → verify structural integrity
8. save_document("services-agreement_redlined.docx")

Open the output in Word and you see exactly what a human reviewer would produce — revision marks, comments in the margin, clean document structure.

Example: Change Log After a Revision Session

1. open_document("contract.docx")
2. replace_text(para_id, "30 days", "60 days")           → tracked revision (del + ins)
3. add_comment(para_id, "Extended per Amendment 3")
4. save_document("contract_redlined.docx")
5. generate_change_summary("contract_changes.txt")

The .txt output reads like:

1. REPLACEMENT by Claude on 2026-05-25
   Deleted:  "30 days"
   Inserted: "60 days"

Paste it into an email, a PR description, or a handover note.

Example: Compare Two Separate Document Versions

No editing session required — point it at any two files:

1. diff_to_text("proposal_v1.docx", "proposal_v2.docx")

Returns two files:

  • proposal_v1_diff.docx — open in Word to see tracked changes inline
  • proposal_v1_diff.txt — plain-text summary, ready to paste anywhere

Example: Pentest Report from Markdown

1. create_from_markdown("pentest-report.docx",
       md_path="findings.md",
       template_path="client-template.dotx")
2. audit_document()                            → verify integrity
3. save_document()                             → ready for delivery

Your markdown findings — headings, tables of affected hosts, code blocks with proof-of-concept output, severity ratings — become a formatted Word document matching the client's template. Smart typography is applied automatically (curly quotes, em dashes, proper ellipses).

PII Scrubbing (Experimental)

This feature is experimental and NOT suitable for production use or as the sole control for privileged, regulated, or legally sensitive documents.

scrub_pii uses Microsoft Presidio with a spaCy NER model (en_core_web_lg, ~560 MB, downloaded on first call) to detect and permanently redact personal information. Redacted spans are replaced with solid black DrawingML rectangles — the original text is deleted from the XML, not merely hidden.

What it detects reliably (via regex/pattern matching, high confidence):

  • Email addresses, phone numbers, credit card numbers, SSNs, IBANs, IP addresses, US passport numbers

What it detects statistically (via NER, will have misses):

  • Person names, organisation names, locations, dates

Known NER gaps — these will be missed:

  • Names in ALL-CAPS (common in ledgers, table headers, legal party designations)
  • Single-token names with no surrounding context
  • Non-English names (Arabic, CJK, African name patterns have low recall on this English model)
  • Names embedded in legal boilerplate (Lender: Jane Doe, Authorized Signatory: John Smith)

Recommended workflow:

1. open_document("sensitive.docx")
2. scrub_pii(dry_run=True)             → review detected entities — check for misses
3. scrub_pii("sensitive_redacted.docx") → produce redacted copy
4. open the output in Word and verify manually before sharing

Always treat the output as a first pass requiring human review, not a finished redaction.

How It Works

A .docx file is a ZIP archive of XML files. This server unpacks the archive, edits the XML directly, and repacks it. This is what gives it the ability to produce real tracked changes, comments, and footnotes — things that higher-level document libraries can't do.

Every edit is validated against the OOXML specification before saving, catching issues like orphaned footnotes, duplicate internal IDs, and broken cross-references that would otherwise cause Word to "repair" (and silently rewrite) your document.

Document Lifecycle

ToolDescription
open_documentOpen a .docx file for reading and editing
create_documentCreate a new blank .docx (or from a .dotx template)
create_from_markdownCreate a .docx from GitHub-Flavored Markdown
close_documentClose the current document and clean up
get_document_infoGet overview stats (paragraphs, headings, footnotes, comments)
save_documentSave changes back to .docx (can overwrite or save to new path)

Reading

ToolDescription
get_headingsGet heading structure with levels and text
search_textSearch across body, footnotes, and comments (text or regex)
get_paragraphGet full text and style of a paragraph

Track Changes

ToolDescription
insert_textInsert text as tracked revision (underlined in Word) — or directly with tracked=False
delete_textMark text deleted (red strikethrough in Word) — or remove directly with tracked=False
replace_textReplace text as a tracked del+ins pair — or directly with tracked=False
modify_cellModify a table cell — tracked by default, tracked=False for direct writes
edit_header_footerEdit header/footer text — tracked by default, tracked=False for direct writes
set_formattingApply bold/italic/underline/color with tracked-change markup
set_track_changesEnable or disable Word's built-in track-changes recording flag
get_tracked_changesList all pending tracked changes (author, date, type, text)
accept_changesAccept tracked changes, optionally filtered by author
reject_changesReject tracked changes, optionally filtered by author

Change Log

ToolDescription
generate_change_summaryExport all tracked changes in the open document as a numbered .txt file — insertions, deletions, and adjacent del+ins pairs grouped as replacements
compare_documentsDiff two DOCX files and produce a tracked-change DOCX (Word-openable)
diff_to_textDiff two DOCX files and produce both a tracked-change DOCX and a plain-text summary .txt

Tables

ToolDescription
get_tablesGet all tables with row/column counts and cell content
add_tableInsert a new table after a paragraph
modify_cellModify a table cell with tracked changes
add_table_rowAdd a row to a table
delete_table_rowDelete a table row with tracked changes

Lists

ToolDescription
add_listApply bullet or numbered list formatting to paragraphs

Comments

ToolDescription
get_commentsList all comments with ID, author, date, and text
add_commentAdd a comment anchored to a paragraph
reply_to_commentReply to an existing comment (threaded)

Footnotes & Endnotes

ToolDescription
get_footnotesList all footnotes with ID and text
add_footnoteAdd a footnote with superscript reference
validate_footnotesValidate footnote cross-references
get_endnotesList all endnotes with ID and text
add_endnoteAdd an endnote with superscript reference
validate_endnotesValidate endnote cross-references

Headers, Footers & Styles

ToolDescription
get_headers_footersGet all headers and footers with text content
edit_header_footerEdit header/footer text with tracked changes
get_stylesGet all defined styles

Properties & Images

ToolDescription
get_propertiesGet core document properties (title, creator, dates)
set_propertiesSet core document properties
get_imagesGet all embedded images with dimensions
insert_imageInsert an image after a paragraph

Sections & Cross-References

ToolDescription
add_page_breakInsert a page break after a paragraph
add_section_breakAdd a section break (nextPage, continuous, evenPage, oddPage)
set_section_propertiesSet page size, orientation, and margins
add_cross_referenceAdd a cross-reference link between paragraphs

Protection & Merge

ToolDescription
set_document_protectionSet document protection with optional password
merge_documentsMerge content from another DOCX

Validation & Audit

ToolDescription
validate_paraidsCheck internal ID uniqueness across all document parts
remove_watermarkRemove VML watermarks from document headers
audit_documentComprehensive structural audit

Requirements

  • Python 3.10+
  • Works on macOS, Linux, and Windows

Privacy Policy · Terms of Service · © 2026 Security Ronin Ltd

Usa el MCP de docx-mcp con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado docx-mcp, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade docx-mcp como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de docx-mcp.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "docx-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de docx-mcp y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de docx-mcp.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar docx-mcp para ayudarme con esta tarea?
docx-mcp
Claro. Lo he leído.
Esto he encontrado usando docx-mcp.

Preguntas frecuentes

¿Para qué sirve el servidor MCP docx-mcp?

docx-mcp es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP docx-mcp con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar docx-mcp con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de docx-mcp con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con docx-mcp conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP docx-mcp a TypingMind?

docx-mcp funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP docx-mcp en TypingMind?

docx-mcp ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP docx-mcp?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si docx-mcp requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇