PDF MCP Server

PDF MCP Server

Enables processing and analysis of large PDF files through text extraction, search functionality, and intelligent chunking strategies. Provides comprehensive PDF operations including metadata retrieval, page-range text extraction, and content search with contextual results.

Category
Visit Server

README

PDF MCP Server

A Model Context Protocol (MCP) server for processing large PDF files with intelligent chunking and text extraction.

Features

  • PDF Metadata: Get file info, page count, author, title, etc.
  • Text Extraction: Extract text from specific page ranges with character limits
  • PDF Search: Search within PDFs with contextual results
  • Smart Chunking: Calculate optimal page ranges for processing large PDFs

Tools

1. pdf_get_metadata

Get metadata about a PDF file.

Parameters:

  • pdf_path (string, required): Full path to the PDF file

Returns:

  • File size, page count, title, author, and other metadata

2. pdf_extract_text

Extract text from a range of pages.

Parameters:

  • pdf_path (string, required): Full path to the PDF file
  • start_page (integer, optional): Starting page (1-indexed, default: 1)
  • end_page (integer, optional): Ending page (default: last page)
  • max_chars (integer, optional): Maximum characters to extract

Returns:

  • Extracted text with page markers
  • Character count and truncation info

3. pdf_search

Search for text within a PDF.

Parameters:

  • pdf_path (string, required): Full path to the PDF file
  • query (string, required): Text to search for (case-insensitive)
  • context_chars (integer, optional): Context characters around matches (default: 200)
  • max_results (integer, optional): Maximum results (default: 50)

Returns:

  • List of matches with page numbers and context

4. pdf_get_chunks

Calculate optimal chunking strategy for large PDFs.

Parameters:

  • pdf_path (string, required): Full path to the PDF file
  • max_chars_per_chunk (integer, optional): Target chunk size (default: 50000)
  • overlap_pages (integer, optional): Page overlap between chunks (default: 1)

Returns:

  • List of chunks with page ranges and estimated character counts

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Configure in Claude Code (see Configuration section)

Configuration

Add to your Claude Code MCP settings (%APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "pdf-processor": {
      "command": "python",
      "args": ["c:\\Users\\Will\\pdf-mcp-server\\server.py"]
    }
  }
}

After configuration, restart Claude Code to load the MCP server.

Usage Examples

Processing a 55MB PDF

  1. First, get metadata:
Use pdf_get_metadata to check the page count
  1. Calculate chunks:
Use pdf_get_chunks to determine optimal page ranges
  1. Extract text by chunk:
Use pdf_extract_text with the page ranges from step 2
  1. Search across the PDF:
Use pdf_search to find specific content

Technical Details

  • Uses pdfplumber for high-quality text extraction
  • Uses pypdf for metadata and PDF structure
  • Runs locally using your compute resources
  • No file size limits (processes in chunks)
  • Handles encrypted PDFs (if not password-protected)

Troubleshooting

Server not appearing in Claude Code:

  • Check that the path in config is correct
  • Restart Claude Code after configuration changes
  • Check Python is accessible from command line

Extraction issues:

  • Scanned PDFs may have poor text extraction (OCR not yet implemented)
  • Some PDFs may have unusual encoding

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured