PDF Reader

io.github.Xvvln由 GitHub 帳號 Xvvln 發布v0.2.1更新於 Oct 24, 2026

MCP server for extracting text, images, tables, links, annotations, and metadata from PDF files.

已驗證STDIO僅桌面檔案與儲存資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理讀取 PDF 檔案:文字、頁面影像、表格、圖片、連結、註解、目錄與中繼資料。

可以做什麼
  • 讀取文件中繼資料、頁數、檔案大小、加密狀態與單頁詳細資訊
  • 依頁碼範圍擷取文字、帶頁面脈絡搜尋文字,並統計文字資訊
  • 將頁面轉為 base64 影像,並擷取內嵌圖片
  • 擷取表格、外部連結與文件內部頁面跳轉
  • 讀取書籤目錄、註解與螢光標記,並比較兩頁的文字相似度
適用情境
適合讓助理針對本機 PDF 報告、論文或合約回答問題、在文件內搜尋,或擷取表格、連結與註解,而不必把檔案上傳到外部服務。
執行需求
以本機程序在使用者電腦上執行(僅桌面端)。需要 Python 3.10+ 與 PyPI 套件 pdf-insight-mcp,通常以 uvx 或 pip install 啟動。各工具需傳入 PDF 檔案的絕對路徑。未宣告帳號、API 金鑰或環境變數。
安裝前請注意
助理可讀取你提供的任何 PDF 路徑,請只指向願意在對話中曝露的檔案。加密 PDF 除非本身免密碼即可存取,否則會被拒絕;掃描版 PDF 可能幾乎擷取不到文字。大頁碼範圍與影像轉換有上限,結果可能不完整。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 PDF Reader,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

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

Run the server directly from PyPI:

bash
uvx pdf-insight-mcp

Or install it first:

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

MCP client configuration

Use the published PyPI package:

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

Use a local checkout for development:

json
{  "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:

text
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:

bash
uv sync --extra dev

Run tests:

bash
uv run pytest -q

Build the package:

bash
uv builduvx twine check dist/*

Run the local server:

bash
uv run pdf-reader-mcp

Release

Releases are published through GitHub Actions.

Before the first release, configure PyPI Trusted Publishing with:

text
PyPI project name: pdf-insight-mcpOwner: XvvlnRepository name: pdf-reader-mcpWorkflow filename: publish.ymlEnvironment name: leave empty

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

bash
git tag vX.Y.Zgit 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

來源:README.md,提交 88d4232

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分