A Model Context Protocol (MCP) server that converts Markdown text to DOCX format using an external conversion service.
A Model Context Protocol (MCP) server that converts Markdown text to DOCX format using an external conversion service.
<img src="https://raw.githubusercontent.com/Yorick-Ryu/md2doc-mcp/master/images/md2doc.png" alt="md2doc Demo" width="600" style="max-width: 100%; height: auto;">{
"mcpServers": {
"md2doc": {
"command": "uvx",
"args": ["md2doc"],
"env": {
"DEEP_SHARE_API_KEY": "your-api-key-here"
}
}
}
}~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"md2doc": {
"command": "uvx",
"args": ["md2doc"],
"env": {
"DEEP_SHARE_API_KEY": "your-api-key-here"
}
}
}
}For immediate use without any client setup:
# Install and run the server
uvx md2doc
# Or with environment variable
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2docYou can also use md2doc directly in your Python projects:
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())The server works with any MCP-compatible client. Configure it to run:
uvx md2docWith environment variables:
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2docWhen deploying this MCP server on a cloud server (VPS/Docker), set MCP_SAVE_REMOTE=true to return a temporary download link instead of saving to a local directory:
# In your cloud environment
export DEEP_SHARE_API_KEY="your-api-key-here"
export MCP_SAVE_REMOTE=true
uvx md2docThe server will provide a download link for the converted document.
Use this key for testing:
f4e8fe6f-e39e-486f-b7e7-e037d2ec216fMIT
Yorick-Ryu/md2doc-mcp
July 5, 2025
April 13, 2026
Python