Skip to main content
Glama

cardnews-mcp-server

자막/텍스트를 1080×1620 인포그래픽 카드뉴스(HTML + PNG) 한 장으로 만들어 주는 MCP 서버입니다. 강의 자막(.vtt/.srt) 또는 임의 텍스트를 입력하면, LLM 이 카드 콘텐츠(JSON)를 만들고 HTML 템플릿에 채운 뒤 Puppeteer 로 PNG 를 캡처합니다.

localnotebooklm 의 카드뉴스 파이프라인을 독립 Node.js MCP 서버로 포팅한 것입니다. 콘텐츠 규칙: 섹션 48개(내용에 맞춰 가변) · 요약바 pill 46개. 주제 내용 중심(시험 메타 섹션 배제).

💰 모델별 생성 비용 비교는 PRICING.md 참고. (자동·대량 생성 기본값: gpt-5.4-nano)

산출물 예시

강의 자막(.vtt/.srt) 또는 텍스트 → 회차 1장 카드뉴스 PNG. 디자인 톤은 표지(헤드라인 + 이모지) · 6개 섹션 2열 그리드 · 하단 요약 띠(5 pill) 구조입니다. (데이터 파일은 동봉하지 않습니다 — 자신의 자막 파일을 사용하거나, 아래 E2E 테스트의 내장 샘플로 확인하세요.)

Related MCP server: Little Red Book Card MCP

요구 사항

  • Node.js 18 이상

  • LLM API 키 (Anthropic 또는 OpenAI)

  • Puppeteer 용 Chrome (설치 명령 아래)

  • (선택) Pretendard 폰트 설치 시 한글 렌더 품질 향상. 미설치 시 Windows 기본 Malgun Gothic 으로 렌더됩니다.

설치

npm install
npx puppeteer browsers install chrome
cp .env.example .env   # 그리고 API 키 입력

.env 예시:

LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
# MODEL=claude-sonnet-4-6   # 비우면 공급자 기본값
OUTPUT_DIR=./output

OpenAI 를 쓰려면:

LLM_PROVIDER=openai
OPENAI_API_KEY=sk-...
# MODEL=gpt-4o

빠른 검증 (E2E)

node test/e2e.mjs

코드에 내장된 데모용 합성 자막(복리 개념)으로 카드 JSON + PNG 를 output/ 에 생성하고, 섹션 6개 / pill 5개 / PNG 용량을 점검합니다.

Claude Desktop 등록

claude_desktop_config.json 에 추가:

{
  "mcpServers": {
    "cardnews": {
      "command": "node",
      "args": ["D:/00work/260604-toMCP/cardnews-mcp-server/src/index.js"],
      "env": {
        "LLM_PROVIDER": "anthropic",
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "OUTPUT_DIR": "D:/00work/260604-toMCP/cardnews-mcp-server/output"
      }
    }
  }
}

args 의 경로는 이 리포의 실제 위치로 바꾸세요.

실행 모드

node src/index.js          # stdio (Claude Desktop / MCP 클라이언트 기본)
node src/index.js --http   # Streamable HTTP (포트 PORT 또는 3500)

도구 (MCP tools)

도구

설명

주요 인자

create_cardnews_from_text

텍스트/자막 문자열 → 카드 1장

text, format(vtt|srt|plain), metadata?, outputDir?, model?, label?

create_cardnews_from_file

.vtt/.srt/.txt 파일 → 카드 1장

filePath, metadata?, outputDir?, model?

create_cardnews_batch

여러 파일 → 회차별 N장 + 종합 1장

filePaths[] 또는 folder, combine?(기본 true), outputDir?, model?

모든 도구는 { ok, card, htmlPath, pngPath }(배치는 { ok, count, cards, files }) 형태의 JSON 을 반환합니다. 오류 시 throw 하지 않고 { ok: false, error } 를 반환합니다.

구조

src/
├── index.js              진입점 (stdio / --http)
├── server.js             MCP 서버 + 도구 등록
├── prompt.js             카드뉴스 프롬프트
├── tools/cardnews.js     도구 핸들러 (단일/파일/배치)
└── pipeline/
    ├── subtitle.js       자막 파싱 (타임코드 제거 + 중복 제거)
    ├── llm.js            LLM 호출 → 카드 JSON
    ├── template.js       HTML 템플릿
    └── render.js         Puppeteer HTML→PNG 캡처

Available Tools

3 tools
create_cardnews_batchA

여러 자막 파일을 회차별 카드 1장씩 + (combine 시) 전체 병합 '종합' 1장으로 생성한다.

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathsNo자막 파일 경로 배열
folderNo자막 파일이 있는 폴더 (.vtt/.srt 자동 수집)
combineNo전체 병합 종합 카드 생성 여부 (기본 true)
outputDirNo
modelNo

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes creation behavior: one card per file plus optional merged card. No annotations provided, but lacks disclosure of side effects, error handling, file requirements, or output specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with essential information, no filler. Front-loaded with main action and conditional combine behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Core logic is clear, but missing details on output directory and model parameters. No output schema or error handling info. Adequate but not comprehensive for a 5-param batch operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Description reinforces combine parameter's effect. With 60% schema coverage, some parameters (outputDir, model) remain undocumented. Description adds marginal value beyond schema for filePaths and folder.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States clear verb '생성한다' (creates) and resource '여러 자막 파일을 회차별 카드' (multiple subtitle files into episode cards). Distinguishes from sibling tools that handle single file or text input.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies batch usage for multiple subtitle files, but no explicit guidance on when to use or not use versus alternatives. No when-not-to-use or prerequisite conditions mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_cardnews_from_fileB

.vtt/.srt/.txt 자막 파일을 읽어 단일 카드뉴스(HTML + PNG)를 생성한다.

ParametersJSON Schema
NameRequiredDescriptionDefault
filePathYes자막 파일 경로 (.vtt/.srt/.txt)
metadataNo
outputDirNo
modelNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It mentions reading files and generating output, but omits side effects (e.g., file creation, overwrite behavior), error handling, or access permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that immediately conveys the tool's primary action and output format, with no redundant or extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks critical details about parameters, return values, and operational behavior (e.g., file handling, output location). Given 4 parameters and no output schema, this is insufficient for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only filePath benefits from additional context (subtitle file types). The other three parameters (metadata, outputDir, model) remain undocumented in both schema and description, failing to compensate for low schema coverage (25%).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads subtitle files (.vtt/.srt/.txt) and generates a single card news (HTML+PNG), distinguishing it from siblings like batch processing or text input.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives (create_cardnews_batch, create_cardnews_from_text). Usage is implied by the name and description but lacks clear context or exclusionary instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_cardnews_from_textB

자막/텍스트 문자열로부터 1080x1620 인포그래픽 카드뉴스(HTML + PNG) 1장을 생성한다. 섹션 6개·요약바 pill 5개.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes원문 자막 또는 텍스트
formatNo입력 포맷 (기본 plain)
metadataNo출처/시리즈 등 메타데이터
outputDirNo출력 디렉터리 (기본 OUTPUT_DIR 또는 ./output)
modelNoLLM 모델 직접 지정 (선택)
labelNo출력 파일명 라벨 (기본 card)

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description provides some behavioral info: output format (HTML+PNG), dimensions (1080x1620), and internal structure (6 sections, 5 pills). However, it omits details on idempotency, side effects, authentication needs, or error states. Partially adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (one sentence plus a fragment), making it concise. However, the fragment '섹션 6개·요약바 pill 5개' is somewhat cryptic and could be structured more clearly. Still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, 6 parameters including a nested object, and multiple formats, the description is too sparse. It does not explain how format affects processing, what metadata influences, or defaults for optional parameters. Leaves significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so each parameter has a description. The tool description adds minimal value beyond the schema (e.g., output structure). No assistance with parameter values like format or metadata role.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a 1080x1620 infographic card news (HTML+PNG) from a subtitle/text string, specifying the output format and structure (6 sections, 5 summary pills). It distinguishes from siblings implicitly by focusing on single text input, but could explicitly mention batch/file alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus sibling tools (create_cardnews_batch, create_cardnews_from_file). The description does not indicate prerequisites, context, or exclusions, leaving the agent to infer usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct input source: batch from multiple subtitle files, single file, or text string. No overlap in functionality.

Naming Consistency5/5

All tools follow a consistent 'create_cardnews_' prefix with a clear source descriptor: batch, from_file, from_text.

Tool Count5/5

Three tools cover the core creation scenarios (batch, file, text) without unnecessary duplication.

Completeness4/5

The set covers the primary creation use cases well, but lacks tools for management (list, delete, update) which may be needed if cards are stored.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leedonwoo2827-ship-it/cardnews-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server