superPDF AI

io.github.arjunprabhulal由 GitHub 账号 arjunprabhulal 发布v0.4.1更新于 Oct 27, 2026

PDF tools on your computer: read, convert, edit, merge, fill and compare PDFs. Nothing is uploaded.

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

本地 MCP 服务器,让助手在你允许的文件夹内读取、转换、编辑、合并、填写和比较 PDF,且不上传文件。

可以做什么
  • 列出并查看允许文件夹中的 PDF:文件列表、页数、页面尺寸、表单字段与属性
  • 读取内容:逐页提取内嵌文本,并以 Markdown、HTML 或 JSON 输出含标题、表格、图表和列表的结构
  • 提取表格与矢量图表为 Excel、CSV、JSON 或 Markdown;获取大纲并逐页比较两个版本
  • 将 PDF 转为 Word、PowerPoint 或 EPUB,也可由图片或 Markdown 生成 PDF
  • 编辑页面与表单:合并、拆分、提取或删除页面,填写并扁平化表单,添加文字、调整尺寸、旋转、加页码或水印
  • 加密与修复:AES-256 密码保护、解锁、清除元数据、修复损坏文件;运行多步骤流水线或批量任务
适用场景
适合需要在本机处理 PDF 的场景,例如把发票明细整理成表格、把报告转成 Markdown 或 Word、合并文件或填写表单,同时让文件留在本地。
运行要求
通过 npm 包 @superpdf/cli 以 stdio 在本地运行,需要 Node.js 22 或更高版本(也可用 Homebrew 安装)。启动时用 --allow-dir 指定助手可用的文件夹。Office 转 PDF 需要 LibreOffice。未声明账号、API 密钥或环境变量。
安装前请注意
服务器会在 --allow-dir 指定的文件夹内写入新文件并修改 PDF(合并、拆分、填表、加密、解锁、清除元数据),因此该文件夹应尽量收窄。助手读取的文本会发送给其模型,与展示任何文件时相同。解锁和加密涉及敏感文档。不会覆盖已有文件,也不会上传。

安装

在 SourceWeft 中

  1. 打开 控制台中的 superPDF AI,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[superPDF AI]

superPDF AI: PDF tools that run on your computer, from the command line, Python, AI assistants (MCP) or a local API.

Tables, charts, headings and scans to Markdown, HTML or JSON; Word, Excel and PowerPoint; forms, merging and comparing. The reader works by rules, not a language model; scans go through Tesseract OCR. Nothing is uploaded.

[CI] [npm] [License: Apache-2.0] [Node.js 22+] [MCP server]

Website · Docs · Python docs · Benchmark · Changelog

How it compares · Quick start · JavaScript/TypeScript · Python · MCP tools · How it works

npx @superpdf/cli export report.pdf --output report.md



[Claude Code with the superPDF MCP server: asked to combine two invoices and list their vendor, number, due date and total, it calls superPDF three times and answers with the table]

superPDF reads a PDF the way it was made: from the text, fonts and drawings inside it. It rebuilds the document as Markdown, HTML or JSON, with headings at the right level, tables with their rows and columns, and charts turned back into the numbers they were drawn from. Scanned pages are read with OCR in 15 languages.

It runs on your computer as a command, a Python package, an MCP server for AI assistants such as Claude Code, Cursor and Codex, or a local REST API for your own scripts. It only opens files in the folders you allow and never uploads them (through MCP, the text your assistant reads goes to its model, as with any file you show it). It is the same reader that powers superpdf.ai in the browser.

Use it asInstall or runDocs
Command linenpm install -g @superpdf/cli, or npx @superpdf/cli … without installingCLI
Command line with Homebrewbrew install arjunprabhulal/superpdf/superpdfTap
MCP server for AI assistantssuperpdf mcp --allow-dir ~/Documents/superPDFMCP setup
Local REST API (OpenAPI 3.1)superpdf serve --allow-dir ~/Documents/superPDFAPI
JavaScript and TypeScript SDKnpm install @superpdf/cli, then import { toDocx } from '@superpdf/cli'SDK
Python SDKpip install superpdf or uv add superpdfPython
Python, without installinguvx superpdf … or pipx run superpdf …Python
LangChainpip install langchain-superpdfLoader
LlamaIndexpip install llama-index-readers-superpdfReader
LangGraph agentsthe MCP server through langchain-mcp-adaptersAgents

How it compares

On ParseBench, in our own run of its open-source test suite on all 2,078 documents, superPDF scores 65.0 overall (64.8 on documents it was never tuned on). It is not on the official leaderboard yet. The other scores are a selection from the public leaderboard (October 12, 2026).

ParserOverallTablesChartsContentFormattingGrounding
LlamaParse Agentic Plus (paid service)90.293.494.292.387.184.1
Claude Opus 5.5 (AI model)78.093.964.191.877.063.2
superPDF (no language model, our run)65.068.452.280.562.361.5
Azure Document Intelligence59.686.01.684.951.973.8
Docling (docling-models)50.666.452.866.91.066.1
Google Cloud Document AI50.455.11.483.750.561.3
AWS Textract47.984.66.074.83.770.4

Compared with the Azure, Google and AWS services, superPDF scores much higher on charts and higher on formatting; Azure and Textract score higher on tables. LlamaParse and Claude Opus 5.5 score higher overall. Full table and method: superpdf.ai/performance.

Quick start

You need Node.js 22 or later.

Use it from the terminal

bash
npx @superpdf/cli export report.pdf --output report.md

npx downloads the tool once and runs it. To install the superpdf command for regular use:

bash
npm install -g @superpdf/clisuperpdf help

Or with Homebrew on macOS or Linux, which brings its own Node.js:

bash
brew install arjunprabhulal/superpdf/superpdf

Use it from your AI assistant (MCP)

Create the folder the assistant may use, then add the server. For Claude Code:

bash
mkdir -p ~/Documents/superPDFclaude mcp add --scope user superpdf -- npx -y @superpdf/cli mcp --allow-dir ~/Documents/superPDF

For Cursor, Claude Desktop and other assistants that read an MCP settings file:

json
{  "mcpServers": {    "superpdf": {      "command": "npx",      "args": ["-y", "@superpdf/cli", "mcp", "--allow-dir", "/Users/you/Documents/superPDF"]    }  }}

With the command installed (npm install -g @superpdf/cli), use superpdf mcp --allow-dir … in place of npx -y @superpdf/cli mcp --allow-dir …. Then ask, for example: "Read invoice.pdf in my superPDF folder and give me the line items as a table." The assistant can only use the folders you pass with --allow-dir. Setup for each assistant: superpdf.ai/docs/mcp-api/mcp-tool-access.

Use it from Python

bash
pip install superpdf                 # or run without installing: uvx superpdf export report.pdf --output report.md
python
import superpdf
markdown = superpdf.export("report.pdf")pages = superpdf.export_pages("report.pdf")        # Markdown per page
superpdf.merge(["a.pdf", "b.pdf"], "combined.pdf")  # every tool is a typed functionsuperpdf.extract_tables("report.pdf", "tables.xlsx")superpdf.to_docx("report.pdf", "report.docx")
from superpdf.langchain import SuperPDFLoader       # pip install "superpdf[langchain]"docs = SuperPDFLoader("report.pdf").load()

Node.js comes with the package. All 30 tools, a LlamaIndex reader and the full reference are in the Python docs and python/README.md.

Use it from JavaScript or TypeScript

bash
npm install @superpdf/cli
ts
import { exportPages, extractTables, toDocx, SuperPDFError } from '@superpdf/cli';
const pages = await exportPages('report.pdf');          // [{ page: 1, markdown: '# Quarterly report…' }]const word = await toDocx({ input: 'report.pdf', output: 'report.docx' });await extractTables({ input: 'report.pdf', format: 'csv', output: 'tables.csv' });

Every tool is an async function (merge, split, fillForm, compare, runBatch and the rest; tools() lists them) that takes the tool's JSON input and returns its typed result. It runs in your Node.js process (22 or later): no server, no subprocess. TypeScript types come with the package, generated from the same schemas as the MCP server and the API. Errors are SuperPDFError with a code (validation, conflict, not_found, operation_failed). Each call may only use the folders of the paths you give it, or the ones you pass as { allowDirs }.

Use it from your own code (REST API)

bash
superpdf serve --allow-dir ~/Documents/superPDF

This starts a private API on 127.0.0.1 that only this computer can reach. It prints a token when it starts (or set SUPERPDF_API_TOKEN, at least 32 characters); every request under /v1/ needs it. The OpenAPI 3.1 document is served at /openapi.json (also openapi.json here, generated from the tool schemas). Guide and reference: superpdf.ai/docs/api.

What it reads

[Input: a one-page report PDF with a table and a bar chart. Output: the Markdown superPDF writes from it, with the heading levels, the table, and the chart's values as a table]
Part of the PDFHow superPDF reads it
TablesRuled tables from their lines (shading inside them splits rows), borderless tables from aligned text; --tables html keeps merged header cells
ChartsBar, line, dot, area and pie charts drawn as shapes, turned into tables of values; values measured from the drawing, not printed on it, are marked approximate
StructureHeadings and their levels, paragraphs, lists, bold and italic text, page headers and footers
Reading orderMulti-column pages split at their column gaps, so the text reads in order
ScansPages without a text layer are read with Tesseract OCR in English and 14 other languages; the language data is bundled, so nothing is downloaded
Big filesNo page limit; files up to 2 GB

Commands

[superpdf help in a terminal: commands grouped under Read and convert, Edit pages, and For AI agents and code, then examples and notes]
bash
superpdf info document.pdf                                    # pages, sizes, form fields, propertiessuperpdf merge a.pdf b.pdf --output combined.pdfsuperpdf extract document.pdf --pages 1,3-5 --output selected.pdfsuperpdf rotate document.pdf --pages 2 --angle 90 --output rotated.pdfsuperpdf export document.pdf --output document.md             # or .html / .json (--format)superpdf export document.pdf --tables html --output doc.md    # tables as HTML, keeping merged header cellssuperpdf export https://example.com/a.pdf --output a.md       # a PDF from an https:// linksuperpdf convert report.docx --output report.pdf              # Word, Excel, PowerPoint; needs LibreOfficesuperpdf pipeline document.pdf --steps steps.json --output result.pdfsuperpdf audio document.pdf --output document.m4a             # read aloud with the macOS system voicesuperpdf tools                                                # all 30 tools with their JSON input schemassuperpdf tool pdf_protect --input '{"input":"a.pdf","password":"…","output":"locked.pdf"}'   # any tool, JSON in and out

Results are always written to a new file; existing files are never overwritten. superpdf help shows every command. Try info and export on examples/quarterly-report.pdf, a one-page report.

export also reads an https:// link: up to 2 GB, stopping after 60 seconds without data and following up to 5 redirects. Links to this computer or the local network (localhost, private and link-local addresses) are refused at every redirect, anything that isn't a PDF is refused, and the download is deleted once it's read. Only export takes links; mcp, serve and tool read files inside their --allow-dir folders.

MCP tools

ToolWhat it does
pdf_list_filesList the PDFs in an allowed folder
pdf_infoPage count, page sizes, form fields and properties
pdf_read_textThe embedded text, page by page
pdf_extract_structureMarkdown, HTML or JSON with headings, tables, charts and lists
pdf_merge, pdf_split, pdf_extract_pages, pdf_remove_pagesCombine and separate pages into new PDFs
pdf_extract_tablesTables and vector charts as Excel, CSV, JSON or Markdown
pdf_outline, pdf_compareThe outline with each section's pages; what changed between two versions, page by page
pdf_to_docx, pdf_to_pptx, pdf_to_epubEditable Word, PowerPoint (text as text boxes) and EPUB 3
pdf_from_images, pdf_from_markdownJPG and PNG images, or a Markdown file, to PDF
pdf_fill_form, pdf_flattenFill form fields by name; make fields part of the page
pdf_add_text, pdf_resize_pagesTyped signatures and notes; crop margins or scale pages
pdf_rotate_pages, pdf_add_page_labels, pdf_add_watermarkRotate, number (header or footer) and stamp pages
pdf_protect, pdf_unlock, pdf_remove_metadata, pdf_repairAES-256 passwords, clean properties, fix damaged files
pdf_from_officeWord, Excel and PowerPoint to PDF (needs LibreOffice)
pdf_run_pipeline, pdf_run_batchUp to 10 steps on one PDF, or the same steps on up to 50 PDFs

What makes it different

Most PDF-to-text tools take the text layer and sort it by position, or run an AI model on a picture of the page. superPDF works from the PDF's own drawing instructions, which keeps exact text and positions and recovers things both approaches tend to lose:

  • Charts become data. Bars, lines, dots, areas and pie slices are drawn as shapes; pdf-charts.js measures bars, lines, dots and areas against the axis labels (or, without an axis, against the values printed on them), reads pie slices from their angles, and matches series to their legend colours. Charts saved as pictures fall back to reading the bars' pixels.
  • Lost letters are recovered. When a font has no proper Unicode table, PDF.js reads its letters as blanks or leaves them out. pdf-text-fixes.js matches each glyph's outline against letters it has already identified, and checks TrueType fonts against the standard Mac glyph order, then puts the letters back.
  • Bold is measured, not guessed. Font names are often hidden (F1, g_d0_f2), so pdf-structure.js measures the glyphs' stroke thickness, compares the widths of two cuts of one font, and detects text drawn twice or outlined to look bold. On scans it measures the ink thickness of each word.
  • Spacing and hidden text are fixed. False spaces that PDF.js inserts in letter-spaced words and around Chinese and Japanese characters are removed by measuring the glyphs the page draws, text drawn outside a rectangular clipping area is left out, and Arabic lam-alef ligatures that come out with their letters swapped are corrected.
  • OCR only where it's needed. Whole scanned pages, pages whose font encoding is garbled, and pictures that contain text (checked first for letter-like shapes, so photos don't produce noise). The language comes from the PDF's language tag or the text itself, and a poor reading is retried with Sauvola thresholding.
  • Tables three ways. Ruled lines, lines found in the pixels of scanned pages, and borderless tables from aligned columns of text (on pages with a text layer).

How it works

  1. Read. PDF.js gives the text with its fonts and positions, and the drawing operations (lines, rectangles, curves).
  2. Recognize. Scanned or garbled pages, and pictures that contain text, go through Tesseract OCR.
  3. Repair. Letters drawn without a Unicode mapping are recovered from their outlines, and spacing is fixed.
  4. Rebuild. Rules group the text into lines and blocks, find table grids and borderless columns, read charts from their shapes and axis labels, size headings from the fonts and order columns for reading.
  5. Write. Markdown, HTML or JSON; the JSON keeps each block's page and position.

The reader lives in lib/: pdf-structure.js (pages to blocks), pdf-layout.js (lines, tables, reading order), pdf-charts.js (charts) and pdf-text-fixes.js (text repairs). Ideas adapted from pdfplumber, Camelot, tabula-java and others are credited in NOTICE.

Privacy and security

  • Everything runs on your computer. The only network requests superPDF makes are the job callbacks (webhooks) you configure for the API; the OCR language data is in the package.
  • The MCP server and the API read and write only inside the --allow-dir folders; paths are resolved through symlinks, so they can't escape.
  • The API listens on 127.0.0.1 only and needs its bearer token on every request under /v1/.
  • Outputs are written to new files; existing files are never overwritten.

Found a security issue? See SECURITY.md.

Contributing

Issues and pull requests are welcome. For a reading problem, attach the PDF (or one page of it) and the output you expected. See CONTRIBUTING.md.

License

Apache-2.0. Credits for adapted ideas and bundled data are in NOTICE. "superPDF" and its logo are the project's marks and are not covered by the licence.

来源:README.md,提交 ed8194d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.1最新Oct 15, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分