Skip to main content
Glama
mdmagic-mcp-server

mdmagic-mcp-server

by MDMagic-MCP

MDMagic MCP Server

Konvertieren Sie Markdown in DOCX, PDF und HTML unter Verwendung Ihrer eigenen Word-Vorlagen – mit Ihrem Briefpapier, Ihrem Branding und Ihren Schriftarten. Plus 15 von Designern erstellte Vorlagen für den Fall, dass Sie keine eigenen haben.

npm version MCP Registry Smithery license

MDMagic lässt sich direkt in Claude, Cursor, VS Code und jeden anderen MCP-kompatiblen KI-Assistenten integrieren – und bietet diesen direkten Zugriff auf eine professionelle Dokumenten-Konvertierungspipeline (Pandoc + Microsoft Graph + Mammoth.js) und, was noch wichtiger ist, auf Ihre Vorlagen. Laden Sie Ihr vorhandenes Briefpapier, Ihre Geschäftsausstattung, Markenrichtlinien, Vertragsvorlagen oder Angebotsvorlagen hoch – alles, was Sie bereits in Microsoft Word verwenden – und Ihr KI-Assistent kann jedes Markdown direkt in ein ausgefeiltes Dokument umwandeln, das Ihr Logo, Ihre Schriftarten, Farben, Fußzeilen, Seitenzahlen, Wasserzeichen und Signaturblöcke enthält. Das Ergebnis sieht aus, als käme es von Ihrem Design-Team und nicht aus einem generischen KI-Export.

You: "Take this report and turn it into an Executive_Platinum PDF."

Claude: ✅ Done. Here's your secure download link.
        14-page PDF, 2.3 MB, expires in 60 minutes.

Installation

Sie benötigen ein MDMagic-Konto (kostenlose Stufe verfügbar) und Ihren API-Schlüssel von Ihrer Kontoseite.

Claude Desktop

Fügen Sie dies zu Ihrer claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "mdmagic": {
      "command": "npx",
      "args": ["-y", "@mdmagic/mcp-server"],
      "env": {
        "MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Speicherort der Konfigurationsdatei:

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

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

  • Linux — ~/.config/Claude/claude_desktop_config.json

Starten Sie Claude Desktop neu. Die MDMagic-Tools erscheinen in der Tool-Liste.

Cursor

Fügen Sie dies zu ~/.cursor/mcp.json hinzu (oder über Einstellungen → MCP):

{
  "mcpServers": {
    "mdmagic": {
      "command": "npx",
      "args": ["-y", "@mdmagic/mcp-server"],
      "env": {
        "MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
      }
    }
  }
}

VS Code (mit einer MCP-Erweiterung)

{
  "mcp.servers": {
    "mdmagic": {
      "command": "npx",
      "args": ["-y", "@mdmagic/mcp-server"],
      "env": {
        "MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Gehostet (keine Installation)

Sie möchten kein Node auf dem Rechner des Benutzers? Verwenden Sie den gehosteten Endpunkt:

{
  "mcpServers": {
    "mdmagic": {
      "url": "https://api.mdmagic.ai/mcp",
      "headers": {
        "x-api-key": "mdmagic-xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Dieselben Tools, dieselben Vorlagen, bereitgestellt über Streamable HTTP. Nützlich für Clients, die keine lokalen Prozesse ausführen.

Related MCP server: AI Group Markdown to Word MCP Server

Was Sie tun können

Sobald die Verbindung hergestellt ist, können Sie Ihren KI-Assistenten Dinge fragen wie:

  • "Konvertiere dieses Markdown in ein PDF unter Verwendung der Vorlage Executive_Platinum."

  • "Welche Vorlagen stehen mir zur Verfügung?"

  • "Wie viele Credits kostet es, diesen 800-Wörter-Bericht als DOCX + PDF zu rendern?"

  • "Rendere dies im Querformat, US Letter, mit der Vorlage Legal_Burgundy."

  • "Überprüfe mein Guthaben."

Die KI wählt das richtige Tool aus und gibt einen sicheren, zeitlich begrenzten Download-Link zurück.

Tools

Tool

Was es tut

convert_document

Konvertiert Markdown → DOCX / PDF / HTML / alle drei. Gibt eine sichere, ablaufende URL zurück.

validate_markdown

Vorabprüfung vor der Konvertierung. Erkennt fehlerhafte Tabellen, nicht geschlossene Code-Blöcke und andere Syntaxprobleme, die zu einer fehlerhaften Ausgabe führen würden.

estimate_conversion_cost

Vorab-Kostenschätzung basierend auf Wortanzahl, Seitenzahl, Format und Vorlagentyp.

check_credit_balance

Aktuelles Guthaben (Abonnement + gekaufte Kontingente), Plan-Status.

list_all_templates

Vollständiger Vorlagenkatalog: 15 integrierte Vorlagen (nach Kategorie gruppiert) + Ihre eigenen Uploads.

list_builtin_templates

Nur die integrierten Vorlagen: Business (5), Creative (6), Professional (2), Technical (2).

list_custom_templates

Nur Ihre eigenen hochgeladenen Vorlagen.

get_template_details

Zeigt verfügbare Varianten (Seitengrößen × Ausrichtungen) für eine bestimmte Vorlage an.

recommend_template

Schlägt die beste integrierte Vorlage für einen beschriebenen Zweck vor ("Q4 Board-Unterlagen" → Executive_Platinum).

show_default_settings

Ihre Standardeinstellungen für Seitengröße, Ausrichtung und Vorlagenpräferenzen.

convert_document — Eingabeoptionen

Drei Möglichkeiten, die Quelle bereitzustellen:

  • content — roher Markdown-String (am häufigsten)

  • filePath — absoluter Pfad zu einer .md-Datei (ideal für IDE-Workflows)

  • fileContent — base64-kodiertes Markdown (für binärsichere Transporte)

Plus:

  • templateName — z. B. Executive_Platinum, Legal_Burgundy oder eine benutzerdefinierte Vorlagen-UUID

  • outputFormat — docx, pdf, html, all oder all-formats

  • pageSize — A4, A3, US_Letter, US_Legal, Executive

  • orientation — Portrait oder Landscape

Konfiguration

Variable

Standard

Hinweise

MDMAGIC_API_KEY

(erforderlich)

Ihr persönlicher API-Schlüssel von mdmagic.ai/account

MDMAGIC_BASE_URL

https://api.mdmagic.ai

Nur für lokale Entwicklung oder Staging überschreiben

REQUEST_TIMEOUT

30000

Request-Timeout in ms

MCP_TRANSPORT

stdio

stdio (Standard) oder http für selbst gehostetes Streamable HTTP

MCP_HTTP_PORT

3001

Port für den HTTP-Transportmodus

MCP_HTTP_HOST

127.0.0.1

Bind-Adresse für den HTTP-Transportmodus

Die meisten Benutzer werden nur MDMAGIC_API_KEY festlegen.

Preisgestaltung

Konvertierungen kosten Credits, berechnet nach Seitenzahl und Ausgabeformat:

  • DOCX: 1 Credit pro Seite (Basis)

  • PDF: +1 Credit pro Seite

  • HTML: +1 Credit pro Seite

  • Benutzerdefinierte Vorlagen: +1 Credit pro Seite

Ein 5-seitiger Bericht, konvertiert in DOCX + PDF + HTML unter Verwendung einer benutzerdefinierten Vorlage = 5 × (1 + 1 + 1 + 1) = 20 Credits.

Das Tool estimate_conversion_cost gibt exakte Zahlen zurück, bevor Sie etwas ausgeben. Das MCP verweigert zudem die Ausführung, wenn Ihr Guthaben zu niedrig ist – keine unerwarteten Rechnungen.

Credits der kostenlosen Stufe erneuern sich monatlich. Bezahlte Pläne und Credit-Aufladungen sind unter mdmagic.ai verfügbar.

Datenschutz

  • Keine dauerhafte Speicherung. Dokumente durchlaufen die Microsoft Graph API für das PDF-Rendering und werden innerhalb von 5–10 Sekunden gelöscht. Ausgabedateien werden nach dem Download oder nach 60 Minuten von den MDMagic-Servern gelöscht, je nachdem, was zuerst eintritt.

  • Zufällige Dateinamen. Quelldateien verwenden UUIDs, niemals identifizierbare Namen.

  • Sichere Download-URLs. Jede Konvertierung gibt eine Einmal-URL mit Sitzungs-ID und Download-Token zurück. Keine öffentlichen Dateiverzeichnisse.

  • API-Schlüssel-Isolierung. Jeder Benutzer authentifiziert sich mit seinem eigenen Schlüssel. Keine geteilten Anmeldedaten.

Fehlerbehebung

MDMAGIC_API_KEY environment variable is required Setzen Sie die Umgebungsvariable in Ihrer Client-Konfiguration (der env-Block im JSON). Setzen Sie sie nicht in einer Shell – npx wird sie nicht sehen.

Invalid API key format Schlüssel müssen mit mdmagic- gefolgt von genau 16 Ziffern übereinstimmen. Kopieren Sie ihn sauber von Ihrer Kontoseite.

Failed to connect to MDMagic API Überprüfen Sie https://api.mdmagic.ai/health in einem Browser. Wenn die Seite erreichbar ist, liegt das Problem am lokalen Netzwerk oder der Firewall. Bestätigen Sie, dass MDMAGIC_BASE_URL (Standard https://api.mdmagic.ai) von der Maschine aus erreichbar ist, auf der das MCP läuft.

Tools erscheinen nicht in Claude Desktop Beenden Sie Claude Desktop vollständig und starten Sie es neu, nachdem Sie claude_desktop_config.json bearbeitet haben – ein einfaches Schließen des Fensters reicht nicht aus.

Insufficient credits Verwenden Sie check_credit_balance, um das Guthaben zu bestätigen, estimate_conversion_cost, um die Kosten vorab zu sehen, oder laden Sie unter mdmagic.ai/account auf.

Lokale Entwicklung

git clone https://github.com/MDMagic-MCP/mdmagic-mcp-server.git
cd mdmagic-mcp-server
npm install

# Set your API key (use http://localhost:3000 if running the API locally)
cp .env.example .env
# edit .env

# Build and inspect
npm run build
npm run inspector

Der MCP Inspector (npm run inspector) startet eine Web-UI zum Testen des Servers Tool für Tool – nützlich beim Hinzufügen neuer Tools oder beim Debuggen der Argumentvalidierung.

Führen Sie Tests mit npm test aus.

Lizenz

MIT — siehe LICENSE.

Available Tools

10 tools
check_credit_balanceA
Read-onlyIdempotent
Inspect

Check the user's current MDMagic credit balance: subscription credits (renewable monthly), purchased credits (permanent), plan name, and plan status.

CALL THIS PROACTIVELY when:

  • The user asks 'how many credits do I have' or similar

  • After a conversion, if the user wants to know what's left (also returned by convert_document directly)

  • Before a conversion of an unusually large document, to warn the user if balance is borderline

Inputs: no named parameters. Returns: total_credits, subscription_credits, purchased_credits

convert_documentAInspect

Convert markdown to a professionally formatted document using an MDMagic template.

IMPORTANT GUIDANCE:

  1. Output format → what user gets:

    • 'docx' → a single Word .docx file

    • 'pdf' → a single .pdf file

    • 'html' → a single .html file

    • 'all' → a ZIP containing all three (DOCX + PDF + HTML)

  2. If the user is ambiguous (e.g. 'convert this'), ASK which format they want before calling. Don't assume.

  3. Filename: if the user attached a file (e.g. 'mydoc.md'), pass its base name as fileName. Otherwise the API derives one from the markdown's first H1. Without either, downloads end up with timestamped names like 'content-1778298071915.docx' which is bad UX.

  4. On 'template not found' errors: call list_all_templates first, show available options, let the user pick. Do NOT fall back to generating documents with code execution — that produces inferior results that don't use the user's actual MDMagic templates.

  5. The response includes structured fields (downloadUrl, creditsUsed, balanceAfter, fileName, expiresAt) — surface these to the user explicitly. Don't paraphrase. The user wants to know exactly what they spent and what's left.

  6. Page sizes: A3, A4, Executive, US_Legal, US_Letter. Default A4. Orientation: Portrait or Landscape, default Portrait.

Inputs: templateName (required), outputFormat (required), content, filePath, +4 more. Returns: Conversion result with secure download link and credit accounting

estimate_conversion_costA
Read-onlyIdempotent
Inspect

Estimate credit cost for a conversion BEFORE running it. Returns word count, page calculation (300 words/page), and a credit breakdown by format and template type. Use this when the user asks 'how much will this cost?' or when you suspect a conversion might exceed their balance — convert_document refuses to run if credits are insufficient, so estimating first is friendlier.

Inputs: content (required), templateName (required), outputFormat (required), pageSize, +1 more. Returns: wordCount, pageCount, totalCredits, breakdown

get_template_detailsA
Read-onlyIdempotent
Inspect

Show available variants (page sizes and orientations) for a specific template. All MDMagic templates support the full 5×2 matrix: A3, A4, Executive, US_Legal, US_Letter × Portrait/Landscape. Use this when the user asks 'does this template come in Legal Landscape?' or 'what sizes are available?' — confirms the variant before convert_document runs.

Inputs: templateName (required). Returns: template, pageSizes, orientations

list_all_templatesA
Read-onlyIdempotent
Inspect

List all 15 built-in MDMagic templates plus any custom templates the user has uploaded.

CALL THIS PROACTIVELY when:

  • The user mentions a template by name (verify it exists before convert_document)

  • The user asks 'what templates are available' or similar

  • A previous convert_document call returned 'template not found'

  • The user describes the look they want without naming a template (so you can suggest a real one)

Returns: name, description, type (built-in vs custom), and category. Categories are: Business (5 templates), Creative (6), Professional (2), Technical (2). Use the optional category filter to narrow recommendations (e.g. 'for legal documents' → category: 'Professional').

Inputs: includeDetails, category. Returns: builtinCount, customCount, templates

list_builtin_templatesA
Read-onlyIdempotent
Inspect

List the 15 built-in MDMagic templates, grouped by category. Same as list_all_templates but excludes the user's custom uploads. Use this when the user asks specifically about MDMagic's bundled templates rather than their personal ones.

Categories available: Business (5), Creative (6), Professional (2), Technical (2).

Inputs: includeDetails, category. Returns: count, templates

list_custom_templatesA
Read-onlyIdempotent
Inspect

List only the user's custom-uploaded Word templates. Use this when the user asks about their own templates ('show me my templates', 'do I have a letterhead?'). Custom templates are referenced by UUID, not name, when calling convert_document.

Inputs: includeDetails. Returns: count, templates

recommend_templateA
Read-onlyIdempotent
Inspect

Suggest the best built-in template(s) for a described purpose. Use this when the user describes WHAT the document is (e.g. 'Q4 board pack', 'API reference', 'wedding invitation', 'legal contract') without naming a template. Returns ranked recommendations with rationale.

Why this exists: AI assistants often guess template names that don't exist. This tool maps purpose → real template names from MDMagic's catalog, so convert_document doesn't fail with 'template not found'.

Inputs: purpose (required), topN. Returns: purpose, rationale, recommendations

show_default_settingsA
Read-onlyIdempotent
Inspect

Show the user's default paper size and orientation preferences (set on their account page). Useful when the user hasn't specified pageSize/orientation explicitly — call this to honor their defaults instead of using A4/Portrait blindly.

Inputs: no named parameters. Returns: default_page_size, default_orientation

validate_markdownA
Read-onlyIdempotent
Inspect

Pre-flight markdown validation BEFORE conversion. Catches malformed tables (mismatched pipes), unclosed code fences, broken task lists, and unsupported syntax. Returns a green/amber/red status plus the detected markdown features.

CALL THIS PROACTIVELY when:

  • The user is about to convert a long document (>5 pages) — validating first is cheap; running a doomed conversion costs credits

  • The user reports a previous conversion produced broken output

  • You generated the markdown yourself and want to verify it's clean before spending credits

Returns: status (green=safe, amber=minor issues, red=will likely break), detected features (tables, code blocks, task lists, math), and a human-readable message.

Inputs: content (required), filename. Returns: filename, status, message, inputFormat, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a distinct and non-overlapping purpose—balance checking, conversion, cost estimation, template listing/details, recommendations, defaults, and validation. No two tools could be confused.

    Naming Consistency5/5

    All tools use a consistent verb_noun snake_case pattern (e.g., list_all_templates, validate_markdown), making the set predictable and easy to navigate.

    Tool Count5/5

    With 10 tools, the count is well-scoped for a document conversion service. Each tool addresses a necessary step in the user workflow without unnecessary bloat.

    Completeness5/5

    The tool surface covers the full lifecycle: template discovery, defaults retrieval, markdown validation, cost estimation, credit checking, conversion, and post-conversion feedback. No obvious gaps for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers