Back to Browse

Docx Forge MCP Server

Developer ToolsUse Caution4.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

Professional document generation from structured data

About

Professional document generation from structured data

Security Report

4.2
Use Caution4.2High Risk

The docx-forge-mcp server is a document manipulation tool with reasonable security posture. Code quality is generally good with proper input validation via Zod, and the permissions align well with its stated purpose (file I/O, document processing). Minor issues include broad error handling and lack of explicit logging controls, but no critical vulnerabilities or malicious patterns were detected. Supply chain analysis found 5 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.

4 files analyzed · 10 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

file_system

Check that this permission is expected for this type of plugin.

process_spawn

Check that this permission is expected for this type of plugin.

system_info

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-mdfifty50-boop-docx-forge": {
      "args": [
        "-y",
        "docx-forge-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

docx-forge-mcp

MCP server for Word document (.docx) creation and manipulation — the production-grade document automation tool for AI agents.

Generate contracts, reports, proposals, and compliance documents directly from agent workflows. No Word installation required.

npm License: MIT MCP Compatible


Why docx-forge-mcp?

Word documents are the default format for contracts, compliance reports, legal agreements, and business proposals — especially in enterprise and government workflows. This MCP server gives AI agents the ability to produce and manipulate .docx files programmatically, without any Office installation, UI automation, or file format guesswork.

Only 1 competitor exists for Word document manipulation via MCP as of 2026. This server fills that gap with a production-quality, fully-tested implementation.


Tools

ToolDescription
create_documentCreate a new .docx from a title and markdown content
read_documentExtract text, headings, paragraphs, and metadata from a .docx
add_sectionAppend a new section (heading + body) to an existing .docx
replace_textFind and replace text — ideal for template variable substitution
add_tableInsert a formatted table with bold headers into a .docx
merge_documentsCombine multiple .docx files into one
export_to_pdfConvert .docx to PDF via LibreOffice or pandoc
get_document_statsGet word count, page estimate, section count, table count

Install

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "docx-forge": {
      "command": "npx",
      "args": ["docx-forge-mcp"]
    }
  }
}

Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "docx-forge": {
      "command": "npx",
      "args": ["docx-forge-mcp"]
    }
  }
}

Manual (Node.js)

npm install -g docx-forge-mcp
docx-forge-mcp

Usage Examples

Create a contract from a template

create_document(
  title="Service Agreement",
  content="# Parties\n\n**Client:** {{CLIENT_NAME}}\n**Provider:** Acme Corp\n\n## Scope of Work\n\n{{SCOPE}}\n\n## Payment\n\n{{PAYMENT_TERMS}}",
  outputPath="/tmp/contract.docx"
)

replace_text(filePath="/tmp/contract.docx", find="{{CLIENT_NAME}}", replace="TechCorp Ltd")
replace_text(filePath="/tmp/contract.docx", find="{{SCOPE}}", replace="Software development and consulting services.")
replace_text(filePath="/tmp/contract.docx", find="{{PAYMENT_TERMS}}", replace="Net 30 days. $15,000/month.")

export_to_pdf(filePath="/tmp/contract.docx", outputPath="/tmp/contract.pdf")

Build a structured report

create_document(
  title="Q1 2026 Performance Report",
  content="## Executive Summary\n\nRevenue grew 34% YoY.",
  outputPath="/tmp/report.docx"
)

add_section(
  filePath="/tmp/report.docx",
  heading="Revenue Breakdown",
  content="Product A: $450K\nProduct B: $320K\nServices: $180K",
  headingLevel=2
)

add_table(
  filePath="/tmp/report.docx",
  headers=["Product", "Q1 Revenue", "Growth"],
  rows=[["Product A", "$450K", "+41%"], ["Product B", "$320K", "+28%"], ["Services", "$180K", "+19%"]]
)

get_document_stats(filePath="/tmp/report.docx")

Read and inspect an existing document

read_document(filePath="/path/to/existing.docx")
# Returns: { text, paragraphs[], headings[], metadata: { wordCount, fileSizeBytes, ... } }

Merge chapter files into a book

merge_documents(
  filePaths=["/docs/ch1.docx", "/docs/ch2.docx", "/docs/ch3.docx"],
  outputPath="/docs/complete-manual.docx"
)

Markdown Support

create_document and add_section both accept markdown content:

MarkdownResult
# Heading 1H1 heading
## Heading 2H2 heading
**bold text**Bold text
*italic text*Italic text
- itemBullet list item
1. itemNumbered list item
---Horizontal divider
Blank lineParagraph break

PDF Export

export_to_pdf requires a system-level converter. It tries in order:

  1. LibreOffice (best fidelity) — sudo apt-get install libreoffice
  2. pandocsudo apt-get install pandoc

If neither is available, the tool returns success: false with installation instructions. The source .docx file is always preserved.


Resources

URIDescription
docx-forge://usage-guideStep-by-step guide with workflow examples

Dependencies


Requirements

  • Node.js >= 18.0.0
  • No Microsoft Word or Office installation required
  • PDF export requires LibreOffice or pandoc (optional)

Development

git clone https://github.com/mdfifty50-boop/docx-forge-mcp
cd docx-forge-mcp
npm install
npm test        # Run test suite
npm start       # Start MCP server (stdio)

License

MIT — see LICENSE


Related MCP Servers

Reviews

No reviews yet

Be the first to review this server!