md2pdf-ja-mcp

md2pdf-ja-mcp

Enables converting Japanese Markdown files to beautifully formatted PDFs directly from Claude Code, with support for custom themes, page formats, and CSS.

Category
Visit Server

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

関連プロジェクト

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured