PDFCabin
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PDFCabin — Self-Hosted PDF Toolkit & MCP Server
Your PDFs. Your server. Your rules. Your documents stay on your infrastructure.
English · Русский
A local document workshop: merge, split, rotate and compress PDFs, run OCR (Russian + English) on your scans, then full-text search across everything — through a web UI or directly from Claude or any other MCP-capable AI agent. One Docker container, one port (8420), zero outbound requests, no telemetry.
Why PDFCabin?
Nothing leaves your machine. All processing runs locally in a single container. No cloud calls, no analytics, no telemetry — even the web UI ships without a single external URL (no CDN, system fonts only).
Russian + English OCR out of the box. Built on Tesseract and OCRmyPDF: scanned PDFs get a searchable text layer, and everything recognized becomes full-text searchable.
Your AI agents get tools. A built-in MCP server (streamable HTTP) exposes 15 focused tools — Claude, or any MCP client, can import, create, merge, compress, OCR, read, rename and search your documents without a single file leaving your server.
Related MCP server: pdfeverything
Quick start
docker run -d -p 8420:8420 -v ./docs:/docs ghcr.io/legitantiaa/pdfcabin:latestOpen http://localhost:8420 and drop some PDFs. Everything the app writes — your files and the search index index.db — stays in the ./docs folder you mounted.
To protect the instance with a token:
docker run -d -p 8420:8420 -v ./docs:/docs -e PDFCABIN_TOKEN=change-me ghcr.io/legitantiaa/pdfcabin:latestOr build from source:
git clone https://github.com/LegitAntiAA/pdfcabin.git
cd pdfcabin
docker compose up --buildSecurity note: inside Docker the app listens on
0.0.0.0:8420. Don't expose it bare to the internet — setPDFCABIN_TOKENand put it behind a reverse proxy.
Features
The bundled web UI (vanilla JS, no build step, no CDN) gives you a drag-and-drop upload zone, a thumbnail grid with OCR status badges, batch actions (merge / compress / OCR / delete), a jobs drawer and a search bar — dark and light themes, English and Russian interface.
REST API
Method | Endpoint | Description |
|
| Status, version, available OCR languages, Ghostscript presence |
|
| List documents ( |
|
| Upload PDFs — validated by |
|
| Metadata: pages, size, encrypted, title, author |
|
| PNG page thumbnail |
|
| Download the original file |
|
| Delete a file — moves it to |
|
| Merge PDFs in the given order |
|
| Split by page ranges ( |
|
| Rotate pages by 90 / 180 / 270 degrees |
|
| Delete pages |
|
|
|
|
| Extract text page by page |
|
| Queue OCR ( |
|
| Job status; the list returns active jobs first, then finished ones |
|
| Full-text search over indexed pages, with snippets |
|
| Number of indexed files and pages |
|
| Donation addresses configured via env (usually empty) |
Honest note on search: it matches exact word forms (SQLite FTS5, unicode61 tokenizer) — no stemming. Searching Russian «договор» will not match «договора».
MCP tools
Tool | Description |
| What's in the library, with page counts |
| Pages, size, encrypted, has text layer |
| Import a PDF from a local path on this machine into the library |
| Make a new PDF from plain text (unicode-safe) |
| Save a library PDF to any local path on this machine |
| Move a PDF to the library trash (same as UI Delete) |
| Rename a PDF; the search index follows automatically |
| Merge PDFs in the given order |
| Split by ranges or every N pages |
| Rotate pages 90/180/270 into a new file |
| Drop pages into a new file |
| Compress; reports the savings in percent |
| OCR — blocks until the background queue finishes, then indexes the result |
| "Read me this PDF" |
| Full-text search with snippets (path + page) |
Paths in MCP tools are relative to the documents folder — the agent never needs to know your mounts. The MCP endpoint is served by the same app and port as the UI and the REST API, and PDFCABIN_TOKEN (when set) applies to it too.
MCP connection
MCP transport: streamable HTTP, URL http://localhost:8420/mcp.
Claude Desktop
claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"pdfcabin": {
"url": "http://localhost:8420/mcp"
}
}
}Claude Code
claude mcp add --transport http pdfcabin http://localhost:8420/mcpCursor
~/.cursor/mcp.json:
{
"mcpServers": {
"pdfcabin": {
"url": "http://localhost:8420/mcp"
}
}
}With a token
If PDFCABIN_TOKEN is set, add an Authorization: Bearer header:
{
"mcpServers": {
"pdfcabin": {
"url": "http://localhost:8420/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}claude mcp add --transport http pdfcabin http://localhost:8420/mcp --header "Authorization: Bearer YOUR_TOKEN"Any other MCP client speaks the same JSON shape — point it at http://localhost:8420/mcp.
Configuration
Variable | Default | Description |
|
| Root folder for all PDFs and the search index ( |
| empty — no auth | Bearer token for |
|
| docker compose sets |
|
| HTTP port |
|
| Available OCR languages (must match the installed tesseract language data) |
|
| Upload size limit |
Screenshots






Development
Run locally without Docker:
Python 3.11+
System packages: Tesseract OCR with the
rusandenglanguage data, and Ghostscript (used forstrongcompression)
pip install -e ".[dev]"
uvicorn app.main:app --port 8420Files live in ./docs by default (override with PDFCABIN_DOCS_DIR).
pytest # full suite; OCR tests are marked `slow` and need tesseract with the configured languages
pytest -m "not slow" # skip the OCR tests
ruff check . # lintRoadmap
v0.1 (this scope): merge / split / rotate / delete pages / compress / OCR (rus+eng) / full-text search / 15 MCP tools / web UI / Docker.
v0.2: watermark, password protect/unlock, DOCX→PDF (optional, as a separate image), drag-and-drop page reordering in the UI, a redo-OCR button, more OCR languages.
v0.3: watch-folder (auto-OCR of new files), webhooks, read-only REST keys, export to Paperless-ngx.
v1.0: search with stemming (Russian), PWA.
Donate
PDFCabin is free and will stay free. If it saves you time, you can support the project:
Network | Address |
BTC |
|
Ethereum (ETH) |
|
USDT (ERC-20) |
|
USDT (TRC-20) |
|
TON |
|
License
MIT.
Built on Tesseract OCR, OCRmyPDF, pikepdf, FastMCP and Ghostscript. Ghostscript is AGPL-licensed and invoked by PDFCabin as a separate process.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
PDF tools for AI agents: validate, extract, merge, split, compress, OCR, sign and redact.
13 stateless PDF tools for AI agents: merge, split, rotate, compress, watermark, redact, flatten, repair, add page numbers and fill PDF forms. Files are processed in memory and nothing is stored. Part of FreeDailyPro's 211+ MCP tools; trial key with 20,000 calls/month at freedailypro.com/developers.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceTransforms PDF collections into a searchable knowledge base using TF-IDF indexing and proximity matching. It enables users to search documents, retrieve specific page content, and manage document libraries through natural language via MCP clients.5-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to perform 13 PDF operations (merge, split, compress, watermark, encrypt, and more) on local files via MCP.3-
- FlicenseNot gradedqualityDmaintenanceIndexes PDF documents into Qdrant and exposes semantic search as MCP tools, enabling RAG-based interactions with your documents.-
- AlicenseAqualityCmaintenanceEnables AI agents to parse PDFs and search local document context through multimodal extraction and vector-based retrieval, all exposed as MCP tools.7MIT