Convert Markdown to DOCX with Templates
Convert Markdown to DOCX with custom templates and multi-language support. Integrates with AI clients like Cherry Studio and Claude Desktop.
Why it matters
Automate the conversion of Markdown documents to DOCX format, supporting custom templates and multilingual content. This asset integrates with external conversion services to streamline document generation.
Outcomes
What it gets done
Convert Markdown to DOCX
Apply custom templates during conversion
Support for multilingual document conversion
Manage and view available conversion templates
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-md2doc | bash Capabilities
Tools your agent gets
Converts markdown text to DOCX format with optional custom templates
Retrieves available templates organized by language
Overview
Md2doc MCP Server
What it does
This MCP server converts Markdown text to DOCX format using an external conversion service. It supports custom templates and multi-language capabilities. It can be integrated with AI clients like Cherry Studio and Claude Desktop, and also used directly in Python projects or via the command line. When deployed remotely, it can return a download link instead of saving locally.
How it connects
This tool is useful for automating the conversion of Markdown content into DOCX documents within AI agent workflows, such as generating reports or documentation. It is designed for AI developers and users who require programmatic document generation capabilities.
Source README
md2doc - Markdown to DOCX MCP Server
A Model Context Protocol (MCP) server that converts Markdown text to DOCX format using an external conversion service.
Features
- Convert Markdown text to DOCX format
- Support for custom templates
- Multi-language support (English, Chinese, etc.)
- Automatic file download to user's Downloads directory
- Template listing and management
Usage
Cherry Studio
- Open Cherry Studio
- Go to Settings → MCP
- Add the server configuration:
{ "mcpServers": { "md2doc": { "command": "uvx", "args": ["md2doc"], "env": { "DEEP_SHARE_API_KEY": "your-api-key-here" } } } }
Claude Desktop
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
Add the md2doc server:
{ "mcpServers": { "md2doc": { "command": "uvx", "args": ["md2doc"], "env": { "DEEP_SHARE_API_KEY": "your-api-key-here" } } } }Restart Claude Desktop
Command Line (Quick Start)
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 md2doc
Python Integration
You 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())
Other MCP Clients
The server works with any MCP-compatible client. Configure it to run:
uvx md2doc
With environment variables:
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc
Cloud Deployment (Remote Server)
When 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 md2doc
The server will provide a download link for the converted document.
API Key
Free Trial API Key
Use this key for testing:
f4e8fe6f-e39e-486f-b7e7-e037d2ec216f
Purchase API Key
Available Tools
convert_markdown_to_docx: Convert markdown text to DOCXlist_templates: Get available templates by language
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.