pdf-tables-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Want your AI agent to read a folder of supplier invoices or bank statements and tell you what doesn't add up? Start here. pdf-tables-mcp gives Claude, Cursor or any MCP client four read-only tools that turn text-layer invoice and statement PDFs into checked, structured data, without uploading anything.
pdf-tables-mcp
Invoice and bank-statement PDFs to structured, arithmetic-checked data for AI agents. Local and sandboxed.
Real output of pdf-tables-mcp examples/invoices --scan: the same data the agent gets from extract_folder. The example PDFs are synthetic.
Why
Asking a chat model to "read these invoices" usually means uploading PDFs and hoping the numbers it reads back are the ones on the page. This server does the reading with a deterministic parser on your machine, checks the arithmetic (line amounts, subtotal + VAT = total, running bank balances) and hands the agent clean JSON plus a list of what failed the checks. The agent then does what it is good at: explaining, comparing and drafting the follow-up.
Related MCP server: pdfforge
Features
π§Ύ Invoices: number, date, seller, buyer, currency, subtotal, VAT, total and line items (description, qty, unit price, amount)
π¦ Bank statements: account holder, account, period, opening / closing balance, transactions with debit, credit and balance
β Arithmetic checks on every document; mismatches come back as readable issues, not silent numbers
π Folder tools: one summary row per PDF, invoice totals per currency, flagged and unreadable files; or all line items as one flat table
π¦ No silent empties: every document has a
statusofok,NO_ROWSorNEEDS_REVIEW; documents where no line items or transactions were found are listed separately inno_rows, so an agent never mistakes an empty extraction for a clean oneπ Sandboxed and read-only: only folders you pass on the command line are reachable (
..and symlink escapes are refused), 25 MB and 200-file limits, nothing is writtenπ₯οΈ CLI too:
--scanfor a terminal summary,--call TOOLto see the exact JSON a tool returnsπͺΆ Parser: invoice-pdf-extractor v0.2.0, pinned to a commit (pure Python,
pypdf); MCP protocol implemented without an SDK
Quick start
pip install git+https://github.com/purkat0301-sys/pdf-tables-mcp
pdf-tables-mcp ~/Invoices --scan
pdf-tables-mcp ~/Invoices # run as an MCP server on stdioMCP client config (Claude Desktop, Cursor, VS Code, ...), as in examples/mcp.json:
{ "mcpServers": { "invoices": { "command": "pdf-tables-mcp", "args": ["/path/to/Invoices"] } } }Then ask, for example: "Which invoices in November don't add up, and what is the total per currency?"
How it works
flowchart LR
A[AI agent] -->|tools/call| S[pdf-tables-mcp]
S -->|path check| X{inside allowed folders?}
X -- no --> E[error returned to agent]
X -- yes --> P[invoice-pdf-extractor<br/>pypdf text layer]
P --> C[parse fields, lines,<br/>transactions]
C --> V[arithmetic checks]
V --> S --> ATool | Input | Returns |
|
| PDF files and sizes |
|
| full document with lines or transactions and |
|
| summary rows with |
|
| every invoice line item as one table |
What one document looks like (the PDF on the left, the tool result on the right):
Compared with the inspiration
Built on my own invoice-pdf-extractor after looking at general PDF-table MCP servers such as wesseltl/pdf-mcp.
pdf-tables-mcp | wesseltl/pdf-mcp | |
Focus | invoices and bank statements | any table in PDF and Word documents |
Named invoice / statement fields | β | via configurable profiles (per its README) |
Arithmetic checks (totals, VAT, balances) | β built in | see project |
Folder summary and totals per currency | β | see project |
Generic table extraction, Word files | β | β |
Browser app, Excel export | β (CLI + JSON) | β |
Scanned PDFs (OCR) | β | β (per its README) |
Path sandbox | β | see project |
If you need any table from any document, use pdf-mcp. If you need "read my invoices and show me the ones that are wrong", use this.
FAQ
Scanned invoices? Not supported: they have no text layer. Run OCR first (for example ocrmypdf in.pdf out.pdf); the tool says so when it meets one.
Which invoice layouts work? Text-layer PDFs with labelled fields (Invoice No, Date, Subtotal, VAT, Total) and line items in rows. Run --scan on your own folder to see before connecting an agent.
Does anything leave my machine? The server makes no network calls. What your MCP client sends to its model is up to the client.
Limitations
Layout-based parsing, reliable only on layouts similar to the parser's test samples. Unusual layouts can miss fields; the document is then marked
NEEDS_REVIEWorNO_ROWS. Parser benchmark on 11 public real invoices (a development set, not blind): see invoice-pdf-extractor.Text-layer PDFs only; no OCR.
Installs its parser from GitHub; not on PyPI yet.
Roadmap
See ROADMAP.md: duplicate-invoice detection, CSV/XLSX export tool (opt-in folder), supplier filter, date-range filter.
Related tools
By the same author: invoice-pdf-extractor (the parser as a CLI) Β· recon-kit (match invoices to payments) Β· sheets-mcp (read-only SQL over CSV/XLSX) Β· mcp-preflight
Contributing
Issues and pull requests are welcome; a synthetic PDF that parses wrongly is the most useful bug report.
pip install -e '.[dev]' && pytest.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Turn any PDF into structured JSON via AI + OCR: invoices, bank statements, contracts.
Turn bank statement PDFs into categorized, balance-checked transactions and reports.
Extract custom JSON schemas and Excel/CSV tables from PDFs, invoices, statements, and receipts.
Convert PDF bank statements into structured transactions, accounts, and balances.
Related MCP Servers
- AlicenseAqualityDmaintenanceConverts PDF bank statements into structured data (Markdown, JSON, CSV, JSONL) with verified transactions and balance checks, enabling agents to audit numbers.512 npmMIT
- AlicenseBqualityBmaintenanceLets AI assistants read, search, edit, annotate, sign, redact and OCR PDF files entirely on the local machine, with no uploads and non-destructive writes to new files. It also merges, splits and reorganises pages, fills forms, compares versions to detect tampering, and converts documents between PDF, Word, Excel, images and text, including turning bank statements into spreadsheet rows.22AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceLets AI assistants and editors read documents on the local machine, turning PDFs, scans, invoices, receipts and bank statements into structured fields, line items and entities over stdio. Runs fully self-hosted with no cloud calls or API keys, so sensitive files never leave the user's machine.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to convert bank statements and mobile money exports (PDF, scanned PDF/OCR, CSV, TSV, XLSX) into normalized, accounting-checked JSON transactions with confidence scores and alerts, entirely locally with no network calls or document storage.MIT