Run this once. It registers a stdio server named pdfluent in the user configs of Claude Desktop, Claude Code, Cursor and Codex, then tells you to restart the clients. Then ask your client about a PDF in that folder.
It needs Python 3.10 or later and uv. uvx downloads the server and the pdfluent package on first use and caches them. --root names the folder the server may read and write in; repeat it for more folders. The 0.3.0 server code passes its own test suite on Windows, macOS and Linux, on Python 3.10 and 3.13.
Replace /path/to/documents with the folder your PDFs live in.
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"pdfluent": {
"command": "uvx",
"args": ["pdfluent-mcp", "--root", "/path/to/documents"]
}
}
}Add this to ~/.cursor/mcp.json or the project's .cursor/mcp.json.
{
"mcpServers": {
"pdfluent": {
"type": "stdio",
"command": "uvx",
"args": ["pdfluent-mcp", "--root", "/path/to/documents"]
}
}
}From a terminal:
code --add-mcp '{"name":"pdfluent","type":"stdio","command":"uvx","args":["pdfluent-mcp","--root","/path/to/documents"]}'Add this to ~/.codex/config.toml.
[mcp_servers.pdfluent]
command = "uvx"
args = ["pdfluent-mcp", "--root", "/path/to/documents"]| Tool | What it does | Example prompt |
|---|---|---|
extract_markdown | The document as markdown in reading order: headings, list items and tables. Running heads and page numbers are left out. | Summarise ~/Documents/report.pdf. |
extract_text | The plain text layer, page by page, each page behind <!-- page N -->. | Give me the raw text of pages 0 to 2 of contract.pdf. |
extract_tables | One entry per table with page, rows and header_rows. | Pull the tables out of invoice.pdf. |
extract_blocks | Positioned blocks with kind, text, page, bbox and confidence. Also lists the pages whose text layer is missing. | List every heading in manual.pdf with its page. |
get_metadata | Page count, title, author, dates, PDF version, encryption, form fields, signatures, bookmarks, and pages with no text layer. | How many pages does scan.pdf have, and is it encrypted? |
search | The pages that mention a query, with up to three snippets per page. | Which pages of policy.pdf mention retention? |
list_form_fields | Every form field with name, type, value and page. | Which fields does application.pdf have? |
fill_form | Fills the named fields and writes a new file. The input is never changed. | Fill application.pdf with my name and address, save as application-filled.pdf. |
vision_advice | One entry per page with needs_vision and its reasons. | Which pages of scan.pdf need a vision model? |
The server runs over stdio, one process per client, on the pdfluent Python package. It opens no network listener and uploads nothing. It reads and writes only inside the directories you allow, with --root, with PDFLUENT_MCP_ROOTS, or through the roots your client offers. Symbolic links are resolved before the check, so a link inside a root cannot point outside it. Without any root, the server answers every call with a message saying so.
A root is as wide as the directory it names. If your client offers /, your home folder or a whole drive as a root, the server can reach everything you can read. Start it with --root on the folder your PDFs live in and keep the client's roots narrow.
pdfluent-mcp is licensed AGPL-3.0-only or under the PDFluent Commercial Licence, the same as the pdfluent package it runs on. The source is public on GitHub.
One command, and the files stay where they are.