PDF Reader MCP Server
PDFリーダーMCPサーバー
ローカル ファイルと URL の両方をサポートし、PDF ファイルからテキストを読み取って抽出するためのツールを提供するモデル コンテキスト プロトコル (MCP) サーバー。
著者
フィリップ・ヴァン・デ・ウォーカー
メールアドレス: philip.vandewalker@gmail.com
GitHub: https://github.com/trafflux
Related MCP server: PDF Reader MCP Server
特徴
ローカルのPDFファイルからテキストコンテンツを読み取る
PDF URL からテキスト コンテンツを読み取る
破損または無効な PDF のエラー処理
ローカル PDF にアクセスするためのボリュームマウント
PDFエンコードの自動検出
標準化されたJSON出力形式
インストール
リポジトリをクローンします。
git clone https://github.com/trafflux/pdf-reader-mcp.git
cd pdf-reader-mcpDocker イメージをビルドします。
docker build -t mcp/pdf-reader .使用法
サーバーの実行
ローカル PDF ファイルにアクセスしてサーバーを実行するには:
docker run -i --rm -v /path/to/pdfs:/pdfs mcp/pdf-reader/path/to/pdfs PDF ファイル ディレクトリへの実際のパスに置き換えます。
ローカル PDF ファイルを使用しない場合:
docker run -i --rm mcp/pdf-readerMCP構成
MCP 設定構成に追加します:
{
"mcpServers": {
"pdf-reader": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/pdfs:/pdfs",
"mcp/pdf-reader"
],
"disabled": false,
"autoApprove": []
}
}
}ローカルファイルなしの PDF ファイル:
{
"mcpServers": {
"pdf-reader": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/pdf-reader"],
"disabled": false,
"autoApprove": []
}
}
}利用可能なツール
read_local_pdf目的: ローカルのPDFファイルからテキストコンテンツを読み取る
入力:
{ "path": "/pdfs/document.pdf" }出力:
{ "success": true, "data": { "text": "Extracted content..." } }
read_pdf_url目的: PDF URL からテキスト コンテンツを読み取る
入力:
{ "url": "https://example.com/document.pdf" }出力:
{ "success": true, "data": { "text": "Extracted content..." } }
エラー処理
サーバーは、明確なエラー メッセージを使用してさまざまなエラー ケースを処理します。
無効または破損したPDFファイル
不足しているファイル
失敗したURLリクエスト
権限の問題
ネットワーク接続の問題
エラー応答は次の形式に従います。
{
"success": false,
"error": "Detailed error message"
}依存関係
Python 3.11以上
PyPDF2: PDF解析とテキスト抽出
リクエスト: URLからPDFを取得するためのHTTPクライアント
MCP SDK: モデルコンテキストプロトコルの実装
プロジェクト構造
.
├── Dockerfile # Container configuration
├── README.md # This documentation
├── requirements.txt # Python dependencies
└── src/
├── __init__.py # Package initialization
└── server.py # Main server implementationライセンス
Copyright 2025 フィリップ・ヴァン・デ・ウォーカー
Apacheライセンス バージョン2.0(以下「ライセンス」)に基づいてライセンスされています。このファイルは、ライセンスに従わない限り使用できません。ライセンスのコピーは以下から入手できます。
http://www.apache.org/licenses/LICENSE-2.0適用法によって義務付けられている場合、または書面による合意がある場合を除き、本ライセンスに基づいて配布されるソフトウェアは、「現状有姿」で配布され、明示的または黙示的を問わず、いかなる種類の保証または条件も付与されません。本ライセンスに基づく許可および制限事項を規定する具体的な文言については、本ライセンスを参照してください。
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
接触
ご質問、問題、または貢献については、Philip Van de Walker までお問い合わせください。
メールアドレス: philip.vandewalker@gmail.com
GitHub: https://github.com/trafflux
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
Extract text, Markdown and metadata from PDF URLs or uploads via Apify, per document or per page.
PDF URLs to per-page text, tables as rows, Markdown, metadata and OCR for scanned pages.
Extract text and metadata from PDFs; convert Markdown or text to PDF
Convert PDF URLs to clean text or LLM-ready Markdown, with RAG chunks and OCR in 100+ languages.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables reading and extracting text content from PDF files, supporting both local file system access and remote PDF URLs with automatic encoding detection.2-
- FlicenseAqualityDmaintenanceEnables reading and extracting content from PDF documents including text (as Markdown), images, tables, and metadata from both local files and URLs, with OCR support for scanned documents.2-
- AlicenseAqualityDmaintenanceEnables AI agents to securely read and extract information from PDF files including text content, metadata, and page counts from both local files and URLs within the project context.1MIT
- AlicenseAqualityDmaintenanceEnables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.3627 npm1MIT