Convert 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.
{
"mcpServers": {
"md2doc": {
"command": "uvx",
"args": ["md2doc"],
"env": {
"DEEP_SHARE_API_KEY": "your-api-key-here"
}
}
}
}
Open your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add the md2doc server:
{
"mcpServers": {
"md2doc": {
"command": "uvx",
"args": ["md2doc"],
"env": {
"DEEP_SHARE_API_KEY": "your-api-key-here"
}
}
}
}
Restart Claude Desktop
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
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="en",
template_name="thesis"
)
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 md2doc
With environment variables:
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc
Use this key for testing:
f4e8fe6f-e39e-486f-b7e7-e037d2ec216f
convert_markdown_to_docx
: Convert markdown text to DOCXlist_templates
: Get available templates by languageMIT