Skip to main content
Glama
scrapinfo

PDF Inspector MCP Server

by scrapinfo

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.

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scrapinfo/pdf-inspector-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server