mdmagic-mcp avatar

Mdmagic Mcp Server

mdmagic-mcp/mdmagic-mcp-server

Plugs Pandoc and Microsoft Graph directly into Claude, Cursor, or any MCP client to convert Markdown into DOCX, PDF, and HTML using your own Word templates. Upload your letterhead, contract shells, or branded stationery once, then ask your AI to render documents that match your design system: your fonts, logos, footers, watermarks. Ships with 15 built-in templates if you don't have custom ones. Exposes tools for conversion, cost estimation, credit balance checks, and template discovery. Runs locally via npx or over a hosted Streamable HTTP endpoint if you don't want Node installed. Credits are metered per page and format. Useful when you need AI-generated content to land in professional documents without manual reformatting.

tools
10
auth
Secret needed
transport
STDIO, HTTP
env vars
6
last updated
May 14, 2026

Install

From registry metadata
$ npx add-mcp https://api.mdmagic.ai/mcp --name mdmagic --header 'x-api-key: ${X_API_KEY}'

Run in your terminal. add-mcp asks which agents to add it to, then asks for each value it needs. Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http mdmagic https://api.mdmagic.ai/mcp --header 'x-api-key: YOUR_X_API_KEY'

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 10 tools

Verified live against the running server on Nov 6, 2026.

convert_documentConvert 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...8 params

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...

Parameters* required
contentstring
Raw markdown text content (alternative to filePath or fileContent). MUST preserve real newlines (\n) between every block: heading, paragraph, table row, list item, code fence. Markdown is line-sens...
fileContentstring
Base64 encoded file content (alternative to content or filePath)
fileNamestring
Optional desired base name for the output file (without extension). If the user attached a file like 'mydoc.md', pass 'mydoc' here. The API will use this for the download filename. If omitted, the...
filePathstring
Path to markdown file (VS Code integration, alternative to content or fileContent)
orientationstring
Page orientation (default: Portrait)one of Portrait · Landscape
outputFormat*string
Output format. 'docx', 'pdf', or 'html' return that single file; 'all' returns a ZIP with DOCX+PDF+HTML.one of docx · pdf · html · all
pageSizestring
Page size for the document (default: A4)one of A3 · A4 · Executive · US_Legal · US_Letter
templateName*string
Template to use for conversion. Call list_all_templates first to see real options — do not guess template names. Some templates are built-in (e.g. 'Executive_Platinum', 'Deep_Data_Blue'); others ar...
list_all_templatesList 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_...2 params

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_...

Parameters* required
categorystring
Optional filter — return only built-in templates in this category. Custom templates are always included regardless. Categories: Business (executive/financial), Creative (designer/artistic/novelty),...one of Business · Creative · Professional · Technical
includeDetailsboolean
Include template details like available page sizes and orientations (default: false)
list_builtin_templatesList 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), Creat...2 params

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), Creat...

Parameters* required
categorystring
Optional filter — return only templates in this category.one of Business · Creative · Professional · Technical
includeDetailsboolean
Include template details like available page sizes and orientations (default: false)
list_custom_templatesList 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.1 params

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.

Parameters* required
includeDetailsboolean
Include template details like available page sizes and orientations (default: false)
show_default_settingsShow 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.

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.

No parameters. Call it with no arguments.

check_credit_balanceCheck 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...

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...

No parameters. Call it with no arguments.

estimate_conversion_costEstimate 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 balanc...5 params

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 balanc...

Parameters* required
content*string
Markdown content to estimate credit cost for
orientationstring
Page orientationone of Portrait · Landscape
outputFormat*string
Output format(s): docx (DOCX only), pdf (DOCX+PDF), html (DOCX+HTML), all/all-formats (DOCX+PDF+HTML)one of docx · pdf · html · all · all-formats
pageSizestring
Page size for the documentone of A3 · A4 · Executive · US_Legal · US_Letter
templateName*string
Template ID or name (UUID for custom templates, name for system templates)
validate_markdownPre-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...2 params

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...

Parameters* required
content*string
Markdown content to validate
filenamestring
Optional filename label for the response (defaults to 'content.md')
get_template_detailsShow 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 siz...1 params

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 siz...

Parameters* required
templateName*string
Template ID or name (e.g. Executive_Platinum, or a UUID for custom templates)
recommend_templateSuggest 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 th...2 params

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 th...

Parameters* required
purpose*string
Free-text description of the document's purpose. Examples: 'Q4 board pack for investors', 'restaurant menu', 'developer API documentation', 'wedding invitation'.
topNinteger
How many recommendations to return (1-5, default 3)

Sponsors

Configuration

MDMAGIC_API_KEY*secret

Your personal MDMagic API key (format: mdmagic-XXXXXXXXXXXXXXXX). Get yours at https://mdmagic.ai/account — the 'Connect to AI Assistants via MCP' card on your account page generates the key and pre-fills a copy-pasteable config block.

MDMAGIC_BASE_URLdefault: https://api.mdmagic.ai

Override the MDMagic API base URL. Defaults to https://api.mdmagic.ai. Only set this if you're running MDMagic against a local dev backend.

REQUEST_TIMEOUTdefault: 30000

Request timeout in milliseconds. Increase for very large documents on slow connections. Default: 30000 (30s).

MCP_TRANSPORTdefault: stdio

Transport mode: 'stdio' (default, for local clients like Claude Desktop) or 'http' (for self-hosted Streamable HTTP).

MCP_HTTP_PORTdefault: 3001

Port for HTTP transport mode. Default: 3001. Only used when MCP_TRANSPORT=http.

MCP_HTTP_HOSTdefault: 127.0.0.1

Bind address for HTTP transport mode. Default: 127.0.0.1. Only used when MCP_TRANSPORT=http.

Readme

MDMagic MCP Server

Convert Markdown to DOCX, PDF, and HTML using your own Word templates — your letterhead, your branding, your fonts. Plus 15 designer-built templates for when you don't have your own.

npm version MCP Registry Smithery Glama mcp.so license


View the full README on GitHub

Details

Repository
github.com/mdmagic-mcp/mdmagic-mcp-server
Website
mdmagic.ai/mcp
Categories
Documents & Knowledge, Productivity & Office
Package
@mdmagic/mcp-server
Transport
STDIO, HTTP
Auth
Required
Registry
MCP registry, active
Tools verified
Nov 6, 2026

Related Documents & Knowledge MCP servers

View all
1onemira-space avatarOneMira C1 Local AI Voice Recorder & Wikionemira-space/onemira-mcpLocal AI voice recorder & OKF Markdown Living Wiki MCP server ($0/mo, 99-lang speaker ID).0stars
2unmarkdown avatarUnmarkdownunmarkdown/mcp-serverThe document publishing layer for AI tools. Convert markdown to 6 destinations, 62 templates.0stars
3melusi-m avatarFixmypdfmelusi-m/pdf-editor-front-endPrivacy-first PDF tools over MCP: merge, split, rotate, delete, compress, protect, inspect.0stars
4pleaseprompto avatarNotebookLMpleaseprompto/notebooklm-mcpMCP server for NotebookLM - Let your AI agents (Claude Code, Codex) research documentation directly with grounded, citation-backed answers from Gemini. Persiste2.4Kstars
5gongrzhe avatarOffice-Word-MCP-Servergongrzhe/office-word-mcp-serverExposes Word document operations via MCP to create, edit, format, and analyze documents programmatically.2Kstars
6anyproto avatarAnytype Mcpanyproto/anytype-mcpOfficial MCP server for Anytype API - your encrypted, local and collaborative wiki.437stars