# pdfops-cli [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/KayZedd/pdfops  
**GitHub Stars:** 2  
**npm Downloads (last month):** 73  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/pdfops-cli

## Description
Fast PDF operations for AI agents: CLI and MCP server (text, tables, OCR, redaction, scanning, forms, signatures, stamps, merge, split)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "pdfops-cli": {
    "command": "npx",
    "args": ["-y","pdfops-cli"]
  }
}
```

## Documentation

## What pdfops-cli does

pdfops-cli gives MCP clients access to a broad set of local PDF operations through the `pdfops` command. Each tool accepts JSON-compatible arguments and returns one JSON document, making the interface suitable for agent workflows that need structured results rather than terminal-oriented output.

The tool set covers document inspection, text and table extraction, page rendering, OCR, annotations, signatures, forms, metadata, encryption, sanitization, and PDF creation. It can also combine, split, reorder, rotate, compress, stamp, redact, or modify documents. Redaction removes matching content rather than drawing a visual cover over it, then verifies the result.

## How it works

The MCP process is started over stdio with the `mcp` subcommand. Tool names follow the CLI commands, such as `pdf_info`, `pdf_text`, and `pdf_redact`, and use the corresponding CLI arguments. Relative file paths are interpreted from the server's working directory.

Use `--root` to confine file access to a directory. Paths outside that directory are rejected, including paths embedded in document content. Each MCP call runs in its own process, while commands also operate with memory and time limits. The project tests its commands against a corpus of malformed and hostile PDFs.

## Setup and configuration

The npm package can be run without a global install:

```sh
npx -y pdfops-cli mcp
```

A global npm installation is also available with `npm install -g pdfops-cli`. The npm package acts as a launcher, downloading and checking the platform binary on first use. Node.js 18 or newer is required for the npm installation path. Other distribution options include prebuilt archives, Cargo installation, and Docker.

A basic MCP configuration is:

```json
{
  "mcpServers": {
    "pdfops": {
      "command": "npx",
      "args": ["-y", "pdfops-cli", "mcp"]
    }
  }
}
```

To limit access to one directory, add `"--root", "/path/to/documents"` to the argument list. OCR requires the `tesseract` program. The `ocr-langs` and `ocr-install` commands check available languages and can fetch language data; `ocr-install --engine` can install Tesseract where supported without administrator access.

## Tools and capabilities

The available operations include:

- Inspect PDFs with page counts, dimensions, metadata, encryption status, outlines, forms, annotations, signatures, scripts, attachments, automatic actions, hidden text, and other scan results.
- Extract text, search for strings or regular expressions, inspect layout coordinates and fonts, and read tables as rows, Markdown, or CSV.
- Render pages to PNG, extract embedded images, and run OCR with an optional searchable output copy.
- Create PDFs from Markdown; merge, split, reorder, duplicate, delete, and rotate pages.
- Add stamps, watermarks, headers, footers, page numbers, links, notes, highlights, underlines, images, and QR codes.
- Replace text, redact content, edit metadata, and compress files with optional image re-encoding or downscaling.
- Fill form fields, encrypt or decrypt PDFs, digitally sign documents, and sanitize active content such as scripts, risky actions, attachments, XFA, and media.

## Limitations and notes

OCR is the main feature with an external dependency: Tesseract must be available, along with suitable language data. The npm package requires Node.js 18 or newer, while building from source requires Rust 1.92 or newer. The Docker image includes Tesseract with English support; additional language data can be installed as needed. The server processes local files, so the MCP client's working directory and any configured root determine which paths the agent can use.

_Full upstream README: https://allmcps.com/mcp/pdfops-cli/readme_

