Pdf MCP
Read scientific papers from arXiv, bioRxiv, Zenodo and other archives in an interactive PDF viewer (MCP Apps)
claude mcp add --scope project clio-pdf -- clio-kit mcp-server pdf
Install the launcher first. Restart your client after setup. Configuration locations →
Check the connection
clio-kit doctor --server pdf --connect
Checks prerequisites and tool discovery. Test on known input to verify results. Native backends may require additional setup.
Tools
list_pdfsList available PDFs that can be displayed
read_pdf_bytesRead a range of bytes from a PDF (max 512KB per request). The model should NOT call this tool directly.
display_pdfOpen a PDF in an interactive viewer. Call this ONCE per PDF.
Details
**All follow-up actions go through the `interact` tool** with the returned viewUUID — annotating, signing, stamping, filling forms, navigating, searching, extracting text/screenshots. Calling display_pdf again creates a SEPARATE viewer with a different viewUUID — interact calls using the new UUID will not reach the viewer the user already sees. Returns a viewUUID in structuredContent. Pass it to `interact`: - add_annotations, update_annotations, remove_annotations, highlight_text - fill_form (fill PDF form fields) - navigate, search, find, search_navigate, zoom - get_text, get_screenshot, get_viewer_state (extract content / read selection & current page) - save_as (write annotated PDF to disk) Accepts local files (use list_pdfs), client MCP root directories, or any HTTPS URL. Set `elicit_form_inputs` to true to prompt the user to fill form fields before display.interactInteract with a PDF viewer: annotate, navigate, search, extract text/screenshots, fill forms.
Details
IMPORTANT: viewUUID must be the exact UUID returned by display_pdf (e.g. "a1b2c3d4-..."). Do NOT use arbitrary strings. **BATCHING**: Send multiple commands in one call via `commands` array. Commands run sequentially; results are returned in the same order, one content item per command. If a command fails, the batch stops there and that command's slot contains text starting with `ERROR` — content.length tells you how far it got. TIP: End with `get_screenshot` to verify your changes. **ANNOTATION** — add_annotations with array of annotation objects. Each needs: id (unique string), type, page (1-indexed). **COORDINATE SYSTEM**: PDF points (1pt = 1/72in), origin at page TOP-LEFT corner. X increases rightward, Y increases downward. - US Letter = 612×792pt. Margins: top≈y=50, bottom≈y=742, left≈x=72, right≈x=540, center≈(306, 396). - Rectangle/circle/stamp x,y is the TOP-LEFT corner. To place a 200×30 box at the TOP of the page: x=72, y=50, width=200, height=30. - For highlights/underlines, each rect's y is the TOP of the highlighted region. Annotation types: • highlight: rects:[{x,y,width,height}], color?, content? • underline: rects:[{x,y,w,h}], color? • strikethrough: rects:[{x,y,w,h}], color? • note: x, y, content, color? • rectangle: x, y, width, height, color?, fillColor?, rotation? • circle: x, y, width, height, color?, fillColor? • line: x1, y1, x2, y2, color? • freetext: x, y, content, fontSize?, color? • stamp: x, y, label (any text, e.g. APPROVED, DRAFT, CONFIDENTIAL), color?, rotation? • image: imageUrl (required), x?, y?, width?, height?, mimeType?, rotation?, aspect? — places an image (signature, logo, etc.) on the page. Pass a local file path or HTTPS URL (NO data: URIs, NO base64). Width/height auto-detected if omitted. Users can also drag & drop images directly onto the viewer. TIP: For text annotations, prefer highlight_text (auto-finds text) over manual rects. Example — add a signature image and a stamp, then screenshot to verify: ```json {"viewUUID":"…","commands":[ {"action":"add_annotations","annotations":[ {"id":"sig1","type":"image","page":1,"x":72,"y":700,"imageUrl":"/path/to/signature.png"}, {"id":"s1","type":"stamp","page":1,"x":300,"y":400,"label":"APPROVED"} ]}, {"action":"get_screenshot","page":1} ]} ``` • highlight_text: auto-find and highlight text (query, page?, color?, content?) • update_annotations: partial update (id+type required) • remove_annotations: remove by ids **NAVIGATION**: navigate (page), search (query), find (query, silent), search_navigate (matchIndex), zoom (scale 0.5–3.0) **TEXT/SCREENSHOTS**: • get_text: extract text from pages. Optional `page` for single page, or `intervals` for ranges [{start?,end?}]. Max 20 pages. • get_screenshot: capture a single page as a JPEG image. Requires `page`. • get_viewer_state: snapshot of the live viewer — JSON {currentPage, pageCount, zoom, displayMode, selectedAnnotationIds, selection:{text,contextBefore,contextAfter,boundingRect}|null}. Use this to read what the user has selected or which page they're on. **FORMS** — fill_form: fill fields with `fields` array of {name, value}. **SAVE** — save_as: write the annotated PDF (annotations + form values) to a file. Pass `path` (absolute path or file://) for a new location, or omit `path` to overwrite the original. Set `overwrite: true` to replace an existing file (always required when omitting `path`).submit_page_dataSubmit rendered page data for a get_pages request (used by viewer). The model should NOT call this tool directly.
submit_save_dataSubmit annotated PDF bytes for a save_as request (used by viewer). The model should NOT call this tool directly.
submit_viewer_stateSubmit a viewer-state snapshot for a get_viewer_state request (used by viewer). The model should NOT call this tool directly.
poll_pdf_commandsPoll for pending commands for a PDF viewer. The model should NOT call this tool directly.
save_pdfSave annotated PDF bytes back to a local file. The model should NOT call this tool directly — use interact with action: save_as instead.
Examples
Replace example paths with your own files and check the returned results.
Usage
Available tools: list_pdfs, read_pdf_bytes, display_pdf, interact, submit_page_data, submit_save_data, submit_viewer_state, poll_pdf_commands, save_pdf.
Inspect the tool input schema in your MCP client before calling it. Use a small known input, check the result and any reported errors, then expand to the intended workload.