Process PDF documents using the QkConvert API. Use when the user asks to "merge PDFs", "split a PDF", "compress a PDF", "extract text from PDF", "convert PDF to images", "add watermark to PDF", "create PDF from images", "convert text to PDF", "protect a PDF", "password protect PDF", "convert Word to PDF", or "convert Office to PDF".
Process PDF files via QkConvert. Costs 2 credits per request.
Check that QKCONVERT_API_KEY is set by running test -n "$QKCONVERT_API_KEY" && echo "set" || echo "not set" in bash. If not set, tell the user:
Your QkConvert API key is not set. To fix this:
- Sign up free at https://qkconvert.dev/portal/signup
- Create an API key in the dashboard
- Set the env var permanently:
- Mac/Linux: Add
export QKCONVERT_API_KEY=sk_live_...to~/.bashrcor~/.zshrc- Windows: Run
setx QKCONVERT_API_KEY sk_live_...in CMD or PowerShell- Restart Claude Code
Do not proceed until the key is confirmed set.
Do not call the MCP tools directly — the OpenAPI-to-MCP bridge cannot send multipart/form-data, so all tool calls arrive with empty content. Always use curl via the Bash tool:
curl -s -X POST https://qkconvert.dev/api/v1/doc/{endpoint} \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "file=@{input_file}" \
-F "options={json_options}" \
-o {output_file}
Rules:
-s (silent)-o for binary output (PDF, image, ZIP)file for document endpoints-F "options={\"pages\":\"1-5\"}"-F "file=@..." fieldscurl -s -X POST https://qkconvert.dev/api/v1/doc/merge \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]" \
-o merged.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/split \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "options={\"pages\":\"1-5,8,10-12\"}" \
-o extracted.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/compress \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-o compressed.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/watermark \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "options={\"text\":\"DRAFT\",\"opacity\":0.3,\"font_size\":48}" \
-o watermarked.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/text \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]"
curl -s -X POST https://qkconvert.dev/api/v1/doc/to-image \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "options={\"output_format\":\"png\",\"dpi\":300,\"pages\":\"1-3\"}" \
-o pages.zip
curl -s -X POST https://qkconvert.dev/api/v1/doc/from-images \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]" \
-o scanned.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/text-to-pdf \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "options={\"font_size\":12,\"page_size\":\"a4\"}" \
-o document.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/metadata \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]"
curl -s -X POST https://qkconvert.dev/api/v1/doc/protect \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-F "options={\"owner_password\":\"secret\",\"user_password\":\"open123\",\"allow_print\":true,\"allow_copy\":true,\"allow_modify\":false,\"allow_annotate\":true}" \
-o protected.pdf
curl -s -X POST https://qkconvert.dev/api/v1/doc/office-to-pdf \
-H "Authorization: Bearer $QKCONVERT_API_KEY" \
-F "[email protected]" \
-o report.pdf
Accepts: DOCX, XLSX, PPTX, DOC, XLS, PPT, ODT, ODS, ODP, RTF. No options needed.
| Parameter | Type | Endpoints | Default | Description |
|---|---|---|---|---|
pages | string | split, to-image | all | "1-5", "2,4,6", "1-3,8" (1-based) |
text | string | watermark | - | Max 500 chars |
opacity | 0.0-1.0 | watermark | 0.3 | Transparency |
font_size | 1-500 | watermark, text-to-pdf | 48/12 | Points |
color | string | watermark | "#888888" | Hex color |
rotation | float | watermark | 45 | Degrees |
dpi | 72-600 | to-image | 150 | Render resolution |
output_format | string | to-image | "png" | "png" or "jpeg" |
page_size | string | text-to-pdf | "a4" | "a4", "letter", "legal" |
owner_password | string | protect | - | Required. Owner password for full access |
user_password | string | protect | "" | Optional. Password to open the PDF |
allow_print | bool | protect | true | Allow printing |
allow_copy | bool | protect | true | Allow copying text |
allow_modify | bool | protect | false | Allow modifying content |
allow_annotate | bool | protect | true | Allow annotations |
Report: operation, page count (if applicable), file sizes, output path.