Skip to main content
Glama
jayluxferro

pdf-inspector-mcp

by jayluxferro
README.md
# pdf-inspector-mcp

MCP (Model Context Protocol) server wrapping the [pdf-inspector](https://github.com/firecrawl/pdf-inspector) Python library for AI-agent PDF processing.

## Install

```bash
uv pip install pdf-inspector-mcp
```

Or from source:

```bash
git clone https://github.com/jayluxferro/pdf-inspector-mcp.git
cd pdf-inspector-mcp
uv pip install -e .
```

## Usage

From a local clone:

```json
{
  "mcpServers": {
    "pdf-inspector": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "path/to/pdf-inspector-mcp",
        "pdf-inspector-mcp"
      ]
    }
  }
}
```

Or ephemerally with `uvx` (no clone needed):

```json
{
  "mcpServers": {
    "pdf-inspector": {
      "command": "uvx",
      "args": ["pdf-inspector-mcp"]
    }
  }
}
```

## Tools

| Tool | Description |
|---|---|
| `process_pdf` | Full pipeline: detect type + extract text + Markdown |
| `detect_pdf` | Fast detection only (PdfResult without Markdown) |
| `classify_pdf` | Lightweight classification (PdfClassification) |
| `extract_text` | Plain text extraction |
| `extract_text_with_positions` | Text with X/Y coordinates and font metadata |
| `extract_text_in_regions` | Text in bounding-box page regions |
| `extract_pages_markdown` | Per-page Markdown with layout info |

Every tool accepts either `path` (file path) or `data` (base64-encoded PDF bytes).

## Requirements

- Python ≥ 3.10
- [pdf-inspector](https://pypi.org/project/pdf-inspector/) (Rust core via PyO3)

TDQS

A3.6/5.0

Scored across 7 tools

Disambiguation2/5

detect_pdf and classify_pdf are nearly identical, both returning type, page count, and OCR pages, with only minor differences in speed/confidence. process_pdf also overlaps with all extraction tools, making tool boundaries unclear.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (e.g., process_pdf, extract_text, extract_pages_markdown). No mixed conventions or vague verbs.

Tool Count4/5

Seven tools is within a reasonable range, but the redundancy between detect_pdf and classify_pdf suggests the count could be trimmed. Still, it does not feel overwhelming.

Completeness4/5

The set covers detection, classification, plain text extraction, positioned text extraction, region-based extraction, and markdown conversion. Minor gaps like PDF metadata or OCR output are not critical to the inspection purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues