# Sezzlee PDF MCP server

> Extract text from local PDF documents with optional pluggable OCR support in a read-only, sandboxed environment.

- Repository: https://github.com/sezzlee/mcp
- Page: https://hostedmcp.org/servers/sezzlee/pdf
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.1.2

## Install

### Claude Code

```sh
claude mcp add pdf -- npx -y @sezzlee/pdf-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "pdf": {
      "command": "npx",
      "args": [
        "-y",
        "@sezzlee/pdf-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "pdf": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sezzlee/pdf-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"pdf","type":"stdio","command":"npx","args":["-y","@sezzlee/pdf-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "pdf": {
      "command": "npx",
      "args": [
        "-y",
        "@sezzlee/pdf-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add pdf -- npx -y @sezzlee/pdf-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.pdf]
command = "npx"
args = ["-y", "@sezzlee/pdf-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user pdf npx -- -y @sezzlee/pdf-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "pdf": {
      "command": "npx",
      "args": [
        "-y",
        "@sezzlee/pdf-mcp"
      ]
    }
  }
}
```

## Tools (4)

- `list_documents`: List readable PDF documents under the server root. Returns filePath values that other tools accept verbatim. The listing never opens a file, so a listed path is a candidate, not a guarantee that the document parses. totalExact distinguishes a complete total; scanTruncated is separate from the result page limit. (read-only)
- `describe_document`: Summarise one PDF: page count, document type, which pages carry no trustworthy text, and what this server can do with it. pagesNeedingOcr is determined per page from the extracted text. documentType and classificationConfidence come from a separate document-level classifier: the confidence scores that verdict, NOT the accuracy of any extracted text, and the classifier reports a whole document as image-based when a single page is a scan. Calling this first is optional; read_pages and find_in_document work from filePath alone. (read-only)
- `read_pages`: Read selected pages as Markdown, one entry per page, with page numbers counted from 1. A page whose text the engine could not trust is returned with needsOcr true rather than omitted, so a scanned page is never presented as an empty one; empty distinguishes a genuinely blank page from an unreadable one. Each page reports source: text when the PDF's own text layer was used, ocr when a provider transcribed it. A page whose Markdown does not fit the response budget is clamped and marked truncatedMarkdown; nextCursor then resumes inside that page. With an explicit pages selection, nextCursor stays within the selected pages. (read-only)
- `find_in_document`: Find literal text in the extracted page text. The query is matched literally, never as a regular expression or a query language. Pages that need OCR carry no searchable text and are counted in unsearchablePages: when coverageComplete is false, an empty match list means the text was not found in the pages that could be read, NOT that it is absent from the document. Pass ocr to transcribe those pages first and search them too. Case-insensitive matching folds ASCII letters only. (read-only)

## FAQ

### Does this server connect to the internet?

No, the server is designed to be read-only and never reaches the network.

### How can I enable OCR functionality?

You can enable OCR by pointing the --ocr argument to a module that exports an OcrBinding.

### Is the OCR process automatic?

No, OCR is optional and must be explicitly requested on every call; it defaults to off.
