# MDMagic — Markdown to professional documents

Turn Markdown into boardroom-grade DOCX, PDF, and HTML directly from your AI assistant. 15 designer-built templates. Zero permanent storage.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add mdmagic/mdmagic-mcp-server

# Browse available tools
npx -y smithery tool list mdmagic/mdmagic-mcp-server

# Get full schema for a tool
npx -y smithery tool get mdmagic/mdmagic-mcp-server convert_document

# Call a tool
npx -y smithery tool call mdmagic/mdmagic-mcp-server convert_document '{}'
```

## Direct MCP Connection

Endpoint: `https://mdmagic-mcp-server--mdmagic.run.tools`

**Required config:**
- `x-api-key` (header) — Your MDMagic API key from https://mdmagic.ai/account. Format: mdmagic-xxxxxxxxxxxxxxxx

**Optional config:**
- `x-mdmagic-default-template` (header) — Optional. Default template ID used when the AI doesn't specify one.
- `x-mdmagic-default-page-size` (header) — Optional. Default page size: A3, A4, Executive, US_Legal, or US_Letter. Defaults to A4 if not set.
- `x-mdmagic-default-orientation` (header) — Optional. Default page orientation: Portrait or Landscape. Defaults to Portrait if not set.

## Tools (10)

- `convert_document` — Convert markdown to a professionally formatted document using an MDMagic template.
- `list_all_templates` — List all 15 built-in MDMagic templates plus any custom templates the user has uploaded.
- `list_builtin_templates` — List the 15 built-in MDMagic templates, grouped by category. Same as list_all_templates but excludes the user's custom …
- `list_custom_templates` — List only the user's custom-uploaded Word templates. Use this when the user asks about their own templates ('show me my…
- `show_default_settings` — Show the user's default paper size and orientation preferences (set on their account page). Useful when the user hasn't…
- `check_credit_balance` — Check the user's current MDMagic credit balance: subscription credits (renewable monthly), purchased credits (permanent…
- `estimate_conversion_cost` — Estimate credit cost for a conversion BEFORE running it. Returns word count, page calculation (300 words/page), and a c…
- `validate_markdown` — Pre-flight markdown validation BEFORE conversion. Catches malformed tables (mismatched pipes), unclosed code fences, br…
- `get_template_details` — Show available variants (page sizes and orientations) for a specific template. All MDMagic templates support the full 5…
- `recommend_template` — Suggest the best built-in template(s) for a described purpose. Use this when the user describes WHAT the document is (e…

```bash
# Get full input/output schema for a tool
npx -y smithery tool get mdmagic/mdmagic-mcp-server <tool-name>
```
