label-pop-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
label-pop-mcp
CSVとテンプレート(JSON)から、名入れラベルと店頭POPのPDFを一括生成する MCP サーバーです。 「CSVの名簿から名札ラベルを全員分まとめて作る」「商品リストからPOPを一括で作る」のような、 単純だけど件数が多くて手作業だと辛い仕事を、AIクライアント(Claude Code / Claude Desktop など)から 呼び出せる形にしたサンプルです。

できること
preview_layout— テンプレートのレイアウト確認(ページ・ラベル寸法、列×行、1ページの枚数、収まりチェック)generate_pdf— CSVの各行をテンプレートに流し込んでPDFを生成テキスト内の
{列名}がCSVの値に置き換わります文字がブロック幅に収まらない場合は自動で縮小します(収まらなかった場合は警告を返します)
CSVは UTF-8 / Shift_JIS 対応。列の過不足や重複ヘッダーはエラーとして報告します
同梱テンプレート:
templates/name_label.json— 名入れラベル(A4・90×55mm・2列×5段、ガイド線つき)templates/pop.json— 店頭POP(A4・1枚もの)
Related MCP server: niimbot-mcp
セットアップ
pip install -r requirements.txt
python server.py # stdio で起動
python smoke_test.py # 動作確認(MCPクライアントとして接続し、生成まで検証)日本語フォントについて
PDFへの日本語描画にはフォントファイルが必要です。以下の順で探します。
テンプレートJSONの
font_path環境変数
LABEL_POP_FONT(太字はLABEL_POP_FONT_BOLD)OSの既定候補(Noto Sans CJK / ヒラギノ角ゴシック / Yu Gothic など)
見つからない場合は、その旨のエラーを返します。
MCPクライアントへの登録例
Claude Code:
claude mcp add label-pop -- python /path/to/mcp-label-pop-sample/server.pyClaude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"label-pop": {
"command": "python",
"args": ["/path/to/mcp-label-pop-sample/server.py"]
}
}
}登録後は、たとえば次のように頼めます。
samples/people.csvをtemplates/name_label.jsonでPDFにして、out/labels.pdfに出して
テンプレートの書き方
座標はすべて mm、原点はラベルの左上です。
{
"name": "名入れラベル(A4・90x55mm・2列5段)",
"page": { "width_mm": 210, "height_mm": 297 },
"label": { "width_mm": 90, "height_mm": 55 },
"grid": { "columns": 2, "rows": 5, "margin_x_mm": 15, "margin_y_mm": 11, "gap_x_mm": 0, "gap_y_mm": 0 },
"guides": true,
"blocks": [
{ "text": "{company}", "x_mm": 5, "y_mm": 6, "width_mm": 80, "size": 10, "align": "center" },
{ "text": "{name}", "x_mm": 5, "y_mm": 15, "width_mm": 80, "size": 26, "align": "center", "bold": true },
{ "text": "{title}", "x_mm": 5, "y_mm": 38, "width_mm": 80, "size": 11, "align": "center" }
]
}blocks[].textの{列名}がCSVの列と対応します(固定の文字列だけでも構いません)alignはleft/center/right、bold: trueで太字フォントを使いますguides: trueでラベルの外枠(切り取りガイド)を描きます
注意
このサーバーはローカルで動く stdio サーバーです。ツールに渡すパスは自分のPC上のファイルを指し、 サーバーは実行ユーザーの権限でファイルを読み書きします。信頼できるクライアントからのみ使ってください。
出力先に同名ファイルがある場合は上書きされます。
ライセンス
MIT
English summary
A small sample MCP server (Python + FastMCP + PyMuPDF) that batch-generates
name-label and point-of-purchase (POP) PDFs from a CSV file and a JSON layout
template. Tools: preview_layout (validate a template) and generate_pdf
(fill {column} placeholders per CSV row, auto-shrink text to fit, grid
layout across pages). Japanese fonts are resolved from the template, the
LABEL_POP_FONT env var, or common OS locations.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate print-ready barcode label PDFs from JSON with reusable templates.
Typeset PDFs from templates (invoices, CVs, certificates, invitations), one or many at once.
Build print-ready PDF catalogs from templates and spreadsheet data.
JSON in, PDF out. Render invoices, certificates, reports and cards from a template and a payload.
Related MCP Servers
AlicenseAqualityBmaintenanceRenders PDFs from HTML templates or saved templates and spreadsheet data, with batch job support and document retrieval.1188 npm1MIT- FlicenseNot gradedqualityDmaintenanceEnables printing text, QR codes, and images directly to NIIMBOT B1 BLE label printers without vendor apps or cloud, with orientation control, fit validation, and local preview tools.-
- AlicenseAqualityBmaintenanceEnables creating PDFs from text, Markdown, or tabular data and editing existing ones through metadata and page operations, with support for CJK font embedding, tagged PDF/PDF-UA, and PDF/A archival output.20264 npmMIT
- AlicenseAqualityBmaintenanceEnables printing labels whose layout adapts to the roll reported by a CUPS/IPP label printer, as well as PDF, Markdown, and HTML documents, with preview, copies, duplex, page ranges, and print-job management.7MIT