pdf-extract-mcp
This MCP server extracts structured data from digital PDFs and reports service health/limits.
Extract tables/text from digital (text-layer) PDFs such as bank statements, invoices, and bills into CSV, JSON rows, or XLSX base64.
Provide the PDF either as base64 content or as a direct HTTPS
.pdfURL.Redact PII by default, covering US/international and China-specific identifiers while preserving amounts, dates, and descriptions.
Reject scanned/image-only PDFs; OCR is not available in the free tier.
Check service status and free-tier limits with the
healthtool.Use optional paid API key to bypass quota when available; free tier is limited to 100 pages per rolling 30 days per client and 50 MB per file.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pdf-extract-mcp Extract tables from this invoice PDF into Excel and redact PII."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pdf-extract-mcp
π Project landing page (use cases and install guide): https://diyaluo.github.io/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:
Region | Masked |
US / international | SSN, EIN/TIN, IBAN, SWIFT/BIC, routing/ABA, account numbers, card numbers (plain and |
China | 18/15-digit national ID, mobile phone, bank card, USCC (η»δΈη€ΎδΌδΏ‘η¨δ»£η ), passport, 2β3 char personal names, organization keywords |
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).
Related MCP server: genpark-document-redaction-pii-scrubber-skill
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)
pip install -e .
pdf-extract-mcpClient config example:
{
"mcpServers": {
"pdf-extract": {
"command": "pdf-extract-mcp",
"env": {}
}
}
}Run (remote streamable-http, for hosted MCP clients)
REMOTE_TRANSPORT=http MCP_HOST=127.0.0.1 MCP_PORT=5060 \
python -m pdf_extract_mcp.server
# POST JSON-RPC to http://127.0.0.1:5061/mcpTool schema
extract_pdf(
pdf_base64: str | None, # preferred: PDF bytes as base64
pdf_url: str | None, # alternative: direct https .pdf URL
output: "csv"|"json"|"xlsx", # default csv
redact_pii: bool = true,
api_key: str | None, # paid key, optional
) -> {
ok, type: "tables"|"text", pages, tables, rows, columns,
csv | rows_json | xlsx_base64, # depends on output
elapsed_ms
}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
Available Tools
2 toolsextract_pdfA
Extract tables from a digital (text-layer) PDF bank statement / invoice / bill into CSV, JSON rows, or Excel bytes (base64). PII is redacted by default. Scanned/image PDFs are rejected (no OCR in free tier).
Args: pdf_base64: PDF content as base64 (preferred β no third-party fetch). pdf_url: Direct HTTPS URL to a .pdf (alternative to base64). output: "csv" | "json" | "xlsx". redact_pii: keep true unless you explicitly need raw PII (paid only). api_key: paid key to bypass free quota (optional).
Inputs: output, api_key, pdf_url, pdf_base64, +1 more.
healthA
Service health + free-tier limits. No auth required.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
The two tools serve clearly distinct purposes: health is a service-status check, while extract_pdf performs the core PDF extraction. There is no overlap or ambiguity in selection.
extract_pdf follows a clear verb_noun convention, while health is a noun but is a conventional health-check name. The minor deviation is acceptable and readable.
With only two tools, one being an ancillary health check, the functional surface is very thin. It is borderline appropriate for a narrowly scoped extraction service but feels minimal.
The core extraction operation supports multiple output formats, PII redaction, and both base64 and URL inputs. Notable gaps like OCR are explicitly out of scope for the free tier, leaving only minor workarounds needed.
Related MCP Connectors
Extract custom JSON schemas and Excel/CSV tables from PDFs, invoices, statements, and receipts.
Invoices, receipts and statements into clean rows you can check and export. REST API and MCP.
Extract text, tables and metadata from every PDF linked in a dataset, CSV or Google Sheet.
Turn bank statements, invoices, receipts and other PDFs into Excel workbooks.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExtracts text and tables from PDFs for AI agents via MCP, enabling structured data retrieval from invoices, reports, and statements.35 PyPI1MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables document layout parsing, complex table reconstruction, formula auditing, and PII/credential redaction with Luhn verification, reversible salt hashing, and audit logs through MCP-compatible clients.-
- FlicenseNot gradedqualityCmaintenanceEnables converting PDFs and CSV/spreadsheet files into spreadsheets, extracting bank statement or receipt data into clean CSV, cleaning messy CSV, and generating client-ready reports through an open MCP endpoint.-
- AlicenseNot gradedqualityBmaintenanceEnables converting invoice PDFs, scans, and photos into Excel/CSV spreadsheets, checking invoice arithmetic, extracting structured JSON data, and retrieving outputs from previously submitted documents through a hosted MCP service.64 npmMIT