
Benspdf
io.github.benbergnerPublished by GitHub account benbergnerv0.3.0Updated Oct 24, 2026
Read PDFs locally: text, pages, metadata, scan detection, layout, permissions, render, OCR.
Overview
Reads and inspects local PDF files — text, pages, metadata, layout, permissions, rendering and OCR — without uploading them.
- What you can do
- BensPDF exposes PDF tools over MCP: page counts, document metadata, text extraction page by page, page layout and boxes, encryption and permission checks, page rendering to images, and OCR for scans, optionally adding a searchable text layer. It also generates throwaway test PDFs, saves results to disk with an export tool, and lists or discards temporary artifacts. New files go to a scratch folder and are referenced by short ids that other tools accept in place of paths.
- When to use it
- Useful when an assistant needs to answer questions about PDFs on your machine, such as page counts, contents, metadata or whether a file is a scan needing OCR. Also handy for inspecting permissions or rendering pages to images before deciding what to do with a document.
- Requirements
- Runs locally as a stdio process, launched with uvx benspdf-mcp, so uv (and a suitable Python fetched on first run) is needed. OCR requires the tesseract system program, installed separately and only checked when pdf_ocr is called. No accounts, API keys or headers are declared. The scratch folder defaults to ~/.benstools/work and can be changed with BENSTDF_WORKSPACE.
Installation
In SourceWeft
- Open Benspdf in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
BensPDF
PDF tools for AI agents. Your files never leave your machine.
[PyPI] [Python versions] [License] [MCP registry]
Install in one click
Ben's PDF tools for AI agents, exposed over the Model Context Protocol (MCP).
[!NOTE] Your PDFs are read on your own machine and never uploaded. With a hosted model your questions still reach that model; pair the tools with a local Ollama model and nothing leaves the machine at all.
Works with Claude Desktop, Claude Code, VS Code, Kiro, Cursor, the ChatGPT desktop app, and any other MCP client. The one-click buttons above need uv; for every other client, or to do it by hand, see Setup.
Tools
Every tool but one needs nothing beyond the package. pdf_ocr uses
tesseract, a system program rather
than a Python package, and only looks for it when you actually call it — so
install it if and when you want OCR (brew install tesseract, sudo apt install tesseract-ocr, or winget install UB-Mannheim.TesseractOCR), and everything else
works either way.
Where results go
When a tool makes a new PDF, it goes into a scratch folder instead of your own
folders, and you get back a short id like art_a1b2c3d4.pdf. Tools accept those
ids anywhere they accept a file path, so several steps can be chained together.
Results carry the artifact's path as well as its id, so you can open a rendered
page or an intermediate file straight away without exporting it first.
export is the only tool that writes into your folders, so nothing shows up
until you ask for it. Each time the server starts it clears out scratch files
older than 7 days. Set BENSTOOLS_WORKSPACE to put the scratch folder somewhere
other than ~/.benstools/work.
Setup
Install uv
once, then point your client at uvx benspdf-mcp and uv fetches the package,
plus a suitable Python, on first run.
On macOS, brew install uv works too.
Add the server to your client with one of the configs below, then restart the server from your client's UI. Once connected, just ask in plain language:
How many pages are in ~/Downloads/report.pdf?
Claude Desktop
Edit claude_desktop_config.json, which lives at
~/Library/Application Support/Claude/ on macOS and %APPDATA%\Claude\ on
Windows. You can also open it from Settings → Developer → Edit Config.
Claude Code
One command, no config file. Add --scope user to enable it everywhere rather
than just the current project.
Check it connected with claude mcp list.
VS Code
.vscode/mcp.json in your workspace, or the same file in your user profile.
Note VS Code uses servers rather than mcpServers, and wants an explicit
type.
Kiro
.kiro/settings/mcp.json in your workspace, or ~/.kiro/settings/mcp.json to
enable it everywhere. autoApprove skips the confirmation prompt for tools you
trust.
Cursor
The button at the top does this for you. By hand, it's ~/.cursor/mcp.json to
enable it everywhere, or .cursor/mcp.json in a project.
Windsurf
~/.codeium/windsurf/mcp_config.json. You can also reach it from Cascade:
Settings → Cascade → Manage MCPs → View raw config, which is worth using
since the path has moved between versions.
Continue
~/.continue/config.yaml, or a .yaml file under .continue/mcpServers/ in a
project. Continue is the one client here that doesn't take the JSON shape above:
its config is YAML, and mcpServers is a list rather than an object keyed by name.
ChatGPT desktop app, Codex CLI, Codex IDE extension
All three are Codex clients and share one config file, ~/.codex/config.toml,
so adding the server once covers all of them. Note this one is TOML, not JSON.
Any other MCP client
Almost every client uses the same JSON as Claude Desktop above — an mcpServers
object, with command set to uvx and args to ["benspdf-mcp"]. Some want an
explicit "type": "stdio"; adding it is harmless where it isn't required.
If a client just asks for a command to run, it's:
Fully offline with Ollama
The clients above keep your PDFs local, but they answer using a hosted model. Pair the tools with a local model instead and nothing leaves your machine.
You'll need Ollama with a model pulled, plus this package:
Then run the bundled CLI:
python -m benspdf.cli does the same thing, handy from a source checkout.
Reference
Each tool's own description tells your client what it does and when to use it, so in normal use there is nothing to look up. If you want the detail — every field a tool returns, and the reasoning behind the answers it gives — see the tool reference.
To work on the code, see CONTRIBUTING.md.
License
Apache 2.0
Source: README.md at commit b446478
Tools
0Version history
1- v0.3.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts