Claude Code
claude mcp add pdf-decompiler -- npx -y pdf-decompiler mcp --allow-root /path/to/pdfs
All clients below connect over stdio to the same 10-tool server (Schema v4.0.0) on Node.js 22 or 24. Replace /path/to/pdfs with the directory your agent is allowed to read.
npx -y pdf-decompiler setup --client claude-code --allow-root ./pdfs
npx -y pdf-decompiler setup --client codex --allow-root ./pdfs
npx -y pdf-decompiler setup --client claude-desktop --allow-root ./pdfs
npx -y pdf-decompiler setup --client vscode --allow-root ./pdfs
npx -y pdf-decompiler setup --client cursor --allow-root ./pdfs
Select your MCP host below. Each configuration launches pdf-decompiler mcp over stdio with workspace root confinement.
claude mcp add pdf-decompiler -- npx -y pdf-decompiler mcp --allow-root /path/to/pdfs
Config path: %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
{
"mcpServers": {
"pdf-decompiler": {
"command": "npx",
"args": ["-y", "pdf-decompiler", "mcp", "--allow-root", "/path/to/pdfs"]
}
}
}
codex mcp add pdf-decompiler -- npx -y pdf-decompiler mcp --allow-root /path/to/pdfs
[mcp_servers.pdf-decompiler]
command = "npx"
args = ["-y", "pdf-decompiler", "mcp", "--allow-root", "/path/to/pdfs"]
Project config .cursor/mcp.json or global ~/.cursor/mcp.json.
{
"mcpServers": {
"pdf-decompiler": {
"command": "npx",
"args": ["-y", "pdf-decompiler", "mcp", "--allow-root", "/path/to/pdfs"]
}
}
}
{
"mcpServers": {
"pdf-decompiler": {
"command": "npx",
"args": ["-y", "pdf-decompiler", "mcp", "--allow-root", "/path/to/pdfs"]
}
}
}
VS Code uses "servers" with "type": "stdio" in .vscode/mcp.json, not "mcpServers".
{
"servers": {
"pdf-decompiler": {
"type": "stdio",
"command": "npx",
"args": ["-y", "pdf-decompiler", "mcp", "--allow-root", "${workspaceFolder}/pdfs"]
}
}
}
agy)agy mcp add pdf-decompiler -- npx -y pdf-decompiler mcp --allow-root /path/to/pdfs
doctor diagnosticsroots/list confinementWithout --allow-root, all local file reads are denied. Symlinks and paths outside configured allow-roots (or inside --deny-root) are rejected with path_denied.
When an MCP client supports roots/list, workspace roots act as a monotonic intersection: they can further confine access to the active workspace, and never widen --allow-root.
pdf-decompiler doctorRun doctor before troubleshooting client issues. It checks Node version, --allow-root directories, state/cache initialization, PDFium WASM startup, Tesseract/ONNX availability, and optional verification env vars without exposing secrets.
npx -y pdf-decompiler doctor --allow-root /path/to/pdfs
Tesseract CLI is used by default for scanned pages. If you want zero-Python PP-OCRv5 inside Node without bundling ~293 MB of native binaries for everyone, install the optional onnxruntime-node peer dependency and download the SHA-256-verified models:
npm install onnxruntime-node
npx -y pdf-decompiler ocr install
npx -y pdf-decompiler mcp --ocr-engine onnx --allow-root /path/to/pdfs
Pass --dir <path> to ocr install if you want to store models in a custom directory.