
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 分