docmcp — Word & Excel files

io.github.Adirdavi由 GitHub 帳號 Adirdavi 發布v0.2.0更新於 Oct 24, 2026

Real .docx and .xlsx files from structured data, with automatic Hebrew/Arabic RTL.

已驗證Streamable HTTP可網頁執行效率與工作流檔案與儲存

概覽

AI 產生的概覽

一個託管式 MCP 伺服器,可將結構化資料產生真正的 Word(.docx)與 Excel(.xlsx)檔案,並自動支援希伯來文與阿拉伯文的由右至左排版。

可以做什麼
建立 Word 文件,支援標題、段落、項目符號或編號清單、表格、分頁符,以及希伯來文與阿拉伯文的由右至左排版。建立 Excel 活頁簿,支援多工作表、粗體並凍結的標頭、自動篩選、欄寬設定,並保留數值格式。查詢本月已用呼叫次數與配額。產生的檔案以短期下載連結回傳,而非內嵌資料。
適用情境
當助理需要交付真正的 Word 或 Excel 檔案而不是 Markdown 時使用,特別適合報告、表格或希伯來文、阿拉伯文文件。也適合希望直接使用託管端點、不在本機執行任何程式的使用者。
執行需求
需要遠端 HTTP 端點,無需本機執行環境。必須在 Authorization 標頭中提供 Bearer API 金鑰。免費金鑰每月可產生 10 份文件,另有付費方案。託管服務閒置時會休眠,喚醒可能需要數十秒。
安裝前請注意
API 金鑰是唯一的帳戶憑證,註冊時僅顯示一次,遺失後無法找回。付費方案需要付費,透過 Stripe 結帳。下載連結 24 小時後失效,主機重新啟動時也可能中斷。產生的文件儲存在服務商的伺服器上。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 docmcp — Word & Excel files,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.Adirdavi%2Fdocmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "docmcp-word-excel-files": {
      "type": "http",
      "url": "https://docmcp.onrender.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

docmcp

Live: https://docmcp.onrender.com — free key at POST /keys/free, 10 docs/month. Paid: $10/mo for 100, $30/mo for 500. Quotas live in PLANS in src/store.ts.

A paid MCP server that turns structured data into real .docx and .xlsx files. Agents are good at prose and bad at file formats — they emit Markdown and hope. This gives them a tool that returns a Word or Excel file with actual headings, tables, bold headers, frozen panes and RTL support.

Returns a short-lived download URL rather than a base64 blob: a 200KB docx inlined into a tool result costs the caller ~70k tokens.

Two modes, one codebase:

  • --stdio — local client (Claude Desktop / Code). No auth, no quota, no expiry; files are written to OUT_DIR and the tool returns the path.
  • default — hosted HTTP at /mcp. API key required, quota metered, files served as URLs that expire after 24h. This is the product.

Local

bash
npm install

Already registered in Claude Desktop as docmcp (output → ~/Documents/docmcp). To register elsewhere:

json
{  "mcpServers": {    "docmcp": {      "command": "/usr/local/bin/node",      "args": ["<repo>/node_modules/tsx/dist/cli.mjs", "<repo>/src/index.ts", "--stdio"],      "env": { "DATABASE_URL": "postgres://…", "OUT_DIR": "<somewhere>" }    }  }}

Absolute paths matter — the client launches with a minimal PATH.

Hosted

bash
npm start          # http://localhost:8787/mcpcurl -X POST localhost:8787/keys/free
json
{  "mcpServers": {    "docmcp": {      "type": "http",      "url": "https://your-host/mcp",      "headers": { "Authorization": "Bearer dk_..." }    }  }}

Tools

ToolDoes
create_docxheadings, paragraphs, bullet/numbered lists, tables, page breaks, rtl for Hebrew/Arabic
create_xlsxmulti-sheet, bold + frozen header, auto-filter, sized columns, numbers stay numbers
usagecalls used / quota this month

Env

VarDefaultNotes
PORT8787
BASE_URLhttp://localhost:$PORTMust be the public URL — it goes in download links
DATABASE_URL—Required. Any Postgres (Koyeb, Neon, Supabase)
OUT_DIRoutGenerated files, swept hourly, 24h TTL
STRIPE_SECRET_KEY—Omit to run without billing
STRIPE_WEBHOOK_SECRET—For /stripe/webhook
STRIPE_PRICE_STARTER, STRIPE_PRICE_PRO—Price IDs behind /buy/:plan

Plans and quotas live in PLANS in src/store.ts.

Deploy

Any Docker host with a Postgres URL. There is no persistent disk requirement: generated files live on the container filesystem and expire in 24h anyway, so a restart only breaks links that were about to die. Everything that must survive — keys, quotas, the IP salt — is in Postgres.

Currently Render (web service, free tier) + Neon (Postgres, free, no expiry). Deliberately two providers: state lives somewhere that isn't tied to whoever is hosting the container this month. Render builds the Dockerfile straight from GitHub.

BASE_URL must be the public URL — it is baked into every download link handed to a client, so getting it wrong produces links to a host that does not exist. You only learn the URL after the first deploy, so set it then and redeploy.

Render's free tier sleeps after 15 minutes idle and takes 30–50s to wake. That is the cost of not having a card on file; fix it by upgrading once a customer pays.

Billing flow

/buy/starter → Stripe Checkout → webhook checkout.session.completed → key issued → customer lands on /success and sees the key there. No email provider needed. customer.subscription.deleted deactivates it. There are no user accounts: the key is the account.

Test

bash
npm test

Covers both generators (including a ragged table row and a / in a sheet name — both things an LLM will send eventually), number preservation through an xlsx round-trip, and that quota stops exactly at the plan limit.

Known gaps

  • No PDF. Good PDF output needs headless Chrome or LibreOffice, which triples the deploy. Word and Excel are the actual gap — everyone already ships Markdown→PDF. Add it when a paying user asks.
  • A lost key cannot be recovered. It is shown once on /success. Add email delivery or a "resend by email" route when the first customer asks.
  • Files are on the container filesystem. Deliberate — see Deploy. Move to object storage only if 24h links breaking on restart ever actually bothers someone.
  • Free keys are rate limited, not abuse-proof. One per IP per 24h plus a global daily ceiling (FREE_KEYS_PER_DAY, default 200). Rotating VPNs still defeats it — nothing stops that, and no free tier anywhere survives a determined attacker. The limits exist to bound the worst case, not to eliminate it.
  • /admin needs ADMIN_TOKEN. Unset, the route 404s, so an unconfigured deploy never exposes it. Visit /admin?token=….

來源:README.md,提交 b0e11da

工具

0
該伺服器需要 API 金鑰等憑證,因此 SourceWeft 無法在沒有憑證的情況下讀取其工具,也未收錄。

版本歷史

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

評分

已滿足適用檢查項的 85%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

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

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