md2doc
md2doc - Markdown 转 DOCX MCP 服务器
一个使用外部转换服务将 Markdown 文本转换为 DOCX 格式的模型上下文协议 (MCP) 服务器。
功能特性
将 Markdown 文本转换为 DOCX 格式
支持自定义模板
支持多语言(英语、中文等)
自动下载文件到用户的“下载”目录
模板列表查看与管理
Related MCP server: flexberry-markitdown-mcp
使用方法
Cherry Studio
打开 Cherry Studio
进入 设置 → MCP
添加服务器配置:
{ "mcpServers": { "md2doc": { "command": "uvx", "args": ["md2doc"], "env": { "DEEP_SHARE_API_KEY": "your-api-key-here" } } } }
Claude Desktop
打开你的 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
添加 md2doc 服务器:
{ "mcpServers": { "md2doc": { "command": "uvx", "args": ["md2doc"], "env": { "DEEP_SHARE_API_KEY": "your-api-key-here" } } } }重启 Claude Desktop
命令行(快速开始)
无需任何客户端设置即可立即使用:
# Install and run the server
uvx md2doc
# Or with environment variable
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2docPython 集成
你也可以在 Python 项目中直接使用 md2doc:
import asyncio
from md2doc.api_client import ConversionAPIClient
from md2doc.models import ConvertTextRequest
async def convert_markdown():
client = ConversionAPIClient()
request = ConvertTextRequest(
content="# Hello World\n\nThis is **markdown** content.",
filename="example",
language="zh",
template_name="templates",
remove_hr=False,
compat_mode=True
)
response = await client.convert_text(request)
if response.success:
print(f"File saved to: {response.file_path}")
# Run the conversion
asyncio.run(convert_markdown())其他 MCP 客户端
该服务器适用于任何兼容 MCP 的客户端。配置其运行:
uvx md2doc使用环境变量:
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc云端部署(远程服务器)
在云服务器(VPS/Docker)上部署此 MCP 服务器时,设置 MCP_SAVE_REMOTE=true 以返回临时下载链接,而不是保存到本地目录:
# In your cloud environment
export DEEP_SHARE_API_KEY="your-api-key-here"
export MCP_SAVE_REMOTE=true
uvx md2doc服务器将提供转换后文档的下载链接。
API 密钥
免费试用 API 密钥
使用此密钥进行测试:
f4e8fe6f-e39e-486f-b7e7-e037d2ec216f购买 API 密钥
可用工具
convert_markdown_to_docx: 将 markdown 文本转换为 DOCXlist_templates: 按语言获取可用模板
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Document to Markdown MCP server: PDF, Word, PowerPoint, Excel and HTML, with OCR for large files.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server that enables bidirectional conversion between Markdown and PDF formats, including text extraction from specific pages and metadata retrieval. It supports customizable PDF output sizes and document processing through standard MCP tools.51-
- AlicenseNot gradedqualityCmaintenanceMCP server for converting various file formats (PDF, DOCX, images, audio, etc.) to Markdown using Microsoft MarkItDown, with support for large files and Cyrillic text.1MIT
- AlicenseCqualityDmaintenanceA unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.100MIT
- FlicenseAqualityDmaintenanceMCP server for generating professionally formatted Word documents (.docx). Supports corporate templates (colors, fonts, logo), headers/footers, and Markdown conversion.4-