Skip to main content
Glama

📄 MCP PDF サーバー

FastMCPをベースにした PDF ファイル読み取りサーバー。

PDF テキスト抽出、OCR 認識、MCP プロトコル経由の画像抽出をサポートし、テストを簡単に行うための Web デバッガーが組み込まれています。


🚀 機能

  • PDFテキストを読む
    PDF から通常のテキストを抽出します (ページごとに)。

  • OCRによる読み取り
    OCR を使用して、スキャンされた PDF または画像ベースの PDF からテキストを認識します。

  • PDF画像を読む
    指定された PDF ページからすべての画像を抽出します (Base64 エンコードされた出力)。


Related MCP server: PDF Reader MCP Server

📂 プロジェクト構造

mcp-pdf-server/
├── pdf_resources/        # Directory for uploaded and processed PDF files
├── txt_server.py         # Main server entry point
└── README.md             # Project documentation

⚙️ インストール

推奨される Python バージョン: 3.9 以上

pip install pymupdf mcp

注意: OCR 機能を使用するには、OCR サポートまたは外部 OCR ライブラリを備えた MuPDF ビルドが必要になる場合があります。


🔦 サーバーを起動する

次のコマンドを実行します。

python txt_server.py

次のようなログが表示されます。

Serving on http://127.0.0.1:6231

🌐 Webデバッグインターフェース

ブラウザを開いて次のサイトにアクセスしてください:

http://127.0.0.1:6231
  • 左パネルからツールを選択します

  • 右側のパネルにパラメータを入力します

  • 「実行」をクリックしてツールをテストします

コーディングは不要で、Web UI 経由で簡単にデバッグおよびテストできます。


🛠️ APIツールリスト

道具

説明

入力パラメータ

返品

read_pdf_text

PDFページから通常のテキストを抽出します

file_pathstart_pageend_page

ページテキストのリスト

read_by_ocr

OCRでテキストを認識する

file_pathstart_pageend_pagelanguagedpi

OCRで抽出したテキスト

read_pdf_images

PDFページから画像を抽出します

file_pathpage_number

画像リスト(Base64エンコード)


📝 使用例

1 ページから 5 ページまでのテキストを抽出します。

mcp run read_pdf_text --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 5}'

1ページでOCR認識を実行します。

mcp run read_by_ocr --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 1, "language": "eng"}'

ページ 3 からすべての画像を抽出します。

mcp run read_pdf_images --args '{"file_path": "pdf_resources/example.pdf", "page_number": 3}'

📢 注意事項

  • ファイルはpdf_resources/ディレクトリ内に配置するか、絶対パスを指定する必要があります。

  • OCR 機能を使用するには、環境内で適切な OCR サポートが必要です。

  • 大きなファイルを処理する場合は、必要に応じてメモリとタイムアウトの設定を調整します。


📜 ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています。
商用利用の場合は、元の出典を明記してください。


F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides comprehensive PDF processing capabilities including text extraction, image extraction, table detection, annotation extraction, metadata retrieval, page rendering, and document structure analysis.
  • F
    license
    A
    quality
    Not graded
    maintenance
    A Model Context Protocol server that extracts and processes content from PDF documents, providing text extraction, metadata retrieval, page-level processing, and PDF validation capabilities.
    4
    1
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server for extracting text from PDF files, supporting local files and URLs.

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DeepSeekMine/mcp-pdf-reader'

If you have feedback or need assistance with the MCP directory API, please join our Discord server