/ 目錄 / 演練場 / Office Word MCP
● 社群 GongRzhe ⚡ 即開即用

Office Word MCP

作者 GongRzhe · GongRzhe/Office-Word-MCP-Server

從 Claude 讀取、編輯和建立真正的 .docx 檔案——段落、表格、標題、註解,以及追蹤修訂等級的輸出。

Office Word MCP 封裝 python-docx,給予 Claude 對 Word 文件完整的讀寫存取。適合報告生成、合約修訂、批次文件建立,以及將結構化資料轉換為格式正確的 Word 輸出,方便非技術收件人使用。支援表格、標題、樣式、圖片和註解。

為什麼要用

核心特性

即時演示

實際使用效果

office-word-mcp.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "office-word-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "office-word-mcp-server",
        "word_mcp_server"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "office-word-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "office-word-mcp-server",
        "word_mcp_server"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "office-word-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "office-word-mcp-server",
        "word_mcp_server"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "office-word-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "office-word-mcp-server",
        "word_mcp_server"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "office-word-mcp",
      "command": "uvx",
      "args": [
        "--from",
        "office-word-mcp-server",
        "word_mcp_server"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "office-word-mcp": {
      "command": {
        "path": "uvx",
        "args": [
          "--from",
          "office-word-mcp-server",
          "word_mcp_server"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add office-word-mcp -- uvx --from office-word-mcp-server word_mcp_server

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: Office Word MCP

將每週狀態報告生成為精美的 Word 文件

👤 以 .docx 交付的 PM、分析師和顧問 ⏱ ~25 min beginner

何時使用: 你的客戶期望使用 Word,而非 Markdown 或 PDF,且你不想每週手動複製貼上。

前置條件
  • 用於複製樣式的範本文件 — 將你的標準報告儲存為 ~/templates/status-report.docx
步驟
  1. 開啟範本
    Use word-mcp. Open ~/templates/status-report.docx and tell me its structure (headings + table count).✓ 已複製
    → 回傳大綱——H1、H2 清單、表格尺寸
  2. 填入本週資料
    Save a copy as week-of-2026-04-27.docx. Replace placeholder tables with this week's numbers (paste data). Leave the cover page intact.✓ 已複製
    → 副本已儲存,表格已更新,封面頁未變動
  3. 新增摘要段落
    Under 'Executive Summary', insert 3 paragraphs covering top wins, blockers, and asks. Match the existing paragraph style.✓ 已複製
    → 段落已以正確樣式新增

結果: 每週可交付的 Word 報告,無需手動排版。

注意事項
  • 自訂範本字型未嵌入 — python-docx 寫入參照;如果收件人缺少字型,透過 Word 介面嵌入,或改用系統字型
搭配使用: filesystem

為合約草稿加入修訂意見

👤 審查第三方草稿的法律相關角色 ⏱ ~30 min intermediate

何時使用: 你收到合約草稿,想讓 Claude 標記風險條款並加上錨定的修訂意見。

步驟
  1. 讀取文件
    Read contract.docx. List the section headings and any clauses with payment terms or liability caps.✓ 已複製
    → 章節索引加上標示的條款
  2. 在風險點加入註解
    For each risky clause, add a comment from 'Claude' explaining the concern and a suggested redline.✓ 已複製
    → 在 Word 中開啟時可看到註解

結果: 標記好的草稿,可直接轉交給實際法律顧問。

注意事項
  • 長段落中錨定位置偏移 — 按句子而非段落錨定;在 Word 中重新開啟以確認

郵件合併風格:從 CSV 生成 50 封個人化信件

👤 傳送個人化通訊的營運/HR/行政人員 ⏱ ~20 min beginner

何時使用: 你有收件人清單和模板信件;你想要每人一個 .docx 檔案。

前置條件
  • 收件人清單為 CSV — 欄位:name、email、custom_field
步驟
  1. 對應欄位
    Open template.docx. Show me every {{placeholder}} and ask which CSV column maps to each.✓ 已複製
    → 預留位置清單,對應提示
  2. 執行合併
    For each row in recipients.csv, render template.docx into ./output/<lastname>.docx. Confirm count at the end.✓ 已複製
    → 寫入 N 個檔案;回報行數與檔案數相符

結果: 每位收件人的 .docx 檔案,可直接附件到電子郵件。

注意事項
  • 姓名中的特殊字元導致檔案名稱損壞 — 儲存前先進行 slug 化處理
搭配使用: filesystem

組合

與其他 MCP 搭配,撬動十倍槓桿

office-word-mcp + office-powerpoint-mcp

從單一來源生成 Word 報告和對應的投影片

office-word-mcp + filesystem

讀取 CSV 輸入,再寫出每行的 docx

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
create_document filename, title?, author? 開始新文件 0
get_document_text filename 讀取現有內容 0
add_paragraph filename, text, style? 附加正文 0
add_heading filename, text, level 章節結構 0
add_table filename, rows, cols, data? 表格內容 0
search_and_replace filename, find, replace 批次文字變更/範本填充 0
add_comment filename, paragraph_index, text, author 修訂標記 0

成本與限制

運行它的成本

API 配額
不適用——本地執行
每次呼叫 Token 數
每次呼叫 100–500
費用
免費(MIT)
提示
用 search_and_replace 替代串流整個文件重寫

安全

權限、密鑰、影響範圍

最小權限: filesystem-read filesystem-write
憑證儲存:
資料出站:

故障排查

常見錯誤與修復

儲存時出現 PermissionError

檔案在 Word 中開啟中——讓 Claude 寫入前先關閉它

樣式未套用

python-docx 中樣式名稱區分大小寫;檢查原始範本的樣式名稱

註解未出現

確認 Word 開啟時顯示註解面板;註解已正確儲存在 .docx XML 中

替代方案

Office Word MCP 對比其他方案

替代方案何時用它替代權衡
Office PowerPoint MCP你需要投影片,而非文件不同功能面,同一作者
Excel MCP Server你需要試算表Excel 適合表格資料;Word 適合散文

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills