npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@j2masamitu/md2pdf-ja-mcp

v1.0.1

Published

MCP server for md2pdf-ja - Convert Japanese Markdown to PDF

Readme

md2pdf-ja-mcp

md2pdf-ja 用の MCP (Model Context Protocol) サーバー - Claude Code から直接、日本語の Markdown ファイルを美しい PDF に変換します。

機能

  • 🚀 Claude Code から Markdown を PDF に変換
  • 🇯🇵 日本語文書に最適化
  • 🎨 複数のテーマ(default、academic、business)
  • 📄 カスタムページフォーマット(A4、A5、B5、Letter)
  • 🎯 カスタム CSS サポート
  • ⚡ 高速で効率的な変換

前提条件

この MCP サーバーを使用する前に、md2pdf-ja をインストールする必要があります:

npm install -g @j2masamitu/md2pdf-ja

インストール

オプション 1: npm(推奨)

npm install -g @j2masamitu/md2pdf-ja-mcp

オプション 2: ソースから

git clone https://github.com/j2masamitu/md2pdf-ja-mcp
cd md2pdf-ja-mcp
npm install
npm run build
npm link

設定

Claude Code の設定

claude mcp add md2pdf-ja-mcp md2pdf-ja-mcp --scope user

利用可能なツール

convert_markdown_to_pdf

日本語の Markdown ファイルを美しい PDF に変換します。

パラメータ:

  • input(必須):入力 Markdown ファイルへのパス
  • output(オプション):出力 PDF ファイルへのパス
  • title(オプション):文書のタイトル - 明示的に要求された場合のみ使用
  • author(オプション):文書の著者 - 明示的に要求された場合のみ使用
  • theme(オプション):テーマ(defaultacademicbusiness)- 明示的に要求された場合のみ使用
  • format(オプション):ページフォーマット(A4A5B5Letter)- 明示的に要求された場合のみ使用
  • css(オプション):カスタム CSS ファイルへのパス - 明示的に要求された場合のみ使用

重要: デフォルトでは、input(およびオプションで output)パラメータのみを使用する必要があります。他のパラメータは、ユーザーが明示的に要求した場合にのみ含める必要があります。これにより、PDF 内のタイトルの重複や不要なメタデータを防ぎます。

Claude Code での使用例:

document.md を PDF に変換して
document.md を academic テーマで PDF に変換して

Claude Code は、リクエストに基づいて適切なパラメータを使用して MCP ツールを自動的に使用します。

使用例

基本的な変換

my-document.md を PDF に変換して

オプション付き

report.md を以下のオプションで PDF に変換して:
- タイトル: 「2024年度年次報告書」
- 著者: 「山田太郎」
- テーマ: academic
- フォーマット: A4

カスタム CSS 使用

presentation.md を custom.css を使用してスタイリングして PDF に変換して

開発

# 依存関係のインストール
npm install

# ビルド
npm run build

# ウォッチモード
npm run watch

動作の仕組み

この MCP サーバーは:

  1. Claude Code からリクエストを受信
  2. 入力パラメータの検証
  3. 適切なオプションで md2pdf-ja CLI を実行
  4. 変換結果を Claude Code に返す

トラブルシューティング

「md2pdf-ja: command not found」

md2pdf-ja がグローバルにインストールされていることを確認してください:

npm install -g @j2masamitu/md2pdf-ja
md2pdf-ja --version

Claude Code に MCP サーバーが表示されない

  1. 設定ファイルのパスが正しいことを確認
  2. JSON 構文が有効であることを確認
  3. Claude Code を完全に再起動
  4. Claude Code のログでエラーを確認

パーミッションエラー

dist/index.js ファイルが実行可能であることを確認してください:

chmod +x dist/index.js

ライセンス

MIT

関連プロジェクト