io.github.tidybytetools/pdf-table-pull-lite
OfficialThis MCP server provides a single tool, extract_pdf_tables, that pulls tables out of a local text-based PDF.
Extract tables from a PDF given its full local file path.
Limit extraction to specific pages using a
pagesstring like"1,3-5"(empty = all pages).Choose a detection
strategy:auto(borders first, then spacing),lines(ruled borders), ortext(tables aligned by spacing).Return the CSV text of each table directly (one string per table, header row first) when no
output_diris given.Save each table as
pageN_tableM.csvinto an optionaloutput_dirand return the file paths instead, replacing existing files of the same name.Skip scanned/image-only pages (no OCR) and return an empty list when no tables are found.
It is not intended for scanned PDFs, PDFs hosted on the web, or full-document text extraction.
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., "@io.github.tidybytetools/pdf-table-pull-lite extract the tables from ~/Downloads/invoice.pdf and save each as a CSV"
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-table-pull-lite
Free. No API key. Runs on your own computer, so your PDFs stay with you.
A tool that pulls the tables out of a text PDF and saves each one as a CSV file. Need Excel output, scanned PDFs or tables joined across pages? The paid version does that: pdf-table-pull on Gumroad
Runs on your own computer, so your PDFs are never uploaded anywhere. MIT license. Python 3.10 or newer, on Windows, Mac and Linux.
Install
pip install pdf-table-pull-liteOr use pipx, which keeps it in its own space:
pipx install pdf-table-pull-liteWant the newest code from GitHub instead?
pip install git+https://github.com/tidybytetools/pdf-table-pull-liteRelated MCP server: MokuPDF
Use it
pdf-table-pull-lite statement.pdf # CSVs go in statement_tables/
pdf-table-pull-lite statement.pdf -o out/ -p 2-5 # only pages 2 to 5
pdf-table-pull-lite statement.pdf -s text # tables with no border linesExample run:
Found 2 table(s).
page1_table1: 2 rows x 3 columns
page1_table2: 2 rows x 2 columns
Saved: statement_tables/page1_table1.csv
Saved: statement_tables/page1_table2.csvYou get one CSV per table, named after its page. The CSVs open straight in Excel (they're saved as UTF-8 with a BOM so accents show correctly).
--strategy (-s): lines is for tables with ruled borders, text is for tables lined up by spacing, and auto (the default) tries lines first, then text.
When you run it in a terminal it ends with one short line about the paid version. --quiet turns it off, and it never shows when output is piped or redirected.
Known limits
Scanned PDFs. Pages that are just an image (no text layer) are skipped, and the tool tells you which ones.
Tables that continue onto the next page come out as separate CSVs, one per page.
Odd layouts. Tables with merged cells or no clear columns can come out with cells in the wrong spot. Check the CSV.
CSV only. No Excel or JSON output, no number cleanup (so
(40)stays as text), and no password-protected PDFs.
Lite vs paid
lite (free) | ||
Text PDFs, ruled or spaced tables | yes | yes |
CSV output | yes | yes |
Excel (one sheet per table) and JSON output | no | yes |
Scanned PDFs (OCR) | no | yes |
Join tables across pages | no | yes |
Numbers cleaned ( | no | yes |
Password-protected PDFs | no | yes |
How it compares to other free tools
All of these are free and open source. Pick what fits you.
pdf-table-pull-lite | ||||
What it is | Command line tool | Python library | Python library + CLI | Python wrapper for Tabula |
Needs Java | no | no | no | yes |
One command to get CSVs | yes | no, you write code | yes | yes |
Picks border or spacing mode for you | yes ( | no | no | yes (guess) |
Tells you which pages are scans | yes | no | no | no |
Built-in MCP server for AI apps | yes | no | no | no |
Lots of tuning knobs | no | yes | yes | some |
This tool is built on pdfplumber. If you want full control in your own code, use pdfplumber or Camelot directly.
Use it with your AI app (MCP)
There is a small free MCP server built in. It gives your AI app one tool, extract_pdf_tables. No API key or account is needed. It needs uv, which gives you the uvx command.
Run it by hand to check it starts (it waits quietly for an app to talk to it):
uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcpShorter way to start the same server: uvx pdf-table-pull-lite mcp.
Pick your app below and copy the block. Restart the app after you save.
Claude Desktop
Open Settings > Developer > Edit Config. That opens claude_desktop_config.json. Add this:
{
"mcpServers": {
"pdf-table-pull-lite": {
"command": "uvx",
"args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
}
}
}If Claude says it can't find uvx, run which uvx (Mac/Linux) or where uvx (Windows) and put that full path in "command".
Cursor
Put the same block in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"pdf-table-pull-lite": {
"command": "uvx",
"args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
}
}
}VS Code
VS Code uses servers, not mcpServers. Put this in .vscode/mcp.json in your project, or run MCP: Open User Configuration to use it everywhere:
{
"servers": {
"pdf-table-pull-lite": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]
}
}
}Or add it with one command:
code --add-mcp '{"name":"pdf-table-pull-lite","type":"stdio","command":"uvx","args":["--from","pdf-table-pull-lite","pdf-table-pull-lite-mcp"]}'Cline
In the Cline panel, click the MCP Servers icon, open Configure, then click Configure MCP Servers. Add this inside mcpServers:
{
"mcpServers": {
"pdf-table-pull-lite": {
"command": "uvx",
"args": ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"],
"disabled": false,
"autoApprove": []
}
}
}Codex
One command:
codex mcp add pdf-table-pull-lite -- uvx --from pdf-table-pull-lite pdf-table-pull-lite-mcpOr add this to ~/.codex/config.toml:
[mcp_servers.pdf-table-pull-lite]
command = "uvx"
args = ["--from", "pdf-table-pull-lite", "pdf-table-pull-lite-mcp"]Gemini CLI
This repo is also a Gemini CLI extension. Install it with:
gemini extensions install https://github.com/tidybytetools/pdf-table-pull-liteTool: extract_pdf_tables(path, pages="", strategy="auto", output_dir=""). It returns a list with the CSV text of each table. If you set output_dir, it saves the CSVs there and returns the file paths instead.
Use it in GitHub Actions
Pull the tables out of PDFs in your repo, or out of a PDF report your workflow downloads, every time it runs. You get one CSV per table and a preview on the run page.
name: PDF tables
on: [push, workflow_dispatch]
permissions:
contents: read
jobs:
tables:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: tidybytetools/pdf-table-pull-lite@v1
with:
files: reports/**/*.pdf
artifact-name: pdf-tables # download the CSVs from the run pageEach PDF gets its own folder of CSVs inside pdf-tables/, named after the PDF's path. For example reports/june.pdf gives pdf-tables/reports/june/page1_table1.csv.
It runs the code in the same tag you pick, with a fixed pdfplumber version. No API key, no account, and your PDFs are not sent anywhere outside GitHub. It works on Linux, Windows and Mac runners. Scanned pages (just a picture, no text) are skipped with a warning.
Inputs
Input | Default | What it does |
|
| Which PDFs to read. Glob patterns, one per line or split by commas. |
|
| Patterns to skip. |
|
| Folder for the CSV files. |
| (empty) | Pages to read in every PDF, like |
|
|
|
|
| Fail when a PDF has no tables. |
|
| Fail when a PDF has scanned pages with no text. |
|
| Fail when no files match. |
| (empty) | If set, upload the CSVs as an artifact with this name. |
| (empty) | Python to set up. Empty uses the runner's Python (3.10 or newer). |
Outputs
Output | What it is |
| How many PDFs were read. |
| How many tables were saved as CSV. |
| How many PDFs have scanned pages. |
| The folder with the CSV files. |
For AI agents
Use when: you have a local PDF with real text (you can select the words) and need its tables as rows.
Don't use when: the PDF is a scan or photo, it has a password, or you need Excel. Those pages get skipped. Use the paid version for those.
Input: a file path, plus optional
pageslike1,3-5andstrategy(auto,lines,text).Output: a list of CSV strings, one per table, first row is the header. Empty list means no tables were found.
CLI exit code is 0 on success and 1 on error (message on stderr). See also
llms.txt.
Tests
pip install pdfplumber "mcp<2"
python3 -m unittest discover testsLicense
MIT. See LICENSE.
Available Tools
1 toolextract_pdf_tablesExtract PDF tables to CSVADestructiveIdempotent
Pull the tables out of a local text PDF.
Use this when you need the rows and columns of a table from a PDF on this computer, for example to load them into a spreadsheet, pandas or a database. Do not use it for scanned PDFs or photos (there is no OCR), for PDFs on the web (download the file first), or when you want the whole document as text (use a PDF-to-Markdown or text tool instead).
path: full path to a PDF on this computer. pages: optional, like "1,3-5". Empty means all pages. strategy: "auto" (default, tries borders first, then spacing), "lines" (tables with ruled borders) or "text" (tables lined up by spacing). Try "text" if "auto" misses a table that has no border lines. output_dir: optional. If set, each table is saved there as a CSV and the file paths are returned. Files named pageN_tableM.csv that already exist there are replaced. If empty, nothing is written and the CSV text of each table is returned.
Scanned (image-only) pages have no text and are skipped. Returns [] if no tables.
Inputs: path (required), pages, strategy, output_dir. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is nothing to confuse it with. Its description explicitly bounds behavior with clear 'do not use' cases (scanned PDFs, remote URLs, full-document text extraction), which removes ambiguity about when to select it.
The single name extract_pdf_tables follows a clear verb_noun_object snake_case pattern that matches common MCP conventions. No inconsistencies are possible with one tool, and the name is self-explanatory.
A single tool is on the thin side for a server, even a 'lite' one, though it is narrowly and honestly scoped to one operation. It earns its place but leaves little surface for related needs such as listing pages or detecting whether tables exist.
For the narrow purpose of pulling tables from a local text PDF, the surface is reasonably complete: page selection, strategy fallback, and CSV output to disk or inline are all covered, with explicit notes on skipped scanned pages and empty results. Gaps (no OCR, no URL input, no full-text extraction) are deliberately out of scope and documented.
Maintenance
Related MCP Connectors
Extract every table from PDFs and scans to Excel, CSV and JSON.
Pull tables out of a PDF as rows and cells, ready for a spreadsheet or a data pipeline.
Extract tables, text and formulas from PDFs, including scanned pages and broken text layers.
Extract text, tables and metadata from every PDF linked in a dataset, CSV or Google Sheet.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI-powered extraction and analysis of PDF documents with 40+ specialized tools for text, tables, images, layout analysis, security assessment, and document intelligence. Supports both text-based and scanned PDFs with OCR capabilities.385 PyPI11MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to read and process PDF files with intelligent file search, text extraction, image processing, and optional OCR support for scanned documents.MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to extract clean structured JSON tables from any PDF with per-cell citations to the source page.MIT
- AlicenseNot gradedqualityCmaintenanceExtracts text and tables from PDFs for AI agents via MCP, enabling structured data retrieval from invoices, reports, and statements.75 PyPI1MIT