mcp-docx-template
MCP DOCX テンプレートサーバー
スタイル付きのMicrosoft Wordテンプレートを複製し、別のドキュメントのコンテンツを埋め込むポータブルなMCPサーバーです。画像、レイアウト、フォント、色、段落スタイルを保持します。
ツール
サーバーは3つのツールを提供します:
analyze_template—.docxテンプレートを検査し、段落構造、画像、スタイル、コンテンツスキーマを返します。また、テンプレートの隣に<template>.docx.md記述子を書き込むため、繰り返しの参照(例:map_content_to_templateプロンプトによる)で再分析する必要がありません。extract_content— コンテンツ.docxから編集可能なテキストブロックを抽出します。fill_template— テンプレートを複製し、ラベルからテキストへのマッピングを使用して編集可能なテキストを置き換えます。オプションで結果をPDFに変換します。
Related MCP server: Word MCP Server
プロンプト
map_content_to_template—template_pathとcontent_pathが指定されると、テンプレートの.docx.md記述子(まだ存在しない場合は最初に分析して書き込みます)と抽出されたコンテンツを読み取り、content_mappingを構築するための指示メッセージを返します。アシスタントは、マッピングがあいまいな場合はユーザーに直接質問し、その後fill_templateを呼び出すように指示されます。
インストール
pip install .または、テスト付きの開発用:
pip install -e ".[dev]"Claude Desktopでの使用方法
サーバーをClaude Desktopの設定(claude_desktop_config.json)に追加します:
{
"mcpServers": {
"docx-template": {
"command": "mcp-docx-template-server"
}
}
}サーバーはstdioトランスポートを使用します。設定後、Claudeはanalyze_template、extract_content、fill_templateを呼び出せます。
使用例の流れ
テンプレートを分析:
{
"template_path": "/path/to/SSIT_Template.docx"
}ソースドキュメントからコンテンツを抽出:
{
"content_path": "/path/to/NetApp_Content.docx"
}テンプレートを埋める:
{
"template_path": "/path/to/SSIT_Template.docx",
"content_mapping": {
"overview": "NetApp Cutover Dependency Mapper",
"business_challenge": "Business Challenge",
"body_1": "Long body paragraph...",
"solution_item_1": "Title\nBody text..."
},
"output_path": "/path/to/output.docx",
"convert_to_pdf": true
}開発
テストを実行:
pytestライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Automate enterprise-grade documents from templates, merge and 100+ conversions: PDF, Office, HTML.
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Fill PDF and Word templates, generate PDFs and Word documents, and collect e-signatures.
Convert, create and edit Word, PowerPoint, Excel and PDF documents from any AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Word document generation from templates using Jinja2 syntax and parsing of DOCX, PDF, and Excel files to extract structured content, metadata, and text.16 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables creation and management of Word documents from markdown content, with support for multiple templates and conversion of chat conversations to formatted Word documents.-
- AlicenseBqualityDmaintenanceEnables comprehensive management of Microsoft Word documents with 30+ tools for reading, writing, formatting, template merging, image extraction, equation extraction, and style application.241MIT
- AlicenseBqualityCmaintenanceEnables creating professional Word documents from markdown or structured content with fast, customized formatting via natural language.71ISC