# @niubai/pdfedit-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/zp130221/pdfedit-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 2485  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/niubai-pdfedit-mcp

## Description
MCP server for the PDF Edit API: replace, redact, insert and read text in existing PDFs.

## Tools
Capabilities this server exposes over MCP:

- **pdf_edit** — Edit an existing PDF in place: replace, delete, redact or insert text, fill form fields, stamp an image (a signature, a chop) into a box or remove one, keeping the original layout, fonts and everything you did not point at. `edits[]` is taken exactly as the API takes it (`op`, `scope`, `match`, `fit`), and the result carries up to 3 before/after previews of the pages that changed. To change text on one page only, set `scope.pages`; to pick one of several identical matches, use `scope.after` with nearby text or `scope.occurrence`. Use `op: 'redact'` when the text must be unrecoverable.
- **pdf_batch** — Apply the same edits to one template PDF once per record, producing one output document per record — a mail merge over an existing PDF. Returns a `job_id`: call `pdf_job` with it for the per-record results. To change text on one page only, set `scope.pages`; to pick one of several identical matches, use `scope.after` with nearby text or `scope.occurrence`. Use `op: 'redact'` when the text must be unrecoverable.
- **pdf_find** — Read the text of a PDF: every span with its page, position, font and span id, optionally filtered by `query` (the same four `match` modes an edit uses) and `pages`, over the `content`, `forms` and `annotations` layers. Paginated: pass the returned `next_cursor` back as `cursor` for the next page. Use it before `pdf_edit` to check what a document actually says and to pick the `scope` that selects the match you mean.
- **pdf_preview** — Render one page of a PDF as a PNG image block, optionally cropped to `region` and with rectangles drawn over `highlight`. Use it to see a page before editing it, or to check the result afterwards.
- **pdf_job** — The result of an async edit or a batch, by `job_id`: the same body `pdf_edit` returns once the job is done, plus `progress` while it is still queued or running, and `records` for a batch.

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

```json
"mcpServers": {
  "pdfedit-mcp": {
    "command": "npx",
    "args": ["-y","@niubai/pdfedit-mcp"]
  }
}
```

## Documentation

## What @niubai/pdfedit-mcp does

@niubai/pdfedit-mcp provides an agent-facing interface to the Niubai PDF Edit API at `https://api.niubai.vip`. It works with PDFs that already exist and exposes operations for reading text, replacing text, deleting content, applying redactions, inserting text, and filling forms.

The service is designed for edits that should preserve the source document's appearance. Changes retain the original fonts and layout, and each edit is checked before the resulting file is returned. The local MCP workflow writes the edited PDF next to the input file and provides a before-and-after image for every change, giving an agent a way to inspect the result.

## How it works

The npm package runs as a local stdio MCP server. An MCP client starts it with `npx`, and the agent sends PDF editing requests through the exposed interface. Local file paths can be used with this setup.

A hosted MCP endpoint is also available for web clients that cannot run a local process. That endpoint accepts PDF URLs rather than local files:

`https://pdfedit-mcp-remote.niubai-pdfedit-remote-worker.workers.dev/mcp`

The service can be tried without an API key, with a limit of 20 pages per day per IP. Outputs from that no-key mode are marked `SAMPLE`. A free API key increases the allowance to 200 pages per month and removes the watermark from ordinary documents.

## Setup and configuration

Install and register the package with an MCP client using:

```bash
npx -y @niubai/pdfedit-mcp
```

For Claude Code, the registration command is:

```bash
claude mcp add pdfedit -- npx -y @niubai/pdfedit-mcp
```

Cursor, VS Code, and Claude Desktop can use the equivalent stdio configuration:

```json
{
  "pdfedit": {
    "command": "npx",
    "args": ["-y", "@niubai/pdfedit-mcp"]
  }
}
```

Set `PDFEDIT_API_KEY` when using an API key. The package also has an agent-skill distribution for environments without Node.js. Install it with `npx skills add zp130221/pdfedit-mcp`; the skill uses a standard-library-only Python script.

## Tools and capabilities

- Read text from existing PDF files.
- Replace text while maintaining the document's visual structure.
- Delete or redact selected content.
- Insert text into an existing PDF.
- Fill PDF forms.
- Return edited files and visual before/after evidence for changes.

## Limitations and notes

The no-key trial is limited to 20 pages per day per IP, and its generated outputs carry a `SAMPLE` mark. The free keyed allowance is 200 pages per month. The hosted endpoint is intended for clients that can provide PDF URLs, while the local server handles local files.

The repository and client components are MIT-licensed. The hosted Niubai API is a proprietary service. Documents are deleted within 24 hours and are not used for training.

_Full upstream README: https://allmcps.com/mcp/niubai-pdfedit-mcp/readme_

