PDF Reader

PDF Reader

sylphxltd

Extracts text, metadata, and images from PDF files, supporting both local files and remote URLs. Processes multiple PDFs with parallel processing and natural reading order based on Y-coordinates.

Securely extracts text, metadata, and page information from PDF files within a project directory using pdfjs-dist for both local files and remote URLs.

5422,439 views57Local (stdio)

What it does

  • Extract text from PDF pages
  • Read PDF metadata and document info
  • Process remote PDFs via URLs
  • Extract specific page ranges
  • Retrieve images from PDFs
  • Handle multiple PDFs simultaneously

Best for

AI agents processing document workflowsContent analysis and extraction pipelinesDocument automation systemsResearch and data mining from PDFs
5-10x faster parallel processingY-coordinate based natural orderingWorks with local files and URLs

About PDF Reader

PDF Reader is a community-built MCP server published by sylphxltd that provides AI assistants with tools and capabilities via the Model Context Protocol. Securely extract text, metadata, & pages from PDFs using Adobe Acrobat PDF editor software for local & remote files. It is categorized under file systems, analytics data. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.

How to install

You can install PDF Reader in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

PDF Reader is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (1)

read_pdf

Reads content/metadata from one or more PDFs (local/URL). Each source can specify pages to extract.

πŸ“„ @sylphx/pdf-reader-mcp

Production-ready PDF processing server for AI agents

npm version License CI/CD codecov coverage TypeScript Downloads

5-10x faster parallel processing β€’ Y-coordinate content ordering β€’ 94%+ test coverage β€’ 103 tests passing

Security Validated

πŸš€ Overview

PDF Reader MCP is a production-ready Model Context Protocol server that empowers AI agents with enterprise-grade PDF processing capabilities. Extract text, images, and metadata with unmatched performance and reliability.

The Problem:

// Traditional PDF processing
- Sequential page processing (slow)
- No natural content ordering
- Complex path handling
- Poor error isolation

The Solution:

// PDF Reader MCP
- 5-10x faster parallel processing ⚑
- Y-coordinate based ordering πŸ“
- Flexible path support (absolute/relative) 🎯
- Per-page error resilience πŸ›‘οΈ
- 94%+ test coverage βœ…

Result: Production-ready PDF processing that scales.


⚑ Key Features

Performance

  • πŸš€ 5-10x faster than sequential with automatic parallelization
  • ⚑ 12,933 ops/sec error handling, 5,575 ops/sec text extraction
  • πŸ’¨ Process 50-page PDFs in seconds with multi-core utilization
  • πŸ“¦ Lightweight with minimal dependencies

Developer Experience

  • 🎯 Path Flexibility - Absolute & relative paths, Windows/Unix support (v1.3.0)
  • πŸ–ΌοΈ Smart Ordering - Y-coordinate based content preserves document layout
  • πŸ›‘οΈ Type Safe - Full TypeScript with strict mode enabled
  • πŸ“š Battle-tested - 103 tests, 94%+ coverage, 98%+ function coverage
  • 🎨 Simple API - Single tool handles all operations elegantly

πŸ“Š Performance Benchmarks

Real-world performance from production testing:

OperationOps/secPerformanceUse Case
Error handling12,933⚑⚑⚑⚑⚑Validation & safety
Extract full text5,575⚑⚑⚑⚑Document analysis
Extract page5,329⚑⚑⚑⚑Single page ops
Multiple pages5,242⚑⚑⚑⚑Batch processing
Metadata only4,912⚑⚑⚑Quick inspection

Parallel Processing Speedup

DocumentSequentialParallelSpeedup
10-page PDF~2s~0.3s5-8x faster
50-page PDF~10s~1s10x faster
100+ pages~20s~2sLinear scaling with CPU cores

Benchmarks vary based on PDF complexity and system resources.


πŸ“¦ Installation

Claude Code

claude mcp add pdf-reader -- npx @sylphx/pdf-reader-mcp

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "npx",
      "args": ["@sylphx/pdf-reader-mcp"]
    }
  }
}
πŸ“ Config file locations
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

VS Code

code --add-mcp '{"name":"pdf-reader","command":"npx","args":["@sylphx/pdf-reader-mcp"]}'

Cursor

  1. Open Settings β†’ MCP β†’ Add new MCP Server
  2. Select Command type
  3. Enter: npx @sylphx/pdf-reader-mcp

Windsurf

Add to your Windsurf MCP config:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "npx",
      "args": ["@sylphx/pdf-reader-mcp"]
    }
  }
}

Cline

Add to Cline's MCP settings:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "npx",
      "args": ["@sylphx/pdf-reader-mcp"]
    }
  }
}

Warp

  1. Go to Settings β†’ AI β†’ Manage MCP Servers β†’ Add
  2. Command: npx, Args: @sylphx/pdf-reader-mcp

Smithery (One-click)

npx -y @smithery/cli install @sylphx/pdf-reader-mcp --client claude

Manual Installation

# Quick start - zero installation
npx @sylphx/pdf-reader-mcp

# Or install globally
npm install -g @sylphx/pdf-reader-mcp

🎯 Quick Start

Basic Usage

{
  "sources": [{
    "path": "documents/report.pdf"
  }],
  "include_full_text": true,
  "include_metadata": true,
  "include_page_count": true
}

Result:

  • βœ… Full text content extracted
  • βœ… PDF metadata (author, title, dates)
  • βœ… Total page count
  • βœ… Structural sharing - unchanged parts preserved

Extract Specific Pages

{
  "sources": [{
    "path": "documents/manual.pdf",
    "pages": "1-5,10,15-20"
  }],
  "include_full_text": true
}

Absolute Paths (v1.3.0+)

// Windows - Both formats work!
{
  "sources": [{
    "path": "C:\\Users\\John\\Documents\\report.pdf"
  }],
  "include_full_text": true
}

// Unix/Mac
{
  "sources": [{
    "path": "/home/user/documents/contract.pdf"
  }],
  "include_full_text": true
}

No more "Absolute paths are not allowed" errors!

Extract Images with Natural Ordering

{
  "sources": [{
    "path": "presentation.pdf",
    "pages": [1, 2, 3]
  }],
  "include_images": true,
  "include_full_text": true
}

Response includes:

  • Text and images in exact document order (Y-coordinate sorted)
  • Base64-encoded images with metadata (width, height, format)
  • Natural reading flow preserved for AI comprehension

Batch Processing

{
  "sources": [
    { "path": "C:\\Reports\\Q1.pdf", "pages": "1-10" },
    { "path": "/home/user/Q2.pdf", "pages": "1-10" },
    { "url": "https://example.com/Q3.pdf" }
  ],
  "include_full_text": true
}

⚑ All PDFs processed in parallel automatically!


✨ Features

Core Capabilities

  • βœ… Text Extraction - Full document or specific pages with intelligent parsing
  • βœ… Image Extraction - Base64-encoded with complete metadata (width, height, format)
  • βœ… Content Ordering - Y-coordinate based layout preservation for natural reading flow
  • βœ… Metadata Extraction - Author, title, creation date, and custom properties
  • βœ… Page Counting - Fast enumeration without loading full content
  • βœ… Dual Sources - Local files (absolute or relative paths) and HTTP/HTTPS URLs
  • βœ… Batch Processing - Multiple PDFs processed concurrently

Advanced Features

  • ⚑ 5-10x Performance - Parallel page processing with Promise.all
  • 🎯 Smart Pagination - Extract ranges like "1-5,10-15,20"
  • πŸ–ΌοΈ Multi-Format Images - RGB, RGBA, Grayscale with automatic detection
  • πŸ›‘οΈ Path Flexibility - Windows, Unix, and relative paths all supported (v1.3.0)
  • πŸ” Error Resilience - Per-page error isolation with detailed messages
  • πŸ“ Large File Support - Efficient streaming and memory management
  • πŸ“ Type Safe - Full TypeScript with strict mode enabled

πŸ†• What's New in v1.3.0

πŸŽ‰ Absolute Paths Now Supported!

// βœ… Windows
{ "path": "C:\\Users\\John\\Documents\\report.pdf" }
{ "path": "C:/Users/John/Documents/report.pdf" }

// βœ… Unix/Mac
{ "path": "/home/john/documents/report.pdf" }
{ "path": "/Users/john/Documents/report.pdf" }

// βœ… Relative (still works)
{ "path": "documents/report.pdf" }

Other Improvements:

  • πŸ› Fixed Zod validation error handling
  • πŸ“¦ Updated all dependencies to latest versions
  • βœ… 103 tests passing, 94%+ coverage maintained
πŸ“‹ View Full Changelog

v1.2.0 - Content Ordering

  • Y-coordinate based text and image ordering
  • Natural reading flow for AI models
  • Intelligent line grouping

v1.1.0 - Image Extraction & Performance

  • Base64-encoded image extraction
  • 10x speedup with parallel processing
  • Comprehensive test coverage (94%+)

View Full Changelog β†’


πŸ“– API Reference

read_pdf Tool

The single tool that handles all PDF operations.

Parameters

ParameterTypeDescriptionDefault
sourcesArrayList of PDF sources to processRequired
include_full_textbooleanExtract full text contentfalse
include_metadatabooleanExtract PDF metadatatrue
include_page_countbooleanInclude total page counttrue
include_imagesbooleanExtract embedded imagesfalse

Source Object

{
  path?: string;        // Local file path (absolute or relative)
  url?: string;         // HTTP/HTTPS URL to PDF
  pages?: string | number[];  // Pages to extract: "1-5,10" or [1,2,3]
}

Examples

Metadata only (fast):

{
  "sources": [{ "path": "large.pdf" }],
  "include_metadata": true,
  "include_page_count": true,
  "include_full_text": false
}

From URL:

{
  "sources": [{
    "url": "https://arxiv.org/pdf/2301.00001.pdf"
  }],
  "include_full_text": true
}

Page ranges:

{

---

*README truncated. [View full README on GitHub](https://github.com/sylphxltd/pdf-reader-mcp).*

Alternatives

Related Skills

Browse all skills
google-gemini-file-search

Build document Q&A and searchable knowledge bases with Google Gemini File Search - fully managed RAG with automatic chunking, embeddings, and citations. Upload 100+ file formats (PDF, Word, Excel, code), configure semantic search, and query with natural language.Use when: building document Q&A systems, creating searchable knowledge bases, implementing semantic search without managing embeddings, indexing large document collections (100+ formats), or troubleshooting document immutability errors (delete+re-upload required), storage quota issues (3x input size for embeddings), chunking configuration (500 tokens/chunk recommended), metadata limits (20 key-value pairs max), indexing cost surprises ($0.15/1M tokens one-time), operation polling timeouts (wait for done: true), force delete errors, or model compatibility (Gemini 2.5 Pro/Flash only).

6
instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.

2
azure-storage-file-datalake-py

Azure Data Lake Storage Gen2 SDK for Python. Use for hierarchical file systems, big data analytics, and file/directory operations. Triggers: "data lake", "DataLakeServiceClient", "FileSystemClient", "ADLS Gen2", "hierarchical namespace".

0
markitdown

Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing. Use when converting documents to markdown, extracting text from PDFs/Office files, transcribing audio, performing OCR on images, extracting YouTube transcripts, or processing batches of files. Supports 20+ formats including DOCX, XLSX, PPTX, PDF, HTML, EPUB, CSV, JSON, images with OCR, and audio with transcription.

90
zotero

Manage Zotero reference libraries via the Web API. Search, list, add items by DOI/ISBN/PMID (with duplicate detection), delete/trash items, update metadata and tags, export in BibTeX/RIS/CSL-JSON, batch-add from files, check PDF attachments, cross-reference citations, find missing DOIs via CrossRef, and fetch open-access PDFs. Supports --json output for scripting. Use when the user asks about academic references, citation management, literature libraries, PDFs for papers, bibliography export, or Zotero specifically.

14
ai-multimodal

Process and generate multimedia content using Google Gemini API. Capabilities include analyze audio files (transcription with timestamps, summarization, speech understanding, music/sound analysis up to 9.5 hours), understand images (captioning, object detection, OCR, visual Q&A, segmentation), process videos (scene detection, Q&A, temporal analysis, YouTube URLs, up to 6 hours), extract from documents (PDF tables, forms, charts, diagrams, multi-page), generate images (text-to-image, editing, composition, refinement). Use when working with audio/video files, analyzing images or screenshots, processing PDF documents, extracting structured data from media, creating images from text prompts, or implementing multimodal AI features. Supports multiple models (Gemini 2.5/2.0) with context windows up to 2M tokens.

7