Skip to main content
Glama
mrslbt

pdf-it

by mrslbt

pdf-it

pdf-it MCP server MCP Badge npm version npm downloads License: MIT

Markdownを、まるで最初からその目的で作られたかのようなPDFに変換するModel Context Protocol (MCP) サーバーおよびClaude Codeスキルです。表紙、目次、ページをまたぐコードブロック、ページ番号付きフッターを備えています。Claudeのセッションからコマンド一つで、クライアントに送付可能なファイルを作成できます。

pdf-it cover example

なぜこれが必要なのか

Claude Codeでのリサーチセッションはいつも同じ結末を迎えます。有用なMarkdownの山ができあがるものの、それを人に読ませるためのきれいなPDFにする方法がないのです。Chromeの印刷機能は見栄えが悪く、手動でのHTML変換は手間がかかります。

pdf-itがその作業を代行します。Markdownを入力し、デザインされたPDFを出力します。コマンドは一つだけです。

pdf-it body example

12ページのサンプルが examples/designing-ai-agent-uiux.pdf にあります。

Related MCP server: Gen-PDF MCP Server

対応クライアント

pdf-itは標準的なModel Context Protocolサーバーです。ローカルでMCPをサポートするあらゆるクライアントで使用できます。

クライアント

対応状況

追加方法

Claude Desktop (Mac, Windows)

はい

claude_desktop_config.jsonを編集

Claude Code (CLI)

はい (「これをPDFとして保存」等のスキルトリガーも含む)

claude mcp add pdf-it -- npx -y pdf-it-mcp

Cursor

はい

~/.cursor/mcp.jsonを編集

Cline (VS Code extension)

はい

ClineのMCP設定を編集

Continue.dev

はい

ContinueのMCP設定から追加

Zed

はい

標準のMCP設定

Goose (Block's CLI)

はい

標準のMCP設定

Anthropic SDK経由のカスタムエージェント

はい

MCPを自分で設定

claude.ai (ブラウザ)

いいえ

Web版はローカルMCPサーバーを実行できません

Claude iOS / Android

いいえ

モバイル版はローカルMCPサーバーを実行できません

クライアント側の必須要件: Node.js 18以上、Google Chromeがインストールされていること、クライアントがMCPをサポートしていること。

インストール

npm install -g pdf-it-mcp

または、npx pdf-it-mcpでオンデマンド実行してください。

要件

  • Node.js 18以上

  • Google Chromeがインストールされていること (レンダラーとして使用。追加のダウンロードは不要)

設定

Claude Desktop

claude_desktop_config.jsonを編集します:

{
  "mcpServers": {
    "pdf-it": {
      "command": "npx",
      "args": ["-y", "pdf-it-mcp"]
    }
  }
}

Claude Code

claude mcp add pdf-it -- npx -y pdf-it-mcp

Cursor

~/.cursor/mcp.jsonに追加します:

{
  "mcpServers": {
    "pdf-it": {
      "command": "npx",
      "args": ["-y", "pdf-it-mcp"]
    }
  }
}

カスタムChromeパス

Chromeが標準以外の場所にある場合:

{
  "mcpServers": {
    "pdf-it": {
      "command": "npx",
      "args": ["-y", "pdf-it-mcp"],
      "env": { "CHROME_PATH": "/path/to/chrome" }
    }
  }
}

使用方法

サーバーに接続されたClaudeセッションで、以下のように依頼してください:

Save this as a PDF

または、以下のフレーズでも可能です: export as PDF, make a PDF report from this, turn this into a PDF, /pdf。スキルがリクエストを検知し、pdf-it経由で処理します。出力はデフォルトで ~/Documents/pdf-it/ に保存されます。

ツール

ツール

説明

generate_pdf

MarkdownをPDFに変換します。テンプレート (research-report または plain)、表紙用のタイトルと著者(任意)、出力パス(任意)を受け取ります。

list_templates

利用可能なテンプレートのリストと説明を返します。

generate_pdf パラメータ

パラメータ

必須

説明

content

はい

変換するMarkdown文字列

title

いいえ

表紙およびページフッターに表示

author

いいえ

表紙に表示

output_path

いいえ

出力先の絶対パス。デフォルトは ~/Documents/pdf-it/{slug}-{timestamp}.pdf

template

いいえ

research-report (デフォルト) または plain

テンプレート

名前

説明

research-report

タイトル、著者、日付付きの表紙。H1およびH2見出しから自動生成される目次。適切な階層構造を持つ本文。タイトルとページ番号付きのフッター。リサーチ、要約、設計ドキュメント、レポートに最適。

plain

表紙なし、目次なし。本文のみの構成。短いメモや素早いエクスポートに最適。

スキル

このパッケージには SKILL.md にClaude Codeスキルが含まれています。スキルが反応するトリガーフレーズ:

  • save this as PDF

  • export as PDF

  • make a PDF report from this

  • turn this into a PDF

  • generate a PDF

  • /pdf

スキルの完全な仕様については SKILL.md を参照してください。

例

examples フォルダには、生成されたPDFのサンプル (designing-ai-agent-uiux.pdf, 12ページ) と、このREADMEで使用されている表紙および本文のスクリーンショットが含まれています。

出力

デフォルトでは、PDFは ~/Documents/pdf-it/{slug}-{timestamp}.pdf に書き込まれます。output_path を渡すことで上書き可能です。

デザイン

可能な限りシステムフォントを使用しています。本文と見出しにはInter、コード、ページ番号、メタデータにはJetBrains Monoを使用。純白の紙、ほぼ黒のインク、ニュートラルな細い境界線、アクセントカラーはなし。コードブロックは意図的にシンタックスハイライトなしでレンダリングされます。PDFにおける色の選択は劣化しやすいためです。

別のデザイン言語が必要な場合は、テンプレートをフォークして調整してください。テンプレートは src/templates/ にあり、Puppeteerを通じてレンダリングされるプレーンなHTMLとCSSです。

ライセンス

MIT。 LICENSE を参照してください。

作成者: Marsel Bait

Available Tools

2 tools
generate_pdfA

Convert markdown into a designed PDF (cover page, auto TOC, page-numbered footer). Use this for any "save/export/print/share as PDF", "make a report", "turn this into a PDF", or /pdf request — do NOT fall back to Chrome headless, cupsfilter, wkhtmltopdf, pandoc, or LaTeX. Templates: research-report (cover + TOC, default) or plain (no cover, no TOC).

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesMarkdown content to convert to PDF.
output_pathNoAbsolute path for the output PDF. Defaults to ~/Documents/pdf-it/{title}-{timestamp}.pdf
titleNoDocument title shown on the cover page and footer.
authorNoAuthor name shown on the cover page.
templateNoTemplate to use. "research-report" (default) adds a cover page and table of contents. "plain" renders body content only.research-report

TDQS

A4.6/5.0
Behavior4/5

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

No annotations provided, so description must carry behavioral disclosure. It describes output features (cover, TOC, footer) and template effects. Could mention overwrite behavior or directory requirements, but conversion behavior is mostly implied by the task.

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?

Two sentences efficiently cover purpose, usage guidelines, and template options. No redundant information, front-loaded with key details.

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

Completeness4/5

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

Covers main functionality, output features, and templates. Lacks details on error handling or file overwrite, but for a conversion tool with no output schema, it sufficiently prepares the agent to select and invoke the tool.

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

Parameters4/5

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

Schema coverage is 100% so baseline is 3. Description adds value by explaining template behavior (research-report vs plain) and reinforcing that title appears on cover and footer. Not all parameters get extra context, but overall it enhances understanding.

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 explicitly states the tool converts markdown to a designed PDF with cover page, auto TOC, and page-numbered footer. It distinguishes from the only sibling, list_templates, which is clearly different.

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

Usage Guidelines5/5

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

Provides clear when-to-use scenarios (save/export/print/share as PDF, make a report, /pdf request) and explicitly lists alternatives to avoid (Chrome headless, cupsfilter, wkhtmltopdf, pandoc, LaTeX).

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

list_templatesA

List all available PDF templates with their descriptions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses a read operation returning a list with descriptions, but does not mention potential side effects or details like caching.

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, efficient sentence front-loaded with key purpose. No wasted words.

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?

Adequate for a simple list tool with no parameters, but lacks details like ordering, filtering, or scope of templates (e.g., user-specific vs global).

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

Parameters4/5

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

No parameters exist, and schema coverage is 100%, so baseline is 4. Description does not need to add parameter info.

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 lists all available PDF templates with descriptions, distinguishing it from the sibling tool 'generate_pdf' which likely generates a PDF from a template.

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?

Implied usage via naming ('list' vs 'generate'), but no explicit guidance on when to use this tool over alternatives.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.2.0
    • First observedgenerate_pdf
    • First observedlist_templates

TDQS

A4.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: generating PDFs and listing templates, with no overlap.

Naming Consistency5/5

Both tools follow a consistent verb_noun snake_case pattern (generate_pdf, list_templates), making them predictable.

Tool Count3/5

With only two tools, the server covers the essential PDF generation function but feels minimal for a broader toolkit.

Completeness3/5

The set covers generate and list, but lacks template management (create, update, delete) and advanced options, leaving moderate gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers