PDF Reader MCP Server

PDF Reader MCP Server

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.

Category
访问服务器

README

pdf-reader MCP server

An MCP server for reading PDFs

Components

Resources

The server provides academic-aware PDF resources with:

  • Custom file:// URI scheme for accessing individual PDFs
  • Academic structure detection and key section extraction
  • Metadata enriched with document type classification
  • Resources optimized for agent understanding

Academic Prompts

The server provides specialized academic analysis prompts:

  • summarize-academic-paper: Intelligent academic paper summarization
    • Required "file_path" argument for PDF location
    • Optional "focus" argument (general/methodology/results/implications)
    • Generates prompts with key sections, citations, and metadata
  • analyze-research-methodology: Deep methodology analysis
    • Required "file_path" argument for PDF location
    • Focuses on research design, data collection, and statistical methods

Enhanced Tools

Basic PDF Processing:

  • load-pdf: Load and cache a PDF file for processing
  • get-metadata: Get PDF metadata and document information
  • extract-images: Extract embedded images with metadata
  • render-page: Render PDF pages as high-resolution images

Academic Enhancements:

  • extract-academic-text: Text extraction with proper reading order and math formula preservation
  • detect-sections: Identify academic sections (Abstract, Introduction, Methods, Results, etc.)
  • extract-abstract: Specifically extract the abstract section
  • extract-key-sections: Get key sections optimized for agent understanding
  • extract-citations: Parse in-text citations and reference lists
  • chunk-content: Break content into agent-friendly semantic chunks
  • analyze-document-structure: Comprehensive academic document analysis

Configuration

This PDF reader MCP server provides comprehensive PDF processing capabilities including:

  • Full text extraction from any PDF
  • High-resolution image extraction
  • Table detection and extraction
  • Annotation and comment extraction
  • PDF metadata retrieval
  • Page rendering to images
  • Document structure analysis

Installation & Setup

Prerequisites

  • Python 3.13 or higher
  • uv package manager (install with pip install uv)

Install Dependencies

uv sync

IDE Integration

VSCode with MCP Extension

  1. Install the MCP VSCode Extension
  2. Open your VSCode settings (.vscode/settings.json) and add:
{
  "mcp.servers": {
    "pdf-reader": {
      "url": "http://localhost:8000/sse",
      "description": "PDF reader with full extraction capabilities"
    }
  }
}

WindSurf IDE

  1. Open WindSurf settings
  2. Navigate to Extensions → MCP Servers
  3. Add a new server configuration:
{
  "name": "pdf-reader",
  "url": "http://localhost:8000/sse",
  "description": "Comprehensive PDF processing server"
}

Cursor IDE

  1. Open Cursor settings (Cmd/Ctrl + ,)
  2. Search for "MCP" or navigate to Extensions → MCP
  3. Add server configuration:
{
  "mcpServers": {
    "pdf-reader": {
      "url": "http://localhost:8000/sse",
      "description": "PDF reader with text, image, and table extraction"
    }
  }
}

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "pdf-reader": {
      "url": "http://localhost:8000/sse",
      "description": "PDF reader with comprehensive extraction capabilities"
    }
  }
}

Starting the Server

Before using the PDF reader in any IDE, start the HTTP server:

# Navigate to the pdf-reader directory
cd /path/to/your/pdf-reader

# Start the server
uv run pdf-reader

The server will start on http://localhost:8000 with the MCP SSE endpoint available at /sse for all IDEs to connect to.

Usage Examples

Once configured in your IDE, you can use the PDF reader with natural language commands:

Basic PDF Processing

"Load the research paper at /path/to/paper.pdf and extract all the text"
"Get metadata for the PDF document at /documents/report.pdf"
"Extract all images from the PDF on page 3"

Advanced Analysis

"Summarize the PDF document in technical style focusing on methodology"
"Analyze the structure of this PDF and tell me about its organization"
"Extract all tables from the document and show me the data"

Visual Processing

"Render page 5 of the PDF as a high-resolution image"
"Extract all annotations and comments from this PDF"
"Show me all the images embedded in this document"

Available Tools

Tool Description Parameters
load-pdf Load and cache PDF file_path, optional name
extract-text Extract text content file_path, optional page
extract-images Extract embedded images file_path, optional page
get-metadata Get document metadata file_path
extract-tables Extract table data file_path, optional page
extract-annotations Extract comments/highlights file_path
render-page Render page as image file_path, page, optional dpi

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/cloudchase/Desktop/AverageJoesLab/mcp-servers/pdf-reader run pdf-reader

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选