mdmagic-mcp-server
MDMagic MCP 서버
사용자 지정 Word 템플릿(레터헤드, 브랜딩, 폰트 등)을 사용하여 Markdown을 DOCX, PDF 및 HTML로 변환하세요. 자체 템플릿이 없는 경우를 위해 15가지 디자이너 제작 템플릿도 제공합니다.
MDMagic은 Claude, Cursor, VS Code 및 모든 MCP 호환 AI 어시스턴트에 직접 연결되어 전문적인 문서 변환 파이프라인(Pandoc + Microsoft Graph + Mammoth.js)과 사용자 템플릿에 직접 액세스할 수 있게 해줍니다. 기존 레터헤드, 문구류, 브랜드 가이드라인, 계약서 양식, 제안서 템플릿 등 Microsoft Word에서 사용하는 모든 것을 업로드하면, AI 어시스턴트가 Markdown을 사용자의 로고, 폰트, 색상, 바닥글, 페이지 번호, 워터마크 및 서명 블록이 포함된 세련된 문서로 직접 변환합니다. 결과물은 일반적인 AI 내보내기가 아닌 디자인 팀이 작업한 것처럼 보입니다.
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.설치
MDMagic 계정(무료 티어 제공)이 필요하며 계정 페이지에서 API 키를 발급받아야 합니다.
Claude Desktop
claude_desktop_config.json에 다음을 추가하세요:
{
"mcpServers": {
"mdmagic": {
"command": "npx",
"args": ["-y", "@mdmagic/mcp-server"],
"env": {
"MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
}
}
}
}설정 파일 위치:
macOS —
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows —
%APPDATA%\Claude\claude_desktop_config.jsonLinux —
~/.config/Claude/claude_desktop_config.json
Claude Desktop을 재시작하세요. 도구 목록에 MDMagic 도구가 나타납니다.
Cursor
~/.cursor/mcp.json에 추가하거나 설정 → MCP를 통해 추가하세요:
{
"mcpServers": {
"mdmagic": {
"command": "npx",
"args": ["-y", "@mdmagic/mcp-server"],
"env": {
"MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
}
}
}
}VS Code (MCP 확장 프로그램 사용)
{
"mcp.servers": {
"mdmagic": {
"command": "npx",
"args": ["-y", "@mdmagic/mcp-server"],
"env": {
"MDMAGIC_API_KEY": "mdmagic-xxxxxxxxxxxxxxxx"
}
}
}
}호스팅 버전 (설치 불필요)
사용자 컴퓨터에 Node를 설치하고 싶지 않으신가요? 호스팅된 엔드포인트를 사용하세요:
{
"mcpServers": {
"mdmagic": {
"url": "https://api.mdmagic.ai/mcp",
"headers": {
"x-api-key": "mdmagic-xxxxxxxxxxxxxxxx"
}
}
}
}동일한 도구와 템플릿을 Streamable HTTP를 통해 제공합니다. 로컬 프로세스를 실행하지 않는 클라이언트에게 유용합니다.
Related MCP server: AI Group Markdown to Word MCP Server
주요 기능
연결 후 AI 어시스턴트에게 다음과 같이 요청할 수 있습니다:
"이 마크다운을 Executive_Platinum 템플릿을 사용하여 PDF로 변환해 줘."
"사용 가능한 템플릿이 뭐야?"
"이 800단어 보고서를 DOCX + PDF로 렌더링하는 데 몇 크레딧이 필요해?"
"이것을 가로 방향, US Letter 크기, Legal_Burgundy 템플릿으로 렌더링해 줘."
"내 크레딧 잔액을 확인해 줘."
AI가 적절한 도구를 선택하고 안전한 기간 한정 다운로드 링크를 반환합니다.
도구
도구 | 기능 |
| Markdown을 DOCX / PDF / HTML 또는 세 가지 모두로 변환합니다. 안전한 만료 URL을 반환합니다. |
| 변환 전 사전 검사입니다. 잘못된 표, 닫히지 않은 코드 펜스 및 기타 구문 문제를 찾아냅니다. |
| 단어 수, 페이지 수, 형식 및 템플릿 유형을 기반으로 변환 비용을 사전 산정합니다. |
| 현재 크레딧 잔액(구독 + 구매 풀) 및 플랜 상태를 확인합니다. |
| 전체 템플릿 카탈로그: 15개의 내장 템플릿(카테고리별 그룹화) + 사용자 지정 업로드 템플릿. |
| 내장 템플릿만 표시: 비즈니스(5), 크리에이티브(6), 전문가용(2), 기술 분야(2). |
| 사용자가 업로드한 사용자 지정 템플릿만 표시합니다. |
| 특정 템플릿에 대해 사용 가능한 변형(페이지 크기 × 방향)을 표시합니다. |
| 설명된 목적에 가장 적합한 내장 템플릿을 제안합니다 ("Q4 이사회 자료" → Executive_Platinum). |
| 기본 페이지 크기, 방향 및 템플릿 환경 설정을 표시합니다. |
convert_document — 입력 옵션
소스를 제공하는 세 가지 방법:
content— 원시 마크다운 문자열 (가장 일반적)filePath—.md파일의 절대 경로 (IDE 워크플로우에 적합)fileContent— base64로 인코딩된 마크다운 (바이너리 안전 전송용)
추가 옵션:
templateName— 예:Executive_Platinum,Legal_Burgundy또는 사용자 지정 템플릿 UUIDoutputFormat—docx,pdf,html,all또는all-formatspageSize—A4,A3,US_Letter,US_Legal,Executiveorientation—Portrait또는Landscape
설정
변수 | 기본값 | 참고 |
| (필수) | mdmagic.ai/account에서 발급받은 개인 API 키 |
|
| 로컬 개발 또는 스테이징 환경에서만 재정의 |
|
| 요청 시간 제한 (ms) |
|
|
|
|
| HTTP 전송 모드용 포트 |
|
| HTTP 전송 모드용 바인딩 주소 |
대부분의 사용자는 MDMAGIC_API_KEY만 설정하면 됩니다.
가격
변환 비용은 페이지 수와 출력 형식에 따라 크레딧으로 계산됩니다:
DOCX: 페이지당 1 크레딧 (기본)
PDF: 페이지당 +1 크레딧
HTML: 페이지당 +1 크레딧
사용자 지정 템플릿: 페이지당 +1 크레딧
사용자 지정 템플릿을 사용하여 5페이지 보고서를 DOCX + PDF + HTML로 변환하는 경우 = 5 × (1 + 1 + 1 + 1) = 20 크레딧.
estimate_conversion_cost 도구는 비용을 지불하기 전에 정확한 수치를 반환합니다. 또한 잔액이 부족하면 MCP가 실행을 거부하므로 예상치 못한 청구서가 발생하지 않습니다.
무료 티어 크레딧은 매달 갱신됩니다. 유료 플랜 및 크레딧 충전은 mdmagic.ai에서 가능합니다.
개인정보 보호
영구 저장 없음. 문서는 PDF 렌더링을 위해 Microsoft Graph API를 거치며 5~10초 이내에 삭제됩니다. 출력 파일은 다운로드 후 또는 60분 후(둘 중 빠른 시점)에 MDMagic 서버에서 삭제됩니다.
무작위 파일명. 소스 파일은 UUID를 사용하며, 사용자를 식별할 수 있는 이름은 절대 사용하지 않습니다.
보안 다운로드 URL. 각 변환은 세션 ID와 다운로드 토큰이 포함된 일회용 URL을 반환합니다. 공개 파일 디렉토리는 없습니다.
API 키 격리. 각 사용자는 자신의 키로 인증합니다. 공유 자격 증명은 없습니다.
문제 해결
MDMAGIC_API_KEY environment variable is required
클라이언트 설정(JSON의 env 블록)에 환경 변수를 설정하세요. 셸에 넣지 마세요. npx는 이를 인식하지 못합니다.
Invalid API key format
키는 mdmagic- 뒤에 정확히 16자리 숫자가 와야 합니다. 계정 페이지에서 정확히 복사하세요.
Failed to connect to MDMagic API
브라우저에서 https://api.mdmagic.ai/health를 확인하세요. 접속이 가능하다면 로컬 네트워크나 방화벽 문제입니다. MCP를 실행 중인 컴퓨터에서 MDMAGIC_BASE_URL(기본값 https://api.mdmagic.ai)에 도달할 수 있는지 확인하세요.
Claude Desktop에 도구가 나타나지 않음
claude_desktop_config.json을 수정한 후 Claude Desktop을 완전히 종료하고 다시 실행하세요. 창을 닫는 것만으로는 충분하지 않습니다.
Insufficient credits
check_credit_balance를 사용하여 잔액을 확인하고, estimate_conversion_cost로 비용을 미리 확인하거나 mdmagic.ai/account에서 충전하세요.
로컬 개발
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 inspectorMCP Inspector(npm run inspector)는 도구별로 서버를 테스트할 수 있는 웹 UI를 실행합니다. 새로운 도구를 추가하거나 인수 유효성 검사를 디버깅할 때 유용합니다.
npm test로 테스트를 실행하세요.
링크
MDMagic — mdmagic.ai
API 키 발급 — mdmagic.ai/account
MCP 사양 — modelcontextprotocol.io
라이선스
MIT — LICENSE를 참조하세요.
Available Tools
10 toolscheck_credit_balanceARead-onlyIdempotentInspect
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:
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)
If the user is ambiguous (e.g. 'convert this'), ASK which format they want before calling. Don't assume.
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.
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.
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.
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_costARead-onlyIdempotentInspect
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_detailsARead-onlyIdempotentInspect
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_templatesARead-onlyIdempotentInspect
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_templatesARead-onlyIdempotentInspect
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_templatesARead-onlyIdempotentInspect
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_templateARead-onlyIdempotentInspect
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_settingsARead-onlyIdempotentInspect
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_markdownARead-onlyIdempotentInspect
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
Scored across 10 tools
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.
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.
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.
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
Related MCP Connectors
Markdown in, any format out. PDFs merged, split, watermarked. Runs on our own doc engines.
Turn Markdown or plain text into a clean PDF document to print or share, plus an editable Word file.
The document publishing layer for AI tools. Convert markdown to 6 destinations, 62 templates.
Convert Markdown to PDF, DOCX, HTML or EPUB with formatting and display options.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables creation and management of Word documents from markdown content, with support for multiple templates and conversion of chat conversations to formatted Word documents.-
- AlicenseAqualityDmaintenanceConverts Markdown documents to professional Word documents with advanced formatting capabilities including mathematical formulas, custom styling, tables, images, headers/footers, and watermarks.496 npm14MIT
- AlicenseBqualityDmaintenanceEnables creating professional Word documents from markdown or structured content with fast, customized formatting via natural language.71ISC
- AlicenseAqualityDmaintenanceConverts Markdown files to Word (.docx) and PDF documents. Supports .dotx templates for branded styling and batch conversion.317 PyPI1MIT