Skip to main content
Glama

md2doc - Markdown zu DOCX MCP-Server

PyPI version MCP Badge License: MIT

Ein Model Context Protocol (MCP)-Server, der Markdown-Text mithilfe eines externen Konvertierungsdienstes in das DOCX-Format umwandelt.

Funktionen

  • Konvertierung von Markdown-Text in das DOCX-Format

  • Unterstützung für benutzerdefinierte Vorlagen

  • Mehrsprachige Unterstützung (Englisch, Chinesisch usw.)

  • Automatischer Dateidownload in das Downloads-Verzeichnis des Benutzers

  • Auflistung und Verwaltung von Vorlagen

Related MCP server: flexberry-markitdown-mcp

Verwendung

Cherry Studio

  1. Öffnen Sie Cherry Studio

  2. Gehen Sie zu Einstellungen → MCP

  3. Fügen Sie die Serverkonfiguration hinzu:

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

Claude Desktop

  1. Öffnen Sie Ihre Claude Desktop-Konfigurationsdatei:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  2. Fügen Sie den md2doc-Server hinzu:

    {
      "mcpServers": {
        "md2doc": {
          "command": "uvx",
          "args": ["md2doc"],
          "env": {
            "DEEP_SHARE_API_KEY": "your-api-key-here"
          }
        }
      }
    }
  3. Starten Sie Claude Desktop neu

Befehlszeile (Schnellstart)

Für die sofortige Nutzung ohne Client-Einrichtung:

# Install and run the server
uvx md2doc

# Or with environment variable
DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc

Python-Integration

Sie können md2doc auch direkt in Ihren Python-Projekten verwenden:

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())

Andere MCP-Clients

Der Server funktioniert mit jedem MCP-kompatiblen Client. Konfigurieren Sie ihn wie folgt:

uvx md2doc

Mit Umgebungsvariablen:

DEEP_SHARE_API_KEY="your-api-key-here" uvx md2doc

Cloud-Bereitstellung (Remote-Server)

Wenn Sie diesen MCP-Server auf einem Cloud-Server (VPS/Docker) bereitstellen, setzen Sie MCP_SAVE_REMOTE=true, um einen temporären Download-Link anstelle des Speicherns in einem lokalen Verzeichnis zurückzugeben:

# In your cloud environment
export DEEP_SHARE_API_KEY="your-api-key-here"
export MCP_SAVE_REMOTE=true

uvx md2doc

Der Server stellt einen Download-Link für das konvertierte Dokument bereit.

API-Schlüssel

Kostenloser Test-API-Schlüssel

Verwenden Sie diesen Schlüssel zum Testen:

f4e8fe6f-e39e-486f-b7e7-e037d2ec216f

API-Schlüssel kaufen

Verfügbare Tools

  • convert_markdown_to_docx: Konvertiert Markdown-Text in DOCX

  • list_templates: Ruft verfügbare Vorlagen nach Sprache ab

Lizenz

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that enables bidirectional conversion between Markdown and PDF formats, including text extraction from specific pages and metadata retrieval. It supports customizable PDF output sizes and document processing through standard MCP tools.
    5
    1
    -
  • A
    license
    C
    quality
    D
    maintenance
    A unified MCP server for document processing that enables creating, editing, and converting Word documents (DOCX), PDFs, Markdown, and images, with support for templates, formatting, and batch operations.
    100
    MIT