Skip to main content

MCP server for layout-aware PDF to Markdown conversion via Docling

Project description

pdf-porter

Layout-aware PDF to Markdown for Claude — one tool, zero config, five minutes to set up. Uses Docling to preserve tables, multi-column layouts, and document structure that Claude's native PDF ingestion loses.

If you want the full Docling toolset, see docling-mcp by IBM Research. pdf-porter is intentionally minimal: one tool, one job.

Installation

Use with Claude Desktop (recommended)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "pdf-tools": {
      "command": "uvx",
      "args": ["pdf-porter"]
    }
  }
}

Then restart Claude Desktop. The first time Claude calls the tool, Docling will download its model weights (~500MB). Subsequent calls are fast.

Development

git clone https://github.com/benmazzotta/pdf-porter
cd pdf-porter
uv sync --dev
uv run pytest

Tool Reference

pdf_to_markdown

Parameter Type Default Description
path str required Absolute or relative path to a PDF file
save_output bool False If True, writes a .md file next to the PDF and returns the output path

Returns: Markdown string, or "Saved to: <path>" when save_output=True, or "Error: <message>" on failure.

Known Limitations

  • First run: Docling downloads model weights (~500MB). You'll see a pause. Subsequent runs are fast.
  • Scanned PDFs: OCR mode is not enabled in v0.1. Image-only PDFs will return empty or minimal text.
  • Windows: Path handling not validated on Windows.

License

MIT. See LICENSE.

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

pdf_porter-0.1.0.tar.gz (173.7 kB view details)

Uploaded Source

Built Distribution

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

pdf_porter-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pdf_porter-0.1.0.tar.gz.

File metadata

  • Download URL: pdf_porter-0.1.0.tar.gz
  • Upload date:
  • Size: 173.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdf_porter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c94871972405fe95e53b79ce98c3559b767d0da4f72f96ea24a3942f03fe710a
MD5 0a903d244b044f20fe8ad1a3a5e0a7ba
BLAKE2b-256 cb3add11342f48d9946ed07dbfc7e8d0717738aed4834ec3f7f60dc792049fd9

See more details on using hashes here.

File details

Details for the file pdf_porter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pdf_porter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdf_porter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fdbaecd9224044e1b577832a6434da20090d3e214e3d3a0e59ad46f7c4184d0
MD5 5f9f1df5885541cd9f8cc3955c415fec
BLAKE2b-256 5b71388225df813f4daf34ce2e8dfd6d22eff44a6490bd7645522110e8172c0f

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