
Pdf Extract Mcp
io.github.diyaluo由 GitHub 账号 diyaluo 发布v0.3.0更新于 Oct 24, 2026
Digital PDF invoices/bank statements to CSV, JSON or Excel with automatic PII redaction.
概览
本地 MCP 服务器,从发票、银行对账单等数字 PDF 中提取表格和文本,输出 CSV、JSON 或 Excel,并自动脱敏个人隐私信息。
- 可以做什么
- 从以 base64 或直接 https 链接提供的数字 PDF 中提取表格和文本,返回 CSV、JSON 记录或 XLSX 文件;表格识别按页尝试有线表格、依据表头列位置推导列以及通用文本对齐三种策略。默认脱敏个人与金融标识,涵盖美国及国际的 SSN、IBAN、SWIFT、路由号、卡号、电话和邮箱,以及中国的身份证、手机号、银行卡、统一社会信用代码、护照和人名。查询服务状态和免费额度限制。金额、日期和描述保持不变,扫描件或纯图片 PDF 会被拒绝。
- 适用场景
- 适用于手头有发票、银行对账单或账单的文本层 PDF,希望助手将其转换为结构化行以便放入表格或后续处理,同时避免暴露个人数据。不适合扫描件或纯图片文档。
- 运行要求
- 以本地 stdio 进程运行;README 使用 pip 安装,需要 Python 3.10+、mcp、pdfplumber 和 openpyxl,pandas 为可选。另提供远程 streamable-http 模式。未声明身份验证;可选的 PDF_EXTRACT_API_KEY 用于付费层级,PDF_EXTRACT_STATE_DIR 可覆盖遥测文件位置。
安装
在 SourceWeft 中
- 打开 控制台中的 Pdf Extract Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
pdf-extract-mcp
A Model Context Protocol (MCP) server that extracts tables and text from digital (text-layer) PDFs — bank statements, invoices, bills — into CSV / JSON / Excel, with automatic PII redaction.
Part of the invoice-extractor product. This package is the MCP distribution channel ("ecosystem parasite": one backend, many host workflows). Web demo lives in the parent project.
What it does
extract_pdf— upload a digital PDF (base64 or URL), get back structured table rows as CSV / JSON records / XLSX.health— service status and free-tier limits.
Table detection tries three strategies per page: ruled tables → explicit columns derived from the header row's own x-positions (handles statement PDFs with no grid lines, the common case for Western banks) → generic text alignment.
PII redaction (on by default) covers:
Bank identifiers that are ambiguous as bare numbers (routing/account/sort code) are masked only when they follow a label, so reference numbers and amounts stay readable. Amounts, dates and descriptions are never altered.
Scanned / image-only PDFs are explicitly rejected (SCANNED_PDF_UNSUPPORTED)
— the free tier covers digital PDFs only (OCR is a paid-tier candidate).
Limits (free tier)
- 100 pages / rolling 30 days / client (anonymous, keyed by client hash).
- 50 MB per file.
- Above quota the tool returns a structured
QUOTA_EXCEEDEDresponse with an in-band upgrade pointer. It never silently bills. - Set
PDF_EXTRACT_API_KEYto a paid key to bypass the quota (billing gateway is a P1 item; current free tier has no paid keys issued).
Run (local stdio — Claude Desktop / Cursor / any MCP client)
Client config example:
Run (remote streamable-http, for hosted MCP clients)
Tool schema
Telemetry
Every call is appended (best-effort, never blocks extraction) to
~/.cache/pdf-extract-mcp/mcp_usage.jsonl (override with
PDF_EXTRACT_STATE_DIR). Clients are recorded as salted hashes; no PDF
content and no PII are ever logged.
Note: as a distributed stdio bundle this file lives on the user's machine, so the publisher cannot read it. Real external usage is read from the hosting registry's owner API instead (
GET /servers/{namespace}/{name}/logson Smithery returns the invocation count).
Stack
mcp >= 1.2 (works on both mcp 1.x FastMCP and mcp 2.x MCPServer), pdfplumber,
openpyxl. pandas is optional — when absent the package falls back to a
lightweight list-of-rows table (stdlib CSV/JSON + openpyxl), which keeps the
distributable bundle small. Python 3.10+.
License
MIT
来源:README.md,提交 0c3e59d
工具
0版本历史
2- v0.3.0最新Oct 17, 2026
- v0.1.0Oct 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分