Skip to main content

Markdown to DOCX conversion MCP Server

Project description

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

API Key

Free Trial API Key

Use this key for testing:

f4e8fe6f-e39e-486f-b7e7-e037d2ec216f

Purchase API Key - Super Low Price!

Available Tools

  • convert_markdown_to_docx: Convert markdown text to DOCX
  • list_templates: Get available templates by language

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md2doc-0.1.2.tar.gz (777.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2doc-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file md2doc-0.1.2.tar.gz.

File metadata

  • Download URL: md2doc-0.1.2.tar.gz
  • Upload date:
  • Size: 777.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for md2doc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8bc425fd52c8582983971972f694520a3c78361338bc49c1083e1dd37b956fb7
MD5 ea233c8f389bc0ff35168d9220953212
BLAKE2b-256 958a47defa3cba3087eea33b5a85d989cd79f84a1d2bbfb5393e1e54dd2e5162

See more details on using hashes here.

File details

Details for the file md2doc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: md2doc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.19

File hashes

Hashes for md2doc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c05514895783ec5bc373e5eec3905497ab86d84debf82be56f93e9daf38939a6
MD5 4755a2874e993daef58e61c80cc279b5
BLAKE2b-256 8784b92c290686b7539803425919091237d6b18b312bf0b4109e7eae55694195

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page