PDF Splitter

by espresso3389

Not rated
GitHub

About

Provides random access to PDF contents, allowing selective extraction of pages and content to reduce reading costs.

Details

Author
espresso3389
Categories
File Management, Other

Install Bun (required for all installation methods):

# Linux/macOS curl -fsSL https://bun.sh/install | bash # Windows powershell -c "irm bun.sh/install.ps1 | iex"
bunx espresso3389/pdf-splitter-mcp install claudecode
bunx espresso3389/pdf-splitter-mcp install geminicli

That's it! The installer will automatically configure everything for you.

Becausebunxcaches the downloaded package under your temporary directory, if you want to upgrade the package forcibly, you should delete the cache by yourself beforebunx:

# Linux/macOS rm -rf /tmp/bunx--@espresso3389/pdf-splitter-mcp # Windows powershell -c "rm -Recurse -Force $env:TEMP/bunx--@espresso3389/pdf-splitter-mcp"
# Clone or download this project to your computer # Then navigate to the project directory cd /path/to/pdf-splitter-mcp bun install
claude mcp add pdf-splitter -- bun run /full/path/to/pdf-splitter-mcp/src/index.ts
{ "mcpServers": { "pdf-splitter": { "command": "bun", "args": ["run", "/full/path/to/pdf-splitter-mcp/src/index.ts"] } } }
You: Load the PDF at /Users/me/documents/report.pdf AI: [uses load_pdf tool] PDF loaded! ID: abc123, 50 pages You: Show me page 10 AI: [uses extract_page tool] Here's page 10 content... You: Search for "revenue" in the PDF AI: [uses search_pdf tool] Found "revenue" on pages 3, 10, and 25... You: Search for email addresses using regex AI: [uses search_pdf tool with regex] Found matches for pattern "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b" on pages 5, 12... You: Render page 10 as a high-quality image AI: [uses render_page tool with dpi=300] Here's page 10 rendered at 300 DPI as a PNG image... You: Create thumbnails of all pages AI: [uses render_pages tool with dpi=72] Generated thumbnails for all 50 pages... You: Save page 10 as a high-quality image to /tmp/page10.png AI: [uses render_page tool with dpi=300 and outputPath="/tmp/page10.png"] Page 10 rendered and saved to: /tmp/page10.png You: Extract all images from the PDF and save them to /tmp/images/ AI: [uses extract_images tool with outputPath="/tmp/images/page_{page}_img_{index}.png"] Saved 15 images. First image saved to: /tmp/images/page_1_img_0.png

- Load PDF: Load PDF files from local filesystem or URLs into memory
- Extract Page: Extract text content from specific pages
- Extract Range: Extract text from a range of pages
- Search PDF: Search for text within the PDF (supports plain text and regular expressions, case-sensitive or case-insensitive)
- Get PDF Info: Retrieve metadata and information about the loaded PDF
- List Loaded PDFs: View all currently loaded PDFs
- Extract Outline: Extract document outline/table of contents with page numbers
- List Images: List all images in the PDF with metadata (page, dimensions, format)
- Extract Images: Extract images as base64-encoded data (PNG/JPEG)
- Extract Image: Extract a specific image by page and index
- Render Page: Render a PDF page as an image at any DPI (PNG/JPEG)
- Render Pages: Render multiple PDF pages as images with batch processing

The PDF Splitter MCP provides several useful commands:

# Show help and usage bunx @espresso3389/pdf-splitter-mcp # Install for Claude Code bunx @espresso3389/pdf-splitter-mcp install claudecode # Install for Gemini CLI bunx @espresso3389/pdf-splitter-mcp install geminicli # Run the MCP server directly bunx @espresso3389/pdf-splitter-mcp serve

- Load a PDF file into memory (supports URLs)
- Parameters:path(string - local path or URL)
- Returns: PDF ID and page count

- Extract content from a specific page
- Parameters:pdfId(string),pageNumber(number, 1-indexed)
- Returns: Page content as text

- Extract content from a range of pages
- Parameters:pdfId(string),startPage(number),endPage(number)
- Returns: Combined content from the page range

- Search for text within the PDF
- Parameters:pdfId(string),query(string),caseSensitive(boolean, optional)
- Returns: Search results with page numbers and context

- Get metadata about a loaded PDF
- Parameters:pdfId(string)
- Returns: PDF information including metadata

- List all currently loaded PDFs
- Returns: Array of loaded PDFs with their IDs and page counts

- Extract document outline/TOC with page numbers
- Parameters:pdfId(string)
- Returns: Formatted outline with page references

- List all images in the PDF with metadata
- Parameters:pdfId(string)
- Returns: Array of image information (page, index, dimensions, format)

- Extract images from the PDF as base64-encoded data
- Parameters:

- pdfId(string)
- pageNumbers(array of numbers, optional)
- dpi(number, optional, default: 96)
- outputPath(string, optional - save images to files instead of returning base64)

- Extract a specific image from the PDF
- Parameters:

- pdfId(string)
- pageNumber(number)
- imageIndex(number)
- dpi(number, optional, default: 96)
- outputPath(string, optional - save image to file instead of returning base64)

- Render a PDF page as an image at specified DPI
- Parameters:

- pdfId(string)
- pageNumber(number, 1-indexed)
- dpi(number, optional, default: 96)
- format(string, optional, "png" or "jpeg", default: "png")
- outputPath(string, optional - save image to file instead of returning base64)

- Render multiple PDF pages as images
- Parameters:

- pdfId(string)
- pageNumbers(array of numbers, optional - renders all pages if not provided)
- dpi(number, optional, default: 96)
- format(string, optional, "png" or "jpeg", default: "png")
- outputPath(string, optional - save images to files instead of returning base64)

Add this to your MCP client configuration:

{ "mcpServers": { "pdf-splitter": { "command": "bun", "args": ["run", "/path/to/pdf-splitter-mcp/src/index.ts"] } } }
# Run in development mode with hot reload bun run dev # Build for production bun run build # Run production build bun run start

- Reduced Token Usage: Only extract the pages you need instead of processing entire PDFs
- Faster Processing: Random access to specific sections without sequential reading
- Memory Efficient: PDFs are parsed once and kept in memory for quick access
- Search Capability: Find specific content across large documents quickly
- Visual Processing: Render pages as images for OCR, visual analysis, or thumbnail generation
- Flexible Output: Support for different DPI settings and image formats (PNG/JPEG)

- Extract specific pages or sections for detailed analysis
- Search for patterns, keywords, or data across large documents
- Extract tables of contents and navigate complex documents

- Extract embedded images from PDFs for separate processing
- Render pages as high-quality images for OCR or visual analysis
- Create thumbnail previews of PDF pages
- Convert PDF pages to images for web display

- Process technical papers and extract specific sections
- Search for citations, formulas, or specific terms
- Extract figures and diagrams from research papers

- Batch process multiple PDFs programmatically
- Extract data from standardized forms or reports
- Generate image previews for document management systems

A server for processing PDF files, allowing text and table extraction, metadata retrieval, and file listing within a specific directory.

Fill existing PDF forms from JSON, Excel, or CSV with reviewed field mappings via MCP.

Local-first PDF engine for AI agents. Zero-dep TypeScript, PDF/A, signatures, 800+ pages/sec.

Read text, metadata, and page count from PDF files securely within the project context.

A server for manipulating PDF files, including merging, page extraction, and searching.

An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.

A server providing comprehensive file system operations, automatically downloaded and built on first use.

A simple utility to combine multiple files into a single file.

Filesystem MCP server for secure file operations inside configured directories, including reading, writing, listing, and project navigation.

Provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.

A Model Context Protocol (MCP) server that provides random access to PDF contents, reducing total reading costs by allowing selective extraction of pages and content.

Install Bun (required for all installation methods):

# Linux/macOS curl -fsSL https://bun.sh/install | bash # Windows powershell -c "irm bun.sh/install.ps1 | iex"
bunx espresso3389/pdf-splitter-mcp install claudecode
bunx espresso3389/pdf-splitter-mcp install geminicli

That's it! The installer will automatically configure everything for you.

Becausebunxcaches the downloaded package under your temporary directory, if you want to upgrade the package forcibly, you should delete the cache by yourself beforebunx:

# Linux/macOS rm -rf /tmp/bunx--@espresso3389/pdf-splitter-mcp # Windows powershell -c "rm -Recurse -Force $env:TEMP/bunx--@espresso3389/pdf-splitter-mcp"
# Clone or download this project to your computer # Then navigate to the project directory cd /path/to/pdf-splitter-mcp bun install
claude mcp add pdf-splitter -- bun run /full/path/to/pdf-splitter-mcp/src/index.ts
{ "mcpServers": { "pdf-splitter": { "command": "bun", "args": ["run", "/full/path/to/pdf-splitter-mcp/src/index.ts"] } } }
You: Load the PDF at /Users/me/documents/report.pdf AI: [uses load_pdf tool] PDF loaded! ID: abc123, 50 pages You: Show me page 10 AI: [uses extract_page tool] Here's page 10 content... You: Search for "revenue" in the PDF AI: [uses search_pdf tool] Found "revenue" on pages 3, 10, and 25... You: Search for email addresses using regex AI: [uses search_pdf tool with regex] Found matches for pattern "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b" on pages 5, 12... You: Render page 10 as a high-quality image AI: [uses render_page tool with dpi=300] Here's page 10 rendered at 300 DPI as a PNG image... You: Create thumbnails of all pages AI: [uses render_pages tool with dpi=72] Generated thumbnails for all 50 pages... You: Save page 10 as a high-quality image to /tmp/page10.png AI: [uses render_page tool with dpi=300 and outputPath="/tmp/page10.png"] Page 10 rendered and saved to: /tmp/page10.png You: Extract all images from the PDF and save them to /tmp/images/ AI: [uses extract_images tool with outputPath="/tmp/images/page_{page}_img_{index}.png"] Saved 15 images. First image saved to: /tmp/images/page_1_img_0.png

- Load PDF: Load PDF files from local filesystem or URLs into memory
- Extract Page: Extract text content from specific pages
- Extract Range: Extract text from a range of pages
- Search PDF: Search for text within the PDF (supports plain text and regular expressions, case-sensitive or case-insensitive)
- Get PDF Info: Retrieve metadata and information about the loaded PDF
- List Loaded PDFs: View all currently loaded PDFs
- Extract Outline: Extract document outline/table of contents with page numbers
- List Images: List all images in the PDF with metadata (page, dimensions, format)
- Extract Images: Extract images as base64-encoded data (PNG/JPEG)
- Extract Image: Extract a specific image by page and index
- Render Page: Render a PDF page as an image at any DPI (PNG/JPEG)
- Render Pages: Render multiple PDF pages as images with batch processing

The PDF Splitter MCP provides several useful commands:

# Show help and usage bunx @espresso3389/pdf-splitter-mcp # Install for Claude Code bunx @espresso3389/pdf-splitter-mcp install claudecode # Install for Gemini CLI bunx @espresso3389/pdf-splitter-mcp install geminicli # Run the MCP server directly bunx @espresso3389/pdf-splitter-mcp serve

- Load a PDF file into memory (supports URLs)
- Parameters:path(string - local path or URL)
- Returns: PDF ID and page count

- Extract content from a specific page
- Parameters:pdfId(string),pageNumber(number, 1-indexed)
- Returns: Page content as text

- Extract content from a range of pages
- Parameters:pdfId(string),startPage(number),endPage(number)
- Returns: Combined content from the page range

- Search for text within the PDF
- Parameters:pdfId(string),query(string),caseSensitive(boolean, optional)
- Returns: Search results with page numbers and context

- Get metadata about a loaded PDF
- Parameters:pdfId(string)
- Returns: PDF information including metadata

- List all currently loaded PDFs
- Returns: Array of loaded PDFs with their IDs and page counts

- Extract document outline/TOC with page numbers
- Parameters:pdfId(string)
- Returns: Formatted outline with page references

- List all images in the PDF with metadata
- Parameters:pdfId(string)
- Returns: Array of image information (page, index, dimensions, format)

- Extract images from the PDF as base64-encoded data
- Parameters:

- pdfId(string)
- pageNumbers(array of numbers, optional)
- dpi(number, optional, default: 96)
- outputPath(string, optional - save images to files instead of returning base64)

- Extract a specific image from the PDF
- Parameters:

- pdfId(string)
- pageNumber(number)
- imageIndex(number)
- dpi(number, optional, default: 96)
- outputPath(string, optional - save image to file instead of returning base64)

- Render a PDF page as an image at specified DPI
- Parameters:

- pdfId(string)
- pageNumber(number, 1-indexed)
- dpi(number, optional, default: 96)
- format(string, optional, "png" or "jpeg", default: "png")
- outputPath(string, optional - save image to file instead of returning base64)

- Render multiple PDF pages as images
- Parameters:

- pdfId(string)
- pageNumbers(array of numbers, optional - renders all pages if not provided)
- dpi(number, optional, default: 96)
- format(string, optional, "png" or "jpeg", default: "png")
- outputPath(string, optional - save images to files instead of returning base64)

Add this to your MCP client configuration:

{ "mcpServers": { "pdf-splitter": { "command": "bun", "args": ["run", "/path/to/pdf-splitter-mcp/src/index.ts"] } } }
# Run in development mode with hot reload bun run dev # Build for production bun run build # Run production build bun run start

- Reduced Token Usage: Only extract the pages you need instead of processing entire PDFs
- Faster Processing: Random access to specific sections without sequential reading
- Memory Efficient: PDFs are parsed once and kept in memory for quick access
- Search Capability: Find specific content across large documents quickly
- Visual Processing: Render pages as images for OCR, visual analysis, or thumbnail generation
- Flexible Output: Support for different DPI settings and image formats (PNG/JPEG)

- Extract specific pages or sections for detailed analysis
- Search for patterns, keywords, or data across large documents
- Extract tables of contents and navigate complex documents

- Extract embedded images from PDFs for separate processing
- Render pages as high-quality images for OCR or visual analysis
- Create thumbnail previews of PDF pages
- Convert PDF pages to images for web display

- Process technical papers and extract specific sections
- Search for citations, formulas, or specific terms
- Extract figures and diagrams from research papers

- Batch process multiple PDFs programmatically
- Extract data from standardized forms or reports
- Generate image previews for document management systems

A server for processing PDF files, allowing text and table extraction, metadata retrieval, and file listing within a specific directory.

Fill existing PDF forms from JSON, Excel, or CSV with reviewed field mappings via MCP.

Local-first PDF engine for AI agents. Zero-dep TypeScript, PDF/A, signatures, 800+ pages/sec.

Read text, metadata, and page count from PDF files securely within the project context.

A server for manipulating PDF files, including merging, page extraction, and searching.

An MCP server for viewing, editing, and creating text files, based on the Claude built-in text editor tool.

A server providing comprehensive file system operations, automatically downloaded and built on first use.

A simple utility to combine multiple files into a single file.

Filesystem MCP server for secure file operations inside configured directories, including reading, writing, listing, and project navigation.

Provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.