🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@exactpdf/mcp

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exactpdf/mcp

MCP server for ExactPDF — PDF tools, voice previews, async PDF speech/audiobook jobs, polling, and API credits.

Source
npmnpm
Version
0.2.11
Version published
Weekly downloads
72
-91.59%
Maintainers
1
Weekly downloads
 
Created
Source

@exactpdf/mcp

Model Context Protocol (stdio) server for ExactPDF — production PDF tools for Cursor, Claude Desktop, Codex, and any MCP client.

Use it when an agent needs to inspect, merge, split, rotate, compress, extract, narrate, translate, or export PDFs without writing fragile PDF plumbing.

Design principle: every tool should work on first run, explain credit cost before risky work, return a local output path for files, and expose precise HTTP/API errors when something fails.

Setup

  • Create an API key at exactpdf.com (Max → API keys).
  • Export:
export EXACTPDF_API_KEY="sk_live_…"
# Optional: default https://exactpdf.com
export EXACTPDF_API_BASE="https://exactpdf.com"
# Optional: where API binary outputs are written (default: OS temp dir)
export EXACTPDF_API_OUTPUT_DIR="/tmp"
# Backward-compatible alias:
export EXACTPDF_MERGE_OUTPUT_DIR="/tmp"
  • Add to your MCP config (Cursor → Settings → MCP):
{
  "mcpServers": {
    "exactpdf": {
      "command": "npx",
      "args": ["-y", "@exactpdf/mcp"],
      "env": {
        "EXACTPDF_API_KEY": "sk_live_…"
      }
    }
  }
}

For a local checkout of this monorepo:

"command": "node",
"args": ["/path/to/ExactPDF/packages/exactpdf-mcp/dist/run.js"]

Tools

Safe first run:

1. exactpdf_first_run_checklist
2. exactpdf_account
3. exactpdf_pdf_info(path="/absolute/path/document.pdf")
4. exactpdf_voice_preview(text="Short sample...", voice_style="professional")
5. exactpdf_estimate_speech_cost(path="/absolute/path/document.pdf", mode="audiobook")

Document outputs are saved to EXACTPDF_API_OUTPUT_DIR or your OS temp directory. Paid document tools consume credits only on successful output. Async speech jobs are metered by generated minutes.

ToolEndpointCredits
exactpdf_first_run_checklistlocal guidance0
exactpdf_accountGET /api/v1/account0
exactpdf_pdf_infoPOST /api/v1/pdf-info0
exactpdf_merge_pdfsPOST /api/v1/merge1
exactpdf_merge_and_compress_pdfsPOST /api/v1/merge-compress1
exactpdf_split_pdfPOST /api/v1/split1
exactpdf_rotate_pdfPOST /api/v1/rotate1
exactpdf_compress_pdfPOST /api/v1/compress1
exactpdf_images_to_pdfPOST /api/v1/images-to-pdf1
exactpdf_images_to_pdf_and_compressPOST /api/v1/images-to-pdf-compress1
exactpdf_extract_textPOST /api/v1/extract-text1
exactpdf_pdf_structured_markdownPOST /api/v1/pdf-structured-markdown1
exactpdf_estimate_speech_costlocal estimate0
exactpdf_voice_previewPOST /api/v1/voice-preview0
exactpdf_pdf_to_speechPOST /api/v1/pdf-to-speech1/min
exactpdf_pdf_to_audiobookPOST /api/v1/pdf-to-audiobook1/min
exactpdf_generate_audiobookPOST /api/v1/generate-audiobook1/min
exactpdf_translate_and_speakPOST /api/v1/translate-and-speak3/min
exactpdf_presentation_narrationPOST /api/v1/presentation-narration1/min
exactpdf_job_statusGET /api/v1/jobs/:id0
exactpdf_get_speech_jobGET /api/v1/speech-jobs/:id0
exactpdf_download_audioGET /api/v1/speech-jobs/:id/download0

Tool behavior

Tool familyWhat the agent providesWhat ExactPDF returns
Account / inspectAPI key, local PDF pathJSON balance, page count, metadata
PDF operationsAbsolute local PDF pathsSaved PDF/ZIP path plus remaining credits
Text / MarkdownAbsolute local PDF pathJSON text/Markdown, page count, structured content
Voice previewShort text, voice style/languageSaved MP3/WAV preview, no credit charge
Speech jobsPDF path, page range, style, callback URLjob_id, status URL, pricing estimate
Job polling/downloadjob_idprogress/errors/result URL or saved audio/ZIP

Async audiobook flow:

1. exactpdf_estimate_speech_cost(path="/abs/book.pdf", mode="audiobook")
2. exactpdf_voice_preview(text="Read the first paragraph in an audiobook tone", voice_style="audiobook")
3. exactpdf_generate_audiobook(path="/abs/book.pdf", voice_style="audiobook")
4. exactpdf_get_speech_job(job_id="...", download=false)
5. exactpdf_download_audio(job_id="...") after status is succeeded

exactpdf_pdf_to_speech, exactpdf_pdf_to_audiobook, and exactpdf_generate_audiobook accept optional callback_url and webhook_secret. ExactPDF signs webhook bodies with x-exactpdf-signature: sha256=<hmac> over timestamp.body.

Multilingual speech flow:

1. exactpdf_translate_and_speak(path="/abs/training.pdf", target_language="hi")
2. exactpdf_job_status(job_id="...", download=false)
3. exactpdf_job_status(job_id="...", download=true) after status is succeeded

segmentation_mode="pages" is useful for presentation narration because each PDF page becomes a trackable audio section.

Presentation narration flow:

1. exactpdf_presentation_narration(path="/abs/deck.pdf")
2. exactpdf_job_status(job_id="...", download=true) after status is succeeded

The default ZIP includes one MP3 per PDF page plus manifest.json with page numbers and duration seconds.

Reliability rules for agent builders

  • Always call exactpdf_account once before paid tools.
  • Use absolute file paths. Relative paths are client-dependent and may fail.
  • Use exactpdf_pdf_info before large jobs to confirm the file is readable.
  • Use exactpdf_estimate_speech_cost before speech/audiobook/translation jobs.
  • Use exactpdf_voice_preview before full narration when quality matters.
  • Async jobs are not downloads. Submit, poll, then download after succeeded.
  • If a tool returns isError, show the HTTP status and response body to the user. The API returns structured error details.
  • Keep API keys out of prompts, logs, screenshots, and commits.

Publish checklist

npm run mcp:package:check
cd packages/exactpdf-mcp
npm publish --access public
npx -y mcp-publisher publish --file server.json

The package must exist on the public npm registry before the MCP Registry can verify mcpName.

Docs

License

MIT

Keywords

mcp

FAQs

Package last updated on 02 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts