PDF Inspector MCP Server

PDF Inspector MCP Server

Inspects local PDF files, extracting text, counting pages, and performing OCR on scanned PDFs using standard libraries.

Category
Visit Server

README

PDF Inspector MCP Server

A lightweight, zero-configuration TypeScript MCP server that inspects local PDF files using standard, widely-adopted libraries.

Features

  • extract_text — Extracts raw embedded text from PDFs using pdf-parse.
  • count_pages — Returns the total number of pages in a PDF.
  • ocr_pdf — Renders PDF pages to images and performs OCR with tesseract.js for image-based (scanned) PDFs.

Dependencies

Package Purpose
@modelcontextprotocol/sdk Official MCP TypeScript SDK
pdf-parse Zero-config text extraction and page counting
pdfjs-dist PDF rendering engine (standard Mozilla library)
canvas Canvas implementation for Node.js rendering
tesseract.js Pure-JavaScript OCR (lightweight, no binary installs)
zod Schema validation for tool parameters

All dependencies install with a standard npm install and require no external binary setup beyond what npm provides.

Quick Start

npm install
npm run build
npm start

Or run directly with tsx during development:

npm run dev

Running with an MCP Client

The server communicates over stdio, the standard MCP transport. Use it with Claude Code, VS Code, Cursor, or any host that launches node dist/index.js.

Example claude_desktop_config.json snippet:

{
  "mcpServers": {
    "pdf-inspector": {
      "command": "node",
      "args": ["/absolute/path/to/pdf-inspector-mcp/dist/index.js"]
    }
  }
}

Tools

extract_text

Parameter Type Default Description
filePath string — Path to PDF
maxLength number 10000 Max characters to return

count_pages

Parameter Type Default Description
filePath string — Path to PDF

ocr_pdf

Parameter Type Default Description
filePath string — Path to PDF
pages number[] [] 1-based page numbers (empty = all)
language string "eng" Tesseract language code
scale number 2.0 Render scale (higher = sharper, slower)

Note: ocr_pdf uses pdfjs-dist to render each page to an image, then passes the PNG to tesseract.js. For multi-page PDFs this can take several seconds per page.

Zero-Config Design

  • No .env files or external services required.
  • pdf-parse handles text extraction with no setup.
  • tesseract.js bundles WASM and language data automatically.
  • pdfjs-dist uses the bundled pdf.worker.mjs file.
  • canvas relies on standard npm prebuilds.

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