MCP PDF Server

by DeepSeekMine

Integrations

  • Enables reading and processing PDF files with tools for text extraction, OCR recognition, and image extraction from PDF documents.

  • Based on FastMCP framework which is hosted on GitHub, allowing users to leverage the MCP protocol implementation for PDF processing.

  • Requires Python 3.9+ environment to run the server, utilizing Python libraries like PyMuPDF for PDF processing functionality.

📄 MCP PDF サーバー

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

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


🚀 機能

  • PDFテキストを読む
    PDF から通常のテキストを抽出します (ページごとに)。
  • OCRによる読み取り
    OCR を使用して、スキャンされた PDF または画像ベースの PDF からテキストを認識します。
  • PDF画像を読む
    指定された PDF ページからすべての画像を抽出します (Base64 エンコードされた出力)。

📂 プロジェクト構造

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_textPDFページから通常のテキストを抽出しますfile_pathstart_pageend_pageページテキストのリスト
read_by_ocrOCRでテキストを認識するfile_pathstart_pageend_pagelanguagedpiOCRで抽出したテキスト
read_pdf_imagesPDFページから画像を抽出します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 ライセンスに基づいてライセンスされています。
商用利用の場合は、元の出典を明記してください。


-
security - not tested
F
license - not found
-
quality - not tested

通常の解析または OCR を使用してテキストを抽出し、Web デバッガーが組み込まれた MCP プロトコルを介して PDF ファイルから画像を取得する PDF 処理サーバー。

  1. 🚀 機能
    1. 📂 プロジェクト構造
      1. ⚙️ インストール
        1. 🔦 サーバーを起動する
          1. 🌐 Webデバッグインターフェース
            1. 🛠️ APIツールリスト
              1. 📝 使用例
                1. 📢 注意事項
                  1. 📜 ライセンス

                    Related MCP Servers

                    • A
                      security
                      F
                      license
                      A
                      quality
                      An MCP server for converting Markdown documents to PDF files.
                      Last updated -
                      1
                      1
                      JavaScript
                    • -
                      security
                      F
                      license
                      -
                      quality
                      Provides tools for reading and extracting text from PDF files, supporting both local files and URLs.
                      Last updated -
                      3
                      Python
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A server providing PDF form manipulation tools via MCP's API, allowing users to find PDFs across directories, extract form field information, and visualize form fields in documents.
                      Last updated -
                      Python
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A Model Context Protocol server that converts PDF documents into PNG images through a simple MCP tool call.
                      Last updated -
                      1
                      2
                      Python
                      • Apple
                      • Linux

                    View all related MCP servers

                    ID: i94bnr2e9s