Docx Forge

io.github.mdfifty50-boop由 GitHub 帳號 mdfifty50-boop 發布v0.1.1更新於 Oct 24, 2026

Professional document generation from structured data

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理不需安裝 Microsoft Office 就能建立、編輯、讀取、合併並匯出 Word .docx 文件。

可以做什麼
  • 依標題與 Markdown 內容建立文件,並附加含標題與內文的章節
  • 讀取既有 .docx 檔案,擷取文字、標題、段落與中繼資料
  • 尋找並取代文字以填入範本變數,並插入含粗體表頭的格式化表格
  • 合併多個 .docx 檔案,並取得字數、頁數估算、章節數與表格數
  • 透過 LibreOffice 或 pandoc 將 .docx 匯出為 PDF
適用情境
適合需要讓助理以 Word 檔案產出合約、報告、提案或法遵文件,或需要編輯、檢視既有 .docx 檔案,而不想安裝 Word 或手動排版的情境。
執行需求
以 stdio 在本機執行,通常透過 npx docx-forge-mcp 或全域 npm 安裝啟動。需要 Node.js 18 以上版本。不需安裝 Office,也不需要任何憑證。PDF 匯出另需系統安裝 LibreOffice 或 pandoc。
安裝前請注意
相關工具會在助理提供的路徑寫入、修改與合併檔案,應指向預期位置並保留備份。PDF 匯出依賴外部轉換器,若兩者皆未安裝會回傳 success 為 false;來源 .docx 檔案會保留。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Docx Forge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

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

Cursor

Add to your .cursor/mcp.json:

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

Manual (Node.js)

bash
npm install -g docx-forge-mcpdocx-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. pandoc — sudo 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

bash
git clone https://github.com/mdfifty50-boop/docx-forge-mcpcd docx-forge-mcpnpm installnpm test        # Run test suitenpm start       # Start MCP server (stdio)

License

MIT — see LICENSE


Related MCP Servers

來源:README.md,提交 848734f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分