MCP directory
PT

PDF To Text

by github.com/Jim-Panse · v0.7.0 · updated Oct 15, 2026

Extracts PDF text locally, with macOS PDFKit and Vision OCR fallbacks and optional AI retry.

npm

Run it locally

Install the package and point your AI client at it.

npm

npx -y @jim-panse/[email protected]

Environment variables

  • PDF_TO_TEXT_MCP_ROOTrequired

    Required existing directory that defines the root-relative filesystem namespace for PDF input and derived text output.

  • OPENAI_API_KEYsecret

    Optional secret. Enables one AI extraction retry when local extraction is inadequate; omit for local-only operation.

  • OPENAI_MODEL

    Optional OpenAI model used only for AI retry. Defaults to gpt-5.4-mini.

  • AI_MAX_OUTPUT_TOKENS

    Optional cap for all AI-generated output tokens, including non-visible reasoning tokens. Integer minimum 800; defaults to 32000.

  • MAX_PARALLEL_EXTRACTIONS

    Integer concurrency limit from 1 to 32. Defaults to min(os.availableParallelism(), 4).

  • EXTRACTION_QUEUE_CAPACITY

    Integer maximum waiting requests from 0 to 100; zero disables waiting.

  • EXTRACTION_QUEUE_WAIT_MS

    Maximum queue wait in milliseconds, integer 1 through 2147483647. Does not limit active work.

  • WRITE_TEXT

    Optionally save successful extraction text beside the source PDF.

More from github.com/Jim-Panse

More MCP servers