mcpField
P
PDF Reader

PDF Reader

Local
github.com/XvvlnProductivity1Updated 20w ago

About PDF Reader

PDF Reader is a PDF reading and analysis server for MCP clients, extracting text, page images, tables, links, annotations, and metadata. It also supports search, text statistics, and page-text comparison.

Key features

  1. 01Extract text and page images
  2. 02Read outlines, links, and annotations
  3. 03Detect tables and extract images
  4. 04Search text with page context
  5. 05Get metadata and text statistics
  6. 06Compare text across pages

Use cases

  1. 01Find specific content in reports
  2. 02Inspect PDF pages and document properties
  3. 03Extract tables, images, and links
  4. 04Compare text between two pages

MCP support

It exposes PDF reading and analysis tools to compatible MCP clients, including extraction of text, images, tables, links, annotations, and metadata.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"xvvln-pdf-reader": {
"command": "uvx",
"args": [
"pdf-insight-mcp"
]
}
}
}
Run commanduvx pdf-insight-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypipdf-insight-mcp0.2.1

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

pdf-reader-mcp

一个用于读取和分析 PDF 文件的 MCP 服务器。它可以为支持 MCP(Model Context Protocol)的客户端提供 PDF 文本、页面图片、表格、链接、批注、目录、元数据和基础文本统计。

A PDF-focused MCP server for extracting text, rendered pages, tables, links, annotations, outlines, metadata, and text statistics from PDF files.

Package name

  • GitHub repository: pdf-reader-mcp
  • MCP Registry name: io.github.Xvvln/pdf-reader-mcp
  • PyPI package: pdf-insight-mcp
  • CLI commands: pdf-reader-mcp and pdf-insight-mcp

pdf-reader-mcp is the project name. The PyPI package is published as pdf-insight-mcp because the pdf-reader-mcp package name is not available on PyPI.

Features

ToolWhat it does
get_pdf_infoRead document metadata, page count, file size, and encryption status.
read_pdf_as_textExtract text from selected pages with page and character limits.
read_pdf_as_imagesRender selected pages as base64-encoded images.
get_pdf_outlineRead bookmarks and outline entries.
search_pdf_textSearch text and return per-match page context.
extract_pdf_tablesExtract structured tables when PyMuPDF can detect them.
extract_pdf_imagesExtract embedded PDF images.
get_pdf_page_infoInspect one page's size, text, images, links, and rotation.
extract_pdf_linksExtract external URLs and internal page jumps.
get_pdf_annotationsRead comments, highlights, and annotation metadata.
get_pdf_text_statsCompute text, line, paragraph, and scan-likelihood stats.
compare_pdf_pagesCompare text similarity between two pages.

Quick start

Install uv if you do not already have it:

curl -LsSf https://astral.sh/uv/install.sh | sh

Run the server directly from PyPI:

uvx pdf-insight-mcp

Or install it first:

python -m pip install pdf-insight-mcp
pdf-reader-mcp

MCP client configuration

Use the published PyPI package:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "uvx",
      "args": ["pdf-insight-mcp"]
    }
  }
}

Use a local checkout for development:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/pdf-reader-mcp",
        "run",
        "pdf-reader-mcp"
      ]
    }
  }
}

Replace /absolute/path/to/pdf-reader-mcp with the absolute path to this repository on your machine.

Common usage

Ask your MCP client to call tools with an absolute PDF path. Example requests:

Read /Users/me/Documents/report.pdf as text.
Search /Users/me/Documents/report.pdf for "baseline characteristics".
Render pages 1-3 of /Users/me/Documents/report.pdf as images.
Extract links and annotations from /Users/me/Documents/review.pdf.

For large PDFs, prefer small page ranges first. For scanned or layout-sensitive PDFs, use read_pdf_as_images with a small pages range and moderate dpi.

Limits and behavior

  • read_pdf_as_text defaults to at most 50 pages and 200000 returned characters.
  • read_pdf_as_images rejects requests above 20 pages.
  • read_pdf_as_images defaults to an overall image payload cap of about 20 MB.
  • extract_pdf_images returns at most 20 embedded images but reports the actual detected total.
  • Encrypted PDFs are rejected unless they are already accessible without a password.
  • Scanned PDFs may have little or no extractable text. Use image rendering or OCR outside this server when needed.

Development

Install dependencies:

uv sync --extra dev

Run tests:

uv run pytest -q

Build the package:

uv build
uvx twine check dist/*

Run the local server:

uv run pdf-reader-mcp

Release

Releases are published through GitHub Actions.

Before the first release, configure PyPI Trusted Publishing with:

PyPI project name: pdf-insight-mcp
Owner: Xvvln
Repository name: pdf-reader-mcp
Workflow filename: publish.yml
Environment name: leave empty

Then release by bumping versions in pyproject.toml and server.json, committing the change, and pushing a version tag:

git tag vX.Y.Z
git push origin main --tags

The Publish workflow runs tests, builds the Python package, publishes to PyPI, authenticates to the MCP Registry with GitHub OIDC, and publishes server.json.

Tech stack

  • Python 3.10+
  • MCP Python SDK
  • PyMuPDF
  • uv
  • pytest

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.