Skip to main content

PDF to Markdown engine for LLMs. Smart table extraction, OCR, MCP server for AI IDEs.

Project description

thinkpdf

Convert PDFs to clean Markdown for LLMs. Includes MCP Server for AI coding assistants.

Features

  • PDF to Markdown conversion
  • MCP Server for AI assistants (Cursor, Antigravity)
  • GUI included
  • Batch conversion with parallel workers
  • Optional: Docling for better table extraction

Installation

pip install thinkpdf

For GUI:

pip install thinkpdf[gui]

Quick Start

GUI

thinkpdf-gui

CLI

thinkpdf document.pdf                    # Convert single file
thinkpdf document.pdf -o output.md       # Specify output
thinkpdf folder/ --batch                 # Convert all PDFs in folder
thinkpdf folder/ --batch --workers 4     # Parallel conversion

Python API

from thinkpdf import convert

markdown = convert("document.pdf")
print(markdown)

MCP Server Setup

Run this to see the config:

thinkpdf setup

Add to ~/.cursor/mcp.json or ~/.gemini/antigravity/mcp.json:

{
  "mcpServers": {
    "thinkpdf": {
      "command": "python",
      "args": ["-m", "thinkpdf.mcp_server"]
    }
  }
}

Then ask your AI: "Read the PDF at D:\docs\manual.pdf"

MCP Tools

Tool Description
read_pdf Convert and return content directly (no file created)
convert_pdf Convert and save to file
get_document_info Get PDF metadata

Requirements

  • Python 3.10+
  • PyMuPDF (included)
  • Docling (optional, for best quality)

License

AGPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thinkpdf-1.0.2.tar.gz (63.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thinkpdf-1.0.2-py3-none-any.whl (68.8 kB view details)

Uploaded Python 3

File details

Details for the file thinkpdf-1.0.2.tar.gz.

File metadata

  • Download URL: thinkpdf-1.0.2.tar.gz
  • Upload date:
  • Size: 63.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for thinkpdf-1.0.2.tar.gz
Algorithm Hash digest
SHA256 80a573a0377bd37467ed8ea3146e8a6929f6cc52ed27cd4167ba4b2e493f9e00
MD5 fdb8a3edbef664a3c8aca6d215b8d94d
BLAKE2b-256 1d72282db2eb50ba8c75c27ed4fecb5a24185fa2776712efc61cafb2741e3f0c

See more details on using hashes here.

File details

Details for the file thinkpdf-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: thinkpdf-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 68.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for thinkpdf-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 de73086ac0d00f1384051d679c18805273629fc67752a9f0f56a19a140896cc0
MD5 c57abd032276423ab39bd31d9c6804ae
BLAKE2b-256 c1a3fc22349e92ed638cc665ee3c2698f96dc75ec91efd4ddcd82ebf21e291a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page