本地 Markdown 到 Word 文档转换工具,支持最新 MCP 协议特性、完整的页眉页脚页码功能、增强的表格功能、数据导入和数学公式支持,修复本地相对路径图片嵌入问题
Professional Markdown-to-Word conversion over MCP, with advanced styling, tables, formulas, images, Mermaid rendering, and HTTP deployment support.
aigroup-mdtoword-mcp is an MCP server for generating professional .docx documents from Markdown content.
It is designed for:
npx -y aigroup-mdtoword-mcpgit clone https://github.com/jackdark425/aigroup-mdtoword-mcp.git
cd aigroup-mdtoword-mcp
npm install
npm run build
npm start{
"mcpServers": {
"markdown-to-word": {
"command": "npx",
"args": ["-y", "aigroup-mdtoword-mcp"]
}
}
}{
"mcpServers": {
"markdown-to-word": {
"command": "node",
"args": ["/path/to/aigroup-mdtoword-mcp/dist/index.js"]
}
}
}markdown_to_docxConverts Markdown content or a Markdown file into a .docx document.
Typical inputs include:
markdowninputPathfilenameoutputPathstyleConfigtable_data_to_markdownConverts CSV or JSON tabular data into formatted Markdown tables.
Typical inputs include:
dataformatstylehasHeadertemplate://customer-analysistemplate://academictemplate://businesstemplate://technicaltemplate://minimalstyle-guide://quick-startstyle-guide://advancedstyle-guide://templatesmetrics://conversion-statsmetrics://memory-usageThe styling system supports:
Included table styles cover common business, academic, financial, technical, and minimal report layouts.
# Project Report
## Executive Summary
This is a sample report with **bold text** and *italic text*.
- Feature 1: Complete Markdown support
- Feature 2: Advanced styling system
- Feature 3: Professional document layout
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Data 1 | Data 2 | Data 3 |
| Data 4 | Data 5 | Data 6 |
Mathematical formula: $E = mc^2$
```mermaid
flowchart TD
A[Start] --> B{Check input}
B -->|Valid| C[Generate DOCX]
B -->|Invalid| D[Return error]
```npm run server:httpnpm install -g wrangler
wrangler login
wrangler deployRelated endpoints typically include:
/health/mcp/convert/.well-known/ai-plugin.json/openapi.yaml/openapi.jsonSee detailed guidance in docs/DEPLOYMENT_INSTRUCTIONS.md.
src/
├── index.ts
├── converter/
├── template/
├── types/
└── utils/npm run build
npm testAdditional test commands:
npm run test:mathnpm run test:imagesnpm run test:pagesnpm run test:mermaidThis project is released under the MIT License.
In practical terms, MIT allows you to:
Please keep in mind:
See the full text in LICENSE.
Model Context Protocol SDK
docx by Dolan Miu