Docx Forge logo

Docx Forge

Create, inspect, edit, merge, analyze, and export Word documents through MCP tools.

Install Docx Forge

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "docx-forge": {
      "command": "npx",
      "args": [
        "docx-forge-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The docx-forge MCP server lets AI agents create and manipulate Word `.docx` files from structured or markdown content. It provides tools for document creation, text extraction, section and table insertion, template substitution, merging, statistics, and PDF export. The server runs with Node.js over stdio and does not require Microsoft Word; PDF conversion additionally needs LibreOffice or pandoc. Reach for it when an agent workflow must produce or modify contracts, reports, proposals, compliance documents, or other Word-based files.

Use cases

  • Generate contracts from markdown templates
  • Build structured performance reports with tables
  • Replace variables in existing Word documents
  • Merge chapter files into a single manual
  • Export completed documents to PDF

Key features

  • Create `.docx` files from markdown
  • Read text, headings, paragraphs, and metadata
  • Insert sections and formatted tables
  • Replace template text
  • Merge documents and calculate statistics
  • Export `.docx` files to PDF

Tools8

What Docx Forge lets your agent do. Expand a tool for its parameters.

Self-reported~136 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 42d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · docx-forge-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads133Package downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How Docx Forge works

What docx-forge MCP server does

The docx-forge MCP server gives AI workflows a set of operations for creating and managing Microsoft Word .docx files programmatically. It can turn a title and markdown content into a document, inspect an existing file, append structured content, substitute template values, insert tables, combine files, estimate document statistics, and convert a document to PDF.

The implementation uses the docx package for document creation and mammoth for reading and text extraction. Microsoft Word or another Office installation is not required for normal .docx operations. This makes the server suitable for automated workflows that need files saved to explicit paths rather than interactive desktop editing.

How it works

Agents call MCP tools with file paths and operation-specific values. create_document accepts a title, markdown content, and an output path. Markdown support includes heading levels, bold and italic text, bullet and numbered lists, horizontal dividers, and paragraph breaks. Later calls can operate on the resulting file.

For example, a workflow can create a document containing placeholder values, use replace_text to fill those values, add a table or section, and then request document statistics. Multiple chapter files can be passed to merge_documents to produce a combined output. read_document returns extracted text, paragraphs, headings, and metadata, including word count and file size information.

Setup and configuration

The docx-forge MCP server requires Node.js 18 or newer. For Claude Desktop, add an MCP entry that runs npx docx-forge-mcp; Cursor uses the same command in its .cursor/mcp.json configuration. A global installation is also available through npm install -g docx-forge-mcp, followed by the docx-forge-mcp command.

The development workflow uses npm install, npm test, and npm start, with the server started over stdio. No environment variables are specified in the provided setup instructions. The package can also be obtained from npm or run from a cloned repository.

Tools and capabilities

The main tools exposed by the docx-forge MCP server are:

  • create_document: Build a new .docx from a title and markdown body.
  • read_document: Extract text, headings, paragraphs, and metadata.
  • add_section: Append a heading and body to an existing file, with a selected heading level.
  • replace_text: Find and replace text, including template placeholders.
  • add_table: Add a table with bold header cells and supplied rows.
  • merge_documents: Combine several .docx files into one output file.
  • export_to_pdf: Convert a .docx using LibreOffice or pandoc.
  • get_document_stats: Return word count, estimated pages, section count, and table count.

A docx-forge://usage-guide resource is also listed for workflow guidance and examples.

Limitations and notes

PDF export depends on a system converter. The tool checks for LibreOffice first and pandoc second; if neither is installed, it reports failure and installation guidance. The original .docx remains preserved during export. LibreOffice is described as providing the best fidelity, while pandoc is an alternative.

The server is focused on .docx creation and manipulation through the listed tools. File paths therefore need to be accessible to the process running the docx-forge MCP server.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Docx Forge

docx-forge is an MCP server that connects AI agent workflows to Word .docx files through tools for creating, reading, editing, merging, analyzing, and exporting documents. Its main tools include create_document, read_document, add_section, replace_text, add_table, merge_documents, export_to_pdf, and get_document_stats.

Install it with npx in an MCP client configuration, or run npm install -g docx-forge-mcp for a global Node.js installation. The server requires Node.js 18 or newer and starts with the docx-forge-mcp command.

Yes, docx-forge works with Claude Desktop through an MCP configuration that runs npx with docx-forge-mcp as the package argument. The README provides a claude_desktop_config.json example using stdio.

Yes, docx-forge works with Cursor when added to .cursor/mcp.json. Configure Cursor to run npx with docx-forge-mcp as the argument, using the stdio setup shown in the README.

It uses LibreOffice first and pandoc second as system-level converters. Install either converter separately; if neither is available, export_to_pdf returns failure information and installation instructions while preserving the source .docx file.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDocx Forge AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/docx-forge?style=directory)](https://allmcps.com/mcp/docx-forge)
HTML Embed
<a href="https://allmcps.com/mcp/docx-forge"><img src="https://allmcps.com/api/badge/docx-forge?style=directory" alt="Docx Forge on AllMCPs" /></a>