PDF Agent MCPのロゴ

PDF Agent MCP

コミュニティ
vlad-ds

PDF Agent MCP Server for document processing and analysis

公開者vlad-ds
リポジトリpdf-agent-mcp
言語JavaScript
フォーク
4
スター
15
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    PDF Agent MCPは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには15件のスターと4件のフォークがあります。

PDF Agent MCP

🌐 Visit the Landing Page for an overview and easy download

⚠️ Important Setup Instructions

Before using this extension, you MUST configure Claude Desktop properly:

Required Configuration

  1. Install Node.js LTS: Visit nodejs.org and download the LTS version
  2. Configure Claude Desktop:
    • Go to Claude > Settings > Extensions > Advanced Settings
    • Disable "Use Built-in Node.js for MCP"
    • Restart Claude Desktop

This extension will NOT work with Claude's built-in Node.js. You must use your system's Node.js installation.

Troubleshooting

If you experience issues loading the extension:

  1. Verify Node.js is installed: Run node --version in your terminal
  2. Ensure "Use Built-in Node.js for MCP" is disabled in Claude Desktop settings
  3. Restart Claude Desktop completely
  4. Check the logs at ~/Library/Logs/Claude/mcp-server-PDF Agent MCP.log (macOS) or %LOCALAPPDATA%\Claude\Logs\mcp-server-PDF Agent MCP.log (Windows)

A Model Context Protocol server designed for agentic reading and selective PDF processing. Enables AI systems to efficiently navigate and extract content from PDFs without overwhelming context windows.

Features

  • Metadata Extraction: Get PDF properties, page count, and file information
  • Text Extraction: Native text extraction with hybrid processing for better results
  • Image Conversion: Convert PDF pages to optimized images for visual analysis
  • Content Search: Pattern/regex search with context snippets
  • Table of Contents: Extract bookmarks and document outline
  • Flexible Path Support: Use absolute paths or relative paths from ~/pdf-agent/

Usage Guide

PDF Agent MCP solves the common problem of context window overflow when working with PDFs in AI tools.

Important: Do not drag PDFs into the chat - this will load the entire PDF content traditionally and bypass the intelligent processing. Instead, provide file paths or URLs to activate the PDF Agent tools for selective processing.

How to Use

For Local PDFs:

  • Provide the absolute file path to your PDF
  • Quick tip: Right-click your PDF → "Open with Chrome" → copy the address bar URL for the absolute path

For Online PDFs:

  • Simply provide the PDF URL - the agent will download and process it locally

Key Benefits

  • Selective Reading: The AI first examines metadata and outline, then opens only relevant pages
  • Token Efficiency: Avoids images when possible, uses them only when necessary for visual analysis
  • Scalable: Works with large documents (1000+ page textbooks) and multiple PDFs simultaneously
  • Search Capability: Built-in pattern/regex search across PDF content

Approach

This MCP uses agentic search with simple tools rather than complex alternatives:

  • No embedding creation, chunking, or vector storage required
  • No multi-agent coordination or handoff complexity
  • Just clean, effective tools that modern AI systems can use intelligently

Perfect for researchers, students, and professionals working with extensive PDF libraries.

AI Assistant Prompt for Optimal Usage

Copy this prompt into your AI assistant's custom instructions or context for best results:

When working with PDFs using the PDF Agent MCP tools, follow this strategic approach:

### 1. Query Analysis & PDF Identification
- **Think carefully** about the user's search query and information needs
- **Identify which PDF(s)** are most likely to contain the answer
- Consider the document type, domain, and likely structure based on the query

### 2. Exploratory Phase (Always Start Here)
- **Get metadata** first using `get_pdf_metadata` to understand document size, creation date, and properties
- **Extract table of contents** with `get_pdf_outline` to understand document structure and navigation
- **Analyze the outline** to identify which sections are most relevant to the query

### 3. Strategic Content Extraction
Based on the outline and metadata:
- **Use page ranges** (`"5:10"`, `"20:"`) to focus on specific sections rather than entire documents
- **Extract images** with `get_pdf_images` when visual content is critical (charts, diagrams, tables, equations)
- **Choose text extraction strategy**: `hybrid` (default) for most cases, `native` for clean PDFs, `ocr` for scanned documents

### 4. Advanced Search Strategies
- **Use multiple search queries** with different keywords and synonyms
- **Apply regex patterns** for flexible matching: `/budget|cost|expense/gi` instead of single terms
- **Combine searches**: Start broad, then narrow down with specific terms
- **Use context characters** (150+ chars) to understand search result context
- **Implement early stopping** with `max_results` for large documents

### 5. Iterative Refinement
- **Start with targeted searches** based on outline analysis
- **Follow up with broader searches** if initial queries don't yield results
- **Extract specific page ranges** identified through search results
- **Use visual analysis** (images) when text extraction seems incomplete or when layout matters

### 6. Performance Optimization
- **Avoid processing entire large PDFs** - always use page ranges when possible
- **Use search with early stopping** before extracting large sections
- **Prefer search over full text extraction** for finding specific information
- **Extract images selectively** only when visual analysis is needed

### 7. Multi-Document Workflows
- **Process documents in parallel** when comparing multiple PDFs
- **Use consistent search terms** across documents for comparison
- **Combine results strategically** rather than processing everything at once

### Key Principles:
- **Strategic before comprehensive**: Understand document structure before diving deep
- **Search before extract**: Use pattern matching to locate relevant content first  
- **Visual when necessary**: Extract images only when text extraction is insufficient
- **Iterative refinement**: Start targeted, expand scope as needed
- **Context preservation**: Always maintain enough context around search results

This approach maximizes efficiency, minimizes token usage, and provides more accurate, focused results than traditional "dump entire PDF" methods.

Installation

Option 1: DXT Package (Recommended)

  1. First, ensure you have completed the Required Configuration above
  2. Download the latest pdf-agent-mcp.dxt file from the releases
  3. Double-click the .dxt file to install it in Claude Desktop

Option 2: Manual Installation

  1. First, ensure you have completed the Required Configuration above
  2. Clone this repository
  3. Build the project: npm install && npm run build
  4. Find your Claude Desktop config file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following:

json
{
  "mcpServers": {
    "pdf-agent": {
      "command": "node",
      "args": [
        "PATH_TO_REPO/server/index.js"
      ]
    }
  }
}

Replace PATH_TO_REPO with the actual path to your cloned repository.

Development

bash
# Install dependencies
npm install

# Build the project
npm run build

# Create DXT package
npm run build:dxt

# Pack the final .dxt file for distribution
dxt pack

Viewing Logs

To debug issues, you can view the MCP server logs:

bash
# View logs (macOS)
open "$HOME/Library/Logs/Claude/mcp-server-PDF Agent MCP.log"

# Stream logs in real-time (macOS)
tail -f "$HOME/Library/Logs/Claude/mcp-server-PDF Agent MCP.log"

# Clear/delete logs (macOS)
rm "$HOME/Library/Logs/Claude/mcp-server-PDF Agent MCP.log"

# View logs (Windows)
notepad "%LOCALAPPDATA%\Claude\Logs\mcp-server-PDF Agent MCP.log"

# Clear/delete logs (Windows)
del "%LOCALAPPDATA%\Claude\Logs\mcp-server-PDF Agent MCP.log"

License

MIT

PDF Agent MCPのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度PDF Agent MCPに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

PDF Agent MCPをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. PDF Agent MCPのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "pdf-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてPDF Agent MCPのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. PDF Agent MCPのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
PDF Agent MCPを使ってこのタスクを手伝ってもらえますか?
PDF Agent MCP
はい、読みました。
PDF Agent MCPで調べた結果をお伝えします。

よくある質問

PDF Agent MCP MCPサーバーは何に使いますか?

PDF Agent MCPは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでPDF Agent MCP MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでPDF Agent MCPを利用できます。

TypingMindでPDF Agent MCP MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。PDF Agent MCPを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

PDF Agent MCP MCPをTypingMindに接続するにはどうすればよいですか?

PDF Agent MCPはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでPDF Agent MCP MCPのどのようなツールを利用できますか?

PDF Agent MCPはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

PDF Agent MCP MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。PDF Agent MCPで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇