MCP Server ยท REST API Live since Aug 2026

๐Ÿ“„ PDF Slim API

Server-side PDF compression powered by MuPDF. Compress any PDF to an exact target size (50KB, 1MB, 5MB...) with one call โ€” built for AI agents and developers.

Why PDF Slim API

For AI Agents

  • Native MCP endpoint โ€” plug into Claude, Hermes, Cursor
  • Self-describing tools: compress / optimize / inspect
  • Free 20 calls/day per IP for integration testing
  • Error messages carry human-readable guidance

For Developers

  • Simple REST: POST file โ†’ get compressed PDF
  • Target-size compression (not just "less")
  • 100MB file support on paid plans
  • No signup to try โ€” anonymous tier works immediately

For End Users

  • No uploads to third parties
  • Compression quality comparable to desktop tools
  • 93% size reduction on typical documents
  • Free website: pdfslim.app (browser-based)

Quick Start (REST)

POST/api/v1/compress?target=500000

Upload a PDF as the raw request body. Get the compressed PDF back with metadata headers.

curl -X POST "https://api.pdfslim.app/api/v1/compress?target=500000" \
  --data-binary @input.pdf \
  -o output.pdf

# Response headers:
# X-Pdf-Reduction: 82.3%
# X-Pdf-Reached-Target: true
# X-Pdf-Pages: 12
POST/api/v1/inspect

Get page count, size, and password status before processing.

curl -X POST "https://api.pdfslim.app/api/v1/inspect" \
  --data-binary @input.pdf
# โ†’ {"pages":12,"size_bytes":5821000,"size_mb":5.55,"needs_password":false}
POST/api/v1/optimize

Lossless optimization (garbage collection + stream re-compression).

Quick Start (MCP โ€” for AI agents)

Point any MCP client at:

https://api.pdfslim.app/mcp

Tools exposed:

ToolPurpose
compress_pdfCompress to target size (base64 in, base64 + stats out)
optimize_pdfLossless optimization
inspect_pdfPage count / size / password check
๐Ÿ’ก AI agents: the tool descriptions include quota and upgrade guidance, so your agent can tell users exactly how to handle large files or quota limits.

Auth & Limits

PlanCallsMax filePrice
Anonymous20 / day / IP10 MBFree
Starter Key5,000 / month100 MB$9.9 / month

Send your key: Authorization: Bearer YOUR_KEY

curl -X POST "https://api.pdfslim.app/api/v1/compress?target=1000000" \
  -H "Authorization: Bearer YOUR_KEY" \
  --data-binary @input.pdf -o output.pdf

Starter

$9.9/month
  • 5,000 calls / month
  • 100 MB max file size
  • All 3 endpoints
  • Monthly auto-renew
Get a key

Free Website

$0
  • Browser-based, files never leave device
  • All tools: compress / merge / split / more
  • No account needed
Use the website

Why MuPDF

PDF Slim API runs MuPDF (the C engine behind Ghostscript) compiled to WebAssembly on Cloudflare Workers. It renders each page and re-encodes at tuned quality/resolution โ€” the same strategy desktop tools use, with pixel-level control. Typical results: 82โ€“93% size reduction on scanned documents.