MCP Connector

Convert Markdown to DOCX with Templates

Convert Markdown text to DOCX files with custom templates and multi-language support, directly from Claude or Cherry Studio.


91
Spark score
out of 100
Updated 3 months ago
Version 0.1.2
Models
universal

Add to Favorites

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

01

Convert Markdown to DOCX

02

Apply custom templates during conversion

03

Support for multilingual document conversion

04

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

convert_markdown_to_docx

Converts markdown text to DOCX format with optional custom templates

list_templates

Retrieves available templates organized by language

Overview

Md2doc MCP Server

md2doc converts Markdown text into DOCX documents via the DeepShare API, supporting custom templates and multiple languages, with results saved locally or returned as a download link on cloud deployments. Use it when an AI assistant needs to produce a DOCX file from Markdown content. Requires a DeepShare API key (a free trial key is available); not applicable for output formats other than DOCX.

What it does

md2doc is an MCP server that converts Markdown text into DOCX (Word) documents using an external conversion service (DeepShare), supporting custom templates and multiple languages, with the resulting file automatically downloaded to the user's Downloads directory (or a temporary download link when run on a cloud server).

When to use - and when NOT to

Use it when you want an AI assistant to turn Markdown output - a report, article, or document draft - into a properly formatted DOCX file, optionally using a custom template and in a specific language (English, Chinese, and others). Do not use it if you don't have a DeepShare API key (a free trial key is provided for testing) or need output formats other than DOCX - this server is scoped specifically to Markdown-to-DOCX conversion.

Capabilities

  • convert_markdown_to_docx: convert Markdown text to a DOCX file, with parameters including content, filename, language, template_name, remove_hr, and compat_mode.
  • list_templates: list available conversion templates by language.

Programmatic usage is also available directly in Python:

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}")

asyncio.run(convert_markdown())

How to install

uvx md2doc
# or with an API key
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc

Register with Claude Desktop or Cherry Studio:

{
  "mcpServers": {
    "md2doc": {
      "command": "uvx",
      "args": ["md2doc"],
      "env": { "DEEP_SHARE_API_KEY": "your-api-key-here" }
    }
  }
}

A free trial API key (f4e8fe6f-e39e-486f-b7e7-e037d2ec216f) is available for testing; paid keys can be purchased from DeepShare. When deploying on a cloud server (VPS/Docker), set MCP_SAVE_REMOTE=true so the server returns a temporary download link instead of saving to a local directory.

Who it's for

Writers, analysts, and developers who want an AI assistant to produce ready-to-share Word documents from Markdown output instead of manually converting or reformatting text.

Source README

md2doc - Markdown to DOCX MCP Server

PyPI version
MCP Badge
License: MIT

A Model Context Protocol (MCP) server that converts Markdown text to DOCX format using an external conversion service.

md2doc Demo

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

  1. Open Cherry Studio
  2. Go to Settings → MCP
  3. Add the server configuration:
    {
      "mcpServers": {
        "md2doc": {
          "command": "uvx",
          "args": ["md2doc"],
          "env": {
            "DEEP_SHARE_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    

Claude Desktop

  1. Open your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the md2doc server:

    {
      "mcpServers": {
        "md2doc": {
          "command": "uvx",
          "args": ["md2doc"],
          "env": {
            "DEEP_SHARE_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
  3. 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 DOCX
  • list_templates: Get available templates by language

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.