Extract text and tables from PDFs for an agent: invoices, reports, statements.
io.github.wesseltl/pdf-mcp (MCP Server)
This MCP server extracts text and tables from PDFs for an agent, targeting documents such as invoices, reports, and statements. It can convert tables from PDF and Word documents into Excel, CSV, or JSON. A simple browser app supports direct table conversion with no agent setup.
π οΈ Key Features
Extract text and tables from PDFs
Convert tables from PDF and Word documents into Excel, CSV, or JSON
Provides MCP connectivity to deterministic extraction tools for AI agents
π Use Cases
Invoice table extraction
Report table extraction
Statement table extraction
Integrating PDF/Word table conversion into agent workflows via MCP
β‘ Developer Benefits
Compatible with Model Context Protocol (MCP)
Supports deterministic extraction tool usage with an AI agent
Output formats: Excel, CSV, JSON
β οΈ Limitations
The provided description mentions table conversion and PDF extraction for agents, without detailing additional document types or extraction controls beyond that scope.
Turn tables in PDF and Word documents into Excel, CSV, or JSON. Use the simple browser app with
no agent setup, or connect the same deterministic extraction tools to an AI agent through
MCP.
The browser app is for direct table conversion. It previews the extracted rows, highlights basic
structure warnings, and keeps files on your computer. Advanced profile checking can additionally
validate named fields, preserve source evidence, and return accepted, needs_review, or
rejected for a recurring document workflow. Cell values come from document parsers, not generated
model output.
Current limitation: PDF extraction supports born-digital documents. Scanned or image-only PDFs
require OCR, which is not included. An accepted decision means the configured checks passed; it
does not prove that the source document itself is correct.
Simple browser app
This is the easiest way to use pdf-mcp. It requires no Python, terminal, MCP client, or agent
configuration after downloading the app.
Download the pdf-mcp-app ZIP for 64-bit Windows, an Apple silicon Mac, or 64-bit Linux.
Unzip it and open pdf-mcp-app.
Your browser opens. Drop in a PDF or Word document, choose Excel, CSV, or JSON, and select
Convert document.
Use Stop app in the browser when finished. The app listens only on your computer. Temporary
document copies are deleted immediately after conversion, and prepared downloads expire after 30
minutes or when the app stops. The community beta downloads are currently unsigned, so the operating
system may ask you to confirm that you want to open them.
If Python is already installed, the same interface can be started with:
The simple app performs raw table extraction. βNo basic structure problems detectedβ is not an
accuracy guarantee. Check important values before using them, or use a profile-checked pilot for a
recurring business workflow.
For agents: local or free hosted beta
The normal pdf-agent-mcp command remains local, MIT licensed, network-free, and telemetry-free.
For people who explicitly want a measured agent beta, pdf-agent-cloud-mcp uploads only the selected
document for one authenticated operation.
Profile checking and evaluation currently run in the local edition or as part of the paid pilot. The
free hosted beta currently exposes raw text, table, and CSV extraction only.
Edition
Document location
Measurement
Best for
Local pdf-agent-mcp
Stays on your machine
None
Confidential or unrestricted local use
Hosted pdf-agent-cloud-mcp
Temporary authenticated upload
Bounded operational counters
Redacted/non-sensitive beta evaluation
The free hosted beta includes 25 operations per calendar month. Temporary uploads are deleted when
each request completes. Usage metrics exclude filenames, document contents, extracted text, and
table cells. Applications are open while endpoint deployment is completed. Apply without attaching
a document; invitations begin only after the endpoint is verified:
VS Code / GitHub Copilot β .vscode/mcp.json. Note the different key (servers, not mcpServers)
and the required type. Tools only run in Copilot Agent mode:
Exit status is 0 for accepted, 2 for needs_review, and 3 for rejected. XLSX output contains
Review, Data, and Evidence sheets. Formula-like document values are escaped in spreadsheet
exports rather than executed.
The report contains document hashes and aggregate metrics, not document or expected cell values. The
included sample is synthetic; build a representative private set before claiming accuracy for a real
document family. See the
evaluation guide.
For a larger demonstration, the repository includes an
18-document fictional workflow simulation.
It exercises accepted, review, and rejected outcomes across PDF and DOCX variants. It is regression
coverage authored by the product developer, not customer validation or evidence of demand.
Raw export
For a direct document-to-file workflow, use the CLI:
Raw Excel exports include a Review sheet with table locations and parser warnings. Use profile-based
export when a workflow needs canonical fields and an acceptance decision.
Understanding the output
extract_tables returns raw rows and lightweight parser diagnostics:
looks_clean β true only means these basic diagnostics found no red flag. It is not an
accuracy score or acceptance decision.
column_count β the number of columns, if every row agrees on it (null if rows disagree).
empty_ratio β fraction of blank cells. A high value often means a bad extraction.
has_merged_cells β Word-only flag for tables with merged cells. Word exposes those cells as
repeated values, so the table is flagged for review.
warnings β plain-language flags, e.g. "ragged: rows have [2, 3, 4] columns (grid may be
misdetected)" or "66% of cells are empty". PDF tables are genuinely hard (nested/merged cells,
multi-page), so instead of pretending, the tool tells you when a result is suspect.
Also usable from plain Python
python
from pdf_mcp import docx_extractor, exporter, extractor, verified
result = verified.extract_with_profile("invoice.pdf", "invoice-lines-v1")
if result["decision"] == "accepted":
rows = [record["values"] for record in result["records"]]
verified.export_with_profile("coa.pdf", "lab-coa-v1", "coa.xlsx")
extractor.extract_tables("invoice.pdf") # {'tables': [{'rows': [...], 'looks_clean': True, ...}]}
extractor.table_to_csv("invoice.pdf") # clean CSV of the first table
extractor.extract_text("report.pdf", page=1)
docx_extractor.extract_docx_tables("coa.docx")
docx_extractor.docx_table_to_csv("coa.docx")
exporter.export_document_tables("coa.docx", "coa.xlsx")