Skip to main content
Glama

pdf-mcp

Python MCP License

Let your AI agent pull text and tables out of PDFs. An MCP server for invoices, reports, and statements, where the data lives in tables the model can't read from a pasted blob.

When you paste a PDF into a prompt, the columns collapse and the table turns to mush, so the model guesses at the numbers. This extracts the actual table structure with deterministic code, so the agent gets clean rows and never invents a cell.

What it turns a PDF into

A PDF invoice table like this:

Item     Qty   Price
Widget    3    12.50
Gadget    1    40.00
Bolt     10     0.25

comes back as structured rows (or CSV), not a flattened line of text:

[["Item","Qty","Price"],["Widget","3","12.50"],["Gadget","1","40.00"],["Bolt","10","0.25"]]

Related MCP server: pdfmux

The tools it gives an agent

Tool

What it does

page_count(path)

How many pages the PDF has

extract_text(path, page)

Text per page (one page, or the whole doc)

extract_tables(path, page)

Tables as rows of cells

table_to_csv(path, page, index)

One table as clean CSV text

Quickstart

pip install "pdf-agent-mcp[mcp]"

Add it to your MCP client (e.g. Claude Desktop):

{
  "mcpServers": {
    "pdf": { "command": "pdf-agent-mcp" }
  }
}

Now your agent can answer "pull the line items out of this invoice" by reading the PDF, not guessing.

Also usable from plain Python

from pdf_mcp import extractor

extractor.extract_tables("invoice.pdf")      # {'tables': [{'rows': [...]}], ...}
extractor.table_to_csv("invoice.pdf")        # clean CSV of the first table
extractor.extract_text("report.pdf", page=1)

Tests

python -m unittest discover -s tests     # builds its own test PDF, runs anywhere

License

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    PDF extraction that actually works. The only extractor that audits every page. #2 on opendataloader-bench. 5 MCP tools for AI agents: metadata, convert, analyze, batch, structured extraction.
    7
    79
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    This MCP server enables AI agents to view PDFs as accessible HTML with bounding-box citations, and provides tools for layout-aware parsing, schema extraction, cross-document Q&A, and PDF rendering.
    27
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Provides AI agents with comprehensive document parsing capabilities including PDF text extraction, OCR, HTML-to-markdown conversion, table extraction, and summarization, optimized for agent workflows.
    61
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wesseltl/pdf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server