
Docx
io.github.theluckystrike由 GitHub 帳號 theluckystrike 發布v0.22.6更新於 Oct 24, 2026
Create real Word .docx files from your AI chat: proposals, quotes, contracts, statements of work.
概覽
本機 MCP 伺服器,可在對話中產生真正的 Word .docx 檔案:提案、合約、信函、Markdown 轉換與範本填寫。
- 可以做什麼
- 依結構化章節產生文件,支援 plain、letter 與 proposal 三種版面
- 把 Markdown 轉成 .docx,並把既有 .docx 讀回為文字、標題、清單與表格
- 在既有範本中替換 {{佔位符}},保留樣式、表格、頁首頁尾與圖片
- 產生可直接寄給客戶的提案與自由工作者服務合約骨架,編號不重複,並可原地更新提案
- 把 .docx 轉成帶列印樣式表的語意化 HTML,並儲存可重複使用的寄件者/信頭資料
- 列出最近產生的文件,查看或啟用 Pro 授權
- 適用情境
- 適合在對話中起草商務文件、且需要可直接寄出的 Word 檔時使用:提案、報價、服務協議、工作說明書、信函,或填寫自己的 NDA 類範本。也適合把會議紀錄或 Markdown 變成排版好的文件,或擷取既有 .docx 的文字內容。
- 執行需求
- 以僅限桌面的 stdio 本機程序執行,需要 Node.js 18 或更新版本。npm 套件尚未發布,需透過 .mcpb 安裝包或複製原始碼建置安裝。不需帳號、API 金鑰或網路存取;Pro 功能需要 MCP_LICENSE_KEY 或一次性啟用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Docx,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Create .docx Word documents from Claude
Say "write a proposal for Beta Corp, checkout rebuild, 4,500 EUR, three phases" and get a real .docx you can send. This MCP server writes Word documents from chat, proposals, quotes, service agreements, statements of work and letters, with your letterhead, headings, bullet and numbered lists and tables. It also turns markdown into .docx, reads an existing .docx back as text and outline, and fills {{placeholders}} in a template you already use, keeping every style, table, header and image of the original. Everything runs locally: no upload, no account, no native dependency.
In the official MCP Registry (io.github.theluckystrike/docx-document-generator-proposal-contract-markdown).
Real Word documents from chat, proposals, contracts and letters, without a template site or an office subscription.
60-second install
npm publish for @theluckystrike/mcp-docx is pending. Until then, the .mcpb one-click bundle or a clone+build
is the working path, both are verified below.
One-click (.mcpb): download docx.mcpb from the latest release and double-click it in Claude Desktop:
https://github.com/theluckystrike/mcp-servers/releases/latest
(claude_desktop_config.json):
Claude Code:
(.cursor/mcp.json):
The npx form above starts working the moment the package is published. Until then, use the .mcpb bundle above, or
build from source with exactly these three commands:
Then point your client's command at node with one arg: the absolute path to servers/docx/dist/index.js.
To run in Pro mode set MCP_LICENSE_KEY in the same config block, or call license_activate once with your key.
Tools
Resource: docs://recent returns the last 25 documents written, newest first, with kind, client, reference and path.
Prompt: write_proposal_from_hours turns tracked hours (or an invoice_summary from mcp-time-tracker) into a priced proposal.
There is no doc_to_pdf, and that is deliberate
Every pure-JavaScript path from Word to PDF needs either a native dependency (LibreOffice, a Chromium binary, a C++ rendering library) or a cloud API. This collection ships neither, so npx works on any machine with Node and nothing else. doc_to_html writes semantic HTML with a print stylesheet instead: open it, print to PDF, and the result is what you would have got. The tool description and the tool's own answer say the same thing, so the model does not promise a PDF it cannot produce.
What you can say
Worked example
The file opens in Word, Pages, LibreOffice and Google Docs: letterhead, cover title, "Prepared for Beta Corp",
Summary, Scope of work, Deliverables, a Timeline table, an Investment table with EUR 4,500.00, the payment
terms, and a signature block for both parties. Every amount carries its currency code, no bare numbers.
Free vs Pro
Pro is a one-time $19, or $39 for every server in the collection, lifetime.
How the .docx is produced and read
Documents are written with docx, a pure-JavaScript OOXML writer, no native module, no headless browser, no office install.
Reading and template filling use no dependency at all. A .docx is a ZIP, so node:zlib opens it and a small WordprocessingML walk pulls out paragraphs, heading levels (from w:pStyle), list items and tables in document order. Numbered lists are told apart from bullets by resolving each paragraph's w:numId against word/numbering.xml, which is the only place that distinction is recorded, without it every numbered list reads back as bullets.
Template filling substitutes on the joined text of each paragraph, not per run. Word routinely breaks a placeholder you typed as {{client}} into three runs ({{cli, ent}}, ...) after an edit or a spell-check pass, and per-run replacement silently misses those, the document comes back with the placeholder still in it. The replaced text goes into the first run, keeping its formatting, and the remaining runs of that paragraph are blanked. Every other part of the package is copied byte-for-byte, so styles, images, headers, footers and section setup survive. A placeholder with no value is left in place and reported, never blanked.
Existing files are never overwritten
Every tool that writes a file (doc_create, doc_from_markdown, doc_to_html, doc_fill_template,
proposal_create, contract_create) refuses an out_path that already exists and tells you so:
The path is reserved with an exclusive create, not an existence check, so two processes writing the same
out_path at the same time cannot clobber each other: one wins, the other is refused and writes nothing.
When you do not pass an out_path, the file name is derived from the title, and a derived path never
lands on an earlier document: a second proposal with the same title is written as ...-2.docx. To change
a proposal you already sent, use proposal_update {reference} instead: it rewrites the same file from the
stored structured data and keeps the reference number.
The check runs before anything is built or written, so a refused call leaves the disk untouched and burns
no reference number. Pass overwrite: true when replacing the file is what you want.
Characters Word cannot carry
XML 1.0 allows TAB, LF and CR but no other control code. Every string that reaches word/document.xml
is cleaned first: control codes and unpaired surrogates are removed, literal \n escapes become real
paragraph breaks, and stray whitespace collapses. When something was removed the tool says so in its
answer instead of handing you a file Word would offer to repair.
How it stores data
The business profile, the document register and the reference counter live under
${XDG_DATA_HOME:-~/.local/share}/mcp-servers/docx/ as plain JSON, plus a documents/ subfolder holding the
generated files when you do not pass out_path. Every mutating call runs inside an advisory lock on
.../docx/.lock, so two clients on one data directory cannot allocate the same reference number or lose a
record. Saves go to a temporary file and are renamed into place.
If one of those JSON files is unreadable or not valid JSON, it is never treated as "empty". The file is moved
aside byte-for-byte as <name>.json.corrupt-<timestamp>, a <name>.json.corrupt marker is written, and every
tool returns data file is corrupt; moved to ...; nothing was written until you restore a good copy and delete
the marker.
Reference numbers are PROP-YYYY-NNNN for proposals and AGR-YYYY-NNNN for agreements. The counter is written
before the record is stored, so a crash burns a number rather than reusing one, and existing numbers are scanned
so a restored register can never hand back a reference that is already on a sent document.
Limits and honest caveats
- No PDF output. Use
doc_to_htmland print. See the section above for why. doc_readreads.docxonly. Legacy.doc,.rtfand Pages files are refused with a message that says so.doc_readextracts text structure: headings, paragraphs, lists and tables. It does not report fonts, colours, comments, tracked changes, footnotes or embedded images.doc_fill_templatekeeps the first run's formatting for the whole paragraph it rewrites. A paragraph that mixes bold and regular text around a placeholder comes back in the first run's formatting.contract_createwrites a drafting skeleton with[BRACKETED PLACEHOLDERS]and says on the document itself that it is a template and not legal advice. Nothing here has been reviewed by a lawyer in any jurisdiction.- The free-tier limit of 3 counts proposals and contracts together, per calendar month, and resets on the 1st. Everything else stays unlimited when it closes.
Privacy
All data stays local. The server reads and writes files on your machine, stores its register under your data directory, and makes no network request of any kind, not for licensing (keys are verified offline), not for fonts, not for telemetry.
Pairs with
- mcp-invoice, same
business_setprofile shape; the proposal you accepted becomes the invoice you send. - mcp-time-tracker, the
write_proposal_from_hoursprompt turnsinvoice_summaryhours into a priced proposal. - mcp-expense-tracker, quote a project with its pass-through costs already counted.
- office-suite, several servers behind one install, one config entry.
Troubleshooting
npxhangs or fails to find the package: npm publish for this package is pending. Use the.mcpbbundle or the clone-and-build path above until it lands.- "Wrote ... .docx" but Word will not open it: check the path is not inside a synced folder that was still uploading. The file is complete when the tool returns; nothing is written incrementally.
- A placeholder did not get replaced: call
doc_fill_templatewith novaluesto list what the template actually contains. Names are matched exactly, whitespace inside{{ }}is ignored, and the response names every key you passed that the template does not have. - The letterhead shows "Your business": run
business_setonce. Documents are never blocked by a missing profile; the response says the sender block is a placeholder. - No logo on the document: the logo is a Pro feature, and
logo_pathmust exist and be a PNG, JPG or GIF. - Node version: requires Node >= 18. Check with
node -v.
MIT licensed. Support: [email protected]
Built by theluckystrike.
One business profile for the whole suite
Your identity is stored once, at ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/profile/business.json,
and every server in the suite reads it: the invoice issuer, the docx letterhead, the recurring
issuer, expense-tracker's default VAT rate, time-tracker's and timezone's home zone, and the
resume and contract letterheads. Set it once with business_set (invoice or docx) - you never
repeat it anywhere else. An email address is only ever taken from that profile or from an explicit
argument; when none is stored, documents show [add: email] and the tool says so rather than
letting anyone improvise an address.
Frequently asked questions
Is there an MCP server for Word documents (.docx)?
Yes. The docx server at mcp.zovo.one creates .docx files from Claude: template-based documents, headings, tables and formatting, batch generation. Free tier, hosted endpoint or one-click .mcpb install.
How do I create a .docx from Claude?
Connect https://mcp.zovo.one/mcp/docx and describe the document - 'Create a proposal.docx with these three sections and a pricing table.' The file is written to your local storage directory.
Use these docs as an MCP server
Any MCP client (Claude, Cursor, Windsurf, VS Code) can read this repository's documentation directly via GitMCP - no install:
- Docs MCP URL: https://gitmcp.io/theluckystrike/mcp-docx
來源:servers/docx/README.md,提交 55b3f42
工具
0版本歷史
3- v0.22.6最新Oct 14, 2026
- v0.22.2Sep 23, 2026
- v0.22.1Sep 18, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分