# mdmagic-mcp-server [Health: Active]

**Category:** 🏢 Workplace & Productivity  
**Repository:** https://github.com/MDMagic-MCP/mdmagic-mcp-server  
**GitHub Stars:** 0  
**npm Downloads (last month):** 419  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mdmagic-mcp-server

## Description
Use your own Word templates to convert Markdown → DOCX/PDF/HTML from any MCP-compatible AI.

## Tools
Capabilities this server exposes over MCP:

- **convert_document** — Convert Markdown → DOCX / PDF / HTML / all three. Returns a secure expiring URL.
- **validate_markdown** — Pre-flight check before conversion. Catches malformed tables, unclosed code fences, and other syntax issues that would produce broken output.
- **estimate_conversion_cost** — Pre-flight cost estimate based on word count, page count, format, and template type.
- **check_credit_balance** — Current credit balance (subscription + purchased pools), plan status.
- **list_all_templates** — Full template catalog: 15 built-in templates (grouped by category) + your custom uploads.
- **list_builtin_templates** — Only the built-in templates: Business (5), Creative (6), Professional (2), Technical (2).
- **list_custom_templates** — Only your custom uploaded templates.
- **get_template_details** — Show available variants (page sizes × orientations) for a specific template.
- **recommend_template** — Suggest the best built-in template for a described purpose ("Q4 board pack" → Executive_Platinum).
- **show_default_settings** — Your default page size, orientation, and template preferences.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `MDMAGIC_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mdmagic-mcp-server MCP server does

The mdmagic-mcp-server MCP server connects an MCP-compatible AI assistant to MDMagic's document conversion service. It turns Markdown into DOCX, PDF, HTML, or a combined set of outputs. Conversion can use one of 15 built-in templates or a custom Word template uploaded to the MDMagic account. Custom templates are intended for documents such as letterhead, branded reports, contracts, proposals, or other Word-based layouts.

The conversion result includes a secure, time-limited download URL. The server also exposes account and template information so an assistant can inspect available designs before rendering a document.

## How it works

The `convert_document` tool accepts Markdown as a string, an absolute path to a `.md` file, or base64-encoded file content. Optional conversion settings include the template, output type, page size, and orientation. Supported page sizes are A4, A3, US Letter, US Legal, and Executive; orientations are Portrait and Landscape.

Before conversion, `validate_markdown` can identify issues such as malformed tables or unfinished code fences. `estimate_conversion_cost` provides a credit estimate based on document size, page count, output format, and template type. This is useful because conversions consume credits and custom templates add an additional per-page charge.

The service uses Microsoft Graph for PDF rendering. According to the project documentation, source and output files are not permanently stored: source files are deleted within roughly 5–10 seconds, while output files are removed after download or 60 minutes. Download links are one-time URLs with session and token values rather than public file paths.

## Setup and configuration

The mdmagic-mcp-server MCP server can run locally through `npx` using the stdio transport or connect to the hosted Streamable HTTP endpoint at `https://api.mdmagic.ai/mcp`. A MDMagic account and `MDMAGIC_API_KEY` are required. The key is supplied in the MCP client's environment configuration for local use, or as the `x-api-key` header when using the hosted endpoint.

Optional settings include `MDMAGIC_BASE_URL` for another API endpoint, `REQUEST_TIMEOUT` for request duration, `MCP_TRANSPORT` to select stdio or HTTP, and `MCP_HTTP_PORT` and `MCP_HTTP_HOST` for self-hosted HTTP mode. The documented default HTTP port is 3001 and the default bind address is `127.0.0.1`.

The README provides configurations for Claude Desktop, Cursor, and VS Code with an MCP extension. Local development uses Node.js package installation, a build command, the MCP Inspector, and the project test command.

## Tools and capabilities

- `convert_document` renders Markdown as DOCX, PDF, HTML, or all formats and returns a temporary download URL.
- `validate_markdown` checks source Markdown before rendering.
- `estimate_conversion_cost` previews expected credit usage.
- `check_credit_balance` reports subscription credits, purchased pools, and plan status.
- `list_all_templates`, `list_builtin_templates`, and `list_custom_templates` inspect available designs.
- `get_template_details` shows page-size and orientation variants for a template.
- `recommend_template` suggests a built-in template from a described document purpose.
- `show_default_settings` reports default page, orientation, and template choices.

The built-in collection is organized into Business, Creative, Professional, and Technical categories. Credit use depends on pages and formats: DOCX has a base per-page cost, PDF and HTML add per-page costs, and custom templates add another per-page cost. The estimate tool should be used for exact totals.

## Limitations and notes

An API key and sufficient credits are needed for conversion. The server refuses a conversion when the available balance is too low. It depends on access to the MDMagic API unless configured for a local or staging endpoint, so network or firewall restrictions can prevent operation.

The hosted option avoids installing Node locally but requires an MCP client that supports Streamable HTTP. Local operation uses the stdio transport by default. Template selection is limited to the built-in catalog and custom templates available through the associated MDMagic account.

_Full upstream README: https://allmcps.com/mcp/mdmagic-mcp-server/readme_

