Listed from the MCP registry; nobody on Odel publishes it.
Redact or anonymize PDFs: black boxes or consistent [Person 1] tags. EU/Swiss, no AI training.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y redact-pdf-mcp
MCP client config
{
"mcpServers": {
"redact-pdf": {
"command": "npx",
"args": [
"-y",
"redact-pdf-mcp"
]
}
}
}An MCP server that permanently redacts PII from PDFs. Give an agent a PDF, get back a PDF with the sensitive text removed from the file — not covered with a black rectangle that anyone can select, copy, or delete.
Most "redaction" MCP servers scrub PII out of prompt text. This one takes a real document and returns a real redacted document.
It also anonymizes. With mode: "pseudonymize" every person, company and address becomes a
consistent tag such as [Person 1] instead of a black box, so the document stays readable
(e.g. before pasting a contract into ChatGPT or Claude), and you get the tag → original table to
restore the names.
claude mcp add redact-pdf -- npx -y redact-pdf-mcp
Then ask: "Redact the personal data in ~/Documents/contract.pdf", or "Anonymize ~/Documents/contract.pdf with placeholders so I can paste it into an AI".
You are sending the document the agent is meant to protect, so this comes first.
ephemeral retention.
The redacted output is kept for your account's retention window (14 days by default,
configurable) and can be purged at any time with DELETE /v1/jobs/{job_id}.Details: redact-pdf.ai/security · privacy policy
An agent can find names in text. It cannot make a PDF safe on its own:
Prompts that work as-is once the server is installed:
pii_excluded_terms for the company name and fans
out with redact_pdf.The server ships a keyless tool, try_demo. Give it a file and it redacts the first
page for real — no key, no account — and tells the agent what it found:
You: Use the redact-pdf server's try_demo tool on ~/Documents/contract.pdf.
Claude: Redacted the first page of contract.pdf (4 pages). Personal data removed on that page: Person, Email. Here is the redacted page (link valid 7 days). To redact all 4 pages, a free account gets the first document (up to 5 pages) done in full, no card.
Call it with no file and it runs a built-in synthetic sample instead, which is the zero-configuration connectivity check. Same thing from a terminal, no install:
curl https://www.redact-pdf.ai/v1/demo
curl -F file=@contract.pdf https://www.redact-pdf.ai/v1/demo/redact
mode: "pseudonymize" replaces each entity with a
consistent tag ([Person 1], [Org 1], [Address 1]...), identical on every page and for every variant of
a name, so the document stays readable for a colleague or another AI. The text is still
removed, not covered, and redact_pdf_and_wait also returns the tag → original table (CSV).retention: "studio" keeps the original so a
person can check and adjust the masks before export.claude mcp add redact-pdf --env REDACT_PDF_API_KEY=your_key -- npx -y redact-pdf-mcp
claude_desktop_config.json:
{
"mcpServers": {
"redact-pdf": {
"command": "npx",
"args": ["-y", "redact-pdf-mcp"],
"env": { "REDACT_PDF_API_KEY": "your_key" }
}
}
}
.cursor/mcp.json:
{
"mcpServers": {
"redact-pdf": {
"command": "npx",
"args": ["-y", "redact-pdf-mcp"],
"env": { "REDACT_PDF_API_KEY": "your_key" }
}
}
}
code --add-mcp '{"name":"redact-pdf","command":"npx","args":["-y","redact-pdf-mcp"],"env":{"REDACT_PDF_API_KEY":"your_key"}}'
Get an API key at redact-pdf.ai/sign-up. A free account
gets its first document (up to 5 pages) redacted in full, no card. Without a key,
try_demo still works; everything else will tell the agent to ask you for one.
A client that can't pass the key in the environment (Cowork drops a plugin MCP server whose
config references a plugin setting, so the Claude plugin passes none) can save it instead: give the agent the key and it calls set_api_key, which
checks the key against the API and, when the client supports MCP elicitation, asks you to
approve the account (email and the key's last four characters). A confirmed key is written to
~/.config/redact-pdf-mcp/key (or $XDG_CONFIG_HOME/redact-pdf-mcp/key), readable by your user
only, and is never replaced without the same confirmation. A client without elicitation gets the
key for that session only, in memory, never over a key that still works, and every tool result
names the account. That keeps a key planted in a processed document from silently redirecting
your files. The tool never returns the key. You can also write the file yourself once (see the
plugin README for the one-line command). REDACT_PDF_API_KEY takes priority when it is set; an
empty value, or an unsubstituted placeholder such as ${user_config.api_key}, counts as unset.
| Tool | What it does |
|---|---|
redact_pdf_and_wait | Start here. Upload, redact, wait, return the finished PDF. One call. |
redact_pdf | Start a job and return immediately, for redacting several documents in parallel. |
detect_pii | Dry run: find the personal data (categories, counts, pages) without producing a file. Never returns the detected text. Billed like a redaction, so the redaction that follows is free. Not in the ChatGPT build. |
redact_detected_job | Produce the redacted PDF of a document checked with detect_pii, with the same settings and no extra charge. Not in the ChatGPT build. |
get_job_status | Poll a job: uploaded → analyzing → redacting → redacted | error. |
download_redacted | Fetch the redacted output for one document. |
download_correspondence | Fetch the tag → original table of a pseudonymized document (mode: "pseudonymize"). |
try_demo | Keyless. With a file: redact its first page for real. Without: run the built-in sample. |
restore_names | Put the real names back into what the agent wrote from the pseudonymized text. Local: a .md, .txt or .docx file, returns the output path and counts. Hosted: the text itself, returns a download link for the user and counts (see Re-identification below). Never a name. |
get_account_status | Check the API key is valid and see the account, before a big batch. |
delete_job | Hosted only. Delete a job now, with its original, redacted PDF, text version, correspondence table and restored texts, instead of waiting for retention. Destructive; the agent confirms with the user first. |
set_api_key | Local only. Check a key the user gives in the conversation and save it user-only on this machine, for clients that can't pass REDACT_PDF_API_KEY. Never returns the key. |
Redaction rules, on either redact tool:
| Argument | Effect |
|---|---|
pii_categories | Restrict to specific entity types. Omit for account defaults. |
pii_included_terms | Always redact these, even if not detected as PII (codenames, case numbers). |
pii_excluded_terms | Never redact these, even if detected (your own company name). |
retention | ephemeral (default) deletes the original after a successful redaction. studio keeps the original so a person can edit the masks in the Studio. |
mode | redact (default) draws black boxes. pseudonymize draws consistent tags such as [Person 1] and returns the correspondence table (stdio: written next to the PDF as *-correspondence.csv; remote: a 15-minute correspondence_download_url for the user, never the table itself) plus the document as text with the tags in place (document_text; past 32 KB, stdio writes document_text_path and remote returns the start plus a signed document_text_url). Also accepted by try_demo. |
The local server closes the loop without the model ever seeing a name:
redact_pdf_and_wait with mode: "pseudonymize" returns the redacted PDF, the
correspondence table on disk, and document_text: the document as text, every name
replaced by its tag. The agent works from that text..md, .txt or .docx file,
keeping the tags as written.restore_names with that file and the correspondence_path writes
<name>-restored.<ext> with the real names, and returns only the path and counts.The agent must not open the original document first, nor the correspondence CSV or the restored file afterwards: any of those reads puts the personal data back into the conversation. The server instructions and tool descriptions say so explicitly.
The package also ships a streamable-HTTP server for hosted use, where the API key travels per request instead of in the environment:
npx redact-pdf-mcp-http # listens on :8080/mcp
POST /mcp
X-API-Key: your_key (or: Authorization: Bearer your_key)
It is stateless — no sessions, no stored keys, nothing kept between requests — so each request gets its own short-lived server instance and one caller's key can never leak into another's tool call.
The handshake, tools/list, and try_demo work without a key, so a client can connect and
verify the server before anyone signs up; every other tool returns 401 with a
WWW-Authenticate challenge.
restore_names on the hosted server takes the document_id, the
text_version that came with document_text, and the agent's tagged text (up
to 500,000 characters). The server fetches that document's correspondence table
itself, puts the real names back, and stores the result for the user: the tool
returns a 15-minute restored_download_url (a download page, the file only on
click) plus counts and the tags it could not restore. No original ever appears
in a result. text_version pins the table: if the document was edited or
detected again in the Studio since the text was produced, the restore is
refused (text_changed) rather than putting in names that a tag no longer
stands for. The stored file is deleted after an hour, or at once with the
document.
| Variable | Default | Meaning |
|---|---|---|
REDACT_PDF_CALL_BUDGET_MS | 210000 | Hard limit per request. When it passes, or the client disconnects, everything the request started (API calls, retry waits, polling, downloads) is cancelled. redact_pdf_and_wait waits at most 180 s on the hosted server and then returns the job id to resume with. |
REDACT_PDF_RATE_PER_MINUTE | 120 | Calls per minute per signed-in user or API key (each JSON-RPC message counts; batched tool calls are refused). |
REDACT_PDF_ANON_RATE_PER_MINUTE | 30 | Calls per minute per client address without credentials. |
REDACT_PDF_MAX_HEAVY | 8 | Concurrent redactions / demo calls per instance (503 beyond). Status reads and links are never blocked by them. |
REDACT_PDF_MAX_HEAVY_PER_CALLER | 2 | Concurrent redactions per caller (429 beyond). |
REDACT_PDF_MAX_DEMO | 2 | Concurrent try_demo calls per instance, one per address: a pool of their own, so free calls never take a paid redaction's slot. |
REDACT_PDF_KEYED_RATE_PER_ADDRESS | 240 | Calls per minute per address across every API key it sends (keys are not verified here, so made-up keys cannot mint fresh budgets). |
REDACT_PDF_TRUST_PROXY | off | 1 behind a proxy that appends to X-Forwarded-For (Azure App Service): the LAST entry is used, and only if it is an IP address. IPv6 is limited per /64. |
REDACT_PDF_ACCESS_LOG | on | One JSON "event":"http" line per request on stderr: method, path (never the query string), status, aborted, duration and user agent, sanitized and capped. Healthy /health probes are skipped. 0 turns it off. |
The hosted server needs Node 20.3 or later (AbortSignal.any); stdio runs on any Node 20.
Refusals are logged as {"event":"admission","reason":…} and cancelled calls as {"event":"cancelled","reason":"budget"|"client_closed"} (no keys, addresses or arguments). A refused tool call is answered as a tool error carrying retry_after_seconds, so the model sees the advice.
All limits are per process. URL fetches (file_url, ChatGPT files) connect to
the exact address that passed the public-address check: a DNS record that
changes between the check and the connection cannot redirect it.
Set these and the server also acts as an OAuth 2.1 protected resource (MCP authorization spec), so Claude and ChatGPT can connect with a sign-in instead of a key:
| Variable | Meaning |
|---|---|
REDACT_PDF_OAUTH_RESOURCE | Canonical URL of this endpoint, e.g. https://mcp.redact-pdf.ai/mcp. Tokens must carry it as aud. |
REDACT_PDF_OAUTH_ISSUER | The authorization server (Clerk), e.g. https://clerk.redact-pdf.ai. |
REDACT_PDF_SERVICE_SECRET | ≥ 32 bytes, shared with the API only. Used to sign the per-request service assertion. |
REDACT_PDF_OAUTH_REQUIRED_SCOPES | Optional. Scopes a token must carry (403 insufficient_scope otherwise). |
REDACT_PDF_OAUTH_SCOPES | Optional. Extra scopes to advertise. |
REDACT_PDF_OAUTH_JWKS_URL | Optional. Defaults to <issuer>/.well-known/jwks.json. |
REDACT_PDF_OAUTH_ALLOW_MISSING_AUD_CLIENTS | Optional, empty by default. OAuth client ids whose tokens may lack aud. A wrong aud is never accepted. |
Resource and issuer are set together or not at all; a partial or insecure configuration stops the server at startup. With OAuth on:
/.well-known/oauth-protected-resource/mcp (and the root form) serves the RFC 9728
metadata; a call that needs sign-in gets 401 with
WWW-Authenticate: Bearer resource_metadata="…".X-Service-Assertion) naming the verified user, minted per API
request.X-API-Key, or a bearer value starting rdp_live_.Documents reach the hosted server one of three ways (it has no access to your filesystem):
create_upload_link (the default). Returns a 30-minute page on
www.redact-pdf.ai where the user chooses the file; it goes from their browser
straight to storage and never passes through the AI conversation. The agent
then calls redact_pdf_and_wait with upload_id. Until the user has
uploaded, that call answers status: "waiting_for_upload" (not an error;
nothing is created or billed).file_base64, for files under 1 MB only. Larger ones are refused with a
pointer to create_upload_link, and request bodies are capped accordingly
(~1.8 MB).file parameter (_meta["openai/fileParams"]), off by default:
set REDACT_PDF_ENABLE_CHATGPT_FILES=1. It is a URL fetch on the caller's
behalf (any MCP client can fill it, not only ChatGPT) through the same guard
as file_url. Set REDACT_PDF_CHATGPT_FILE_HOSTS to the hosts ChatGPT serves
files from (comma-separated; a leading . matches subdomains); without it the
parameter also requires REDACT_PDF_ENABLE_URL_INPUT=1. Keep it off until the
guard pins DNS.An upload link makes one job. Once its job exists, the page refuses a second
file ("already used, ask for a new link") and the API answers 410 to any new
request on it, so the agent is never handed the first file's job for a second
file. Hosted results carry document ids, never the user's file names.
Results never carry files. The redacted PDF and the correspondence table come
back as signed links (download_url, correspondence_download_url) minted by
POST /v1/documents/{id}/links; a pseudonymized text comes back inline, or for
a long one as its start plus a signed document_text_url. Each link works for
15 minutes without any credential, is bound to one document, its owner and one
kind, and re-checks ownership, retention, readiness and the account balance
when it is used. A PDF or table link opens a page with a Download button: a
plain GET (a fetch tool, a link preview) never receives the file. Links need
REDACT_PDF_SERVICE_SECRET on the API. See CHANGELOG.md for what changed in
0.5.0.
Fetching a document by URL is off by default on the remote server. The address check is real — URLs resolving to loopback, private, or link-local addresses are refused, and every redirect hop is re-checked — but the socket resolves the hostname a second time after that check, so a DNS-rebinding attacker with a short TTL can still have the server validate one address and connect to another. Closing that requires pinning the connection to the validated address, which is not implemented yet, so an internet-reachable server does not offer the surface at all.
Set REDACT_PDF_ENABLE_URL_INPUT=1 to accept file_url, and only where you have your own
egress controls (a network policy or allowlisting proxy) in front of the server.
REDACT_PDF_ALLOW_PRIVATE_URLS=1 additionally permits private addresses, for a
self-hosted instance fetching from internal storage.
stdio mode is unaffected: it runs on your own machine, where fetching a URL carries no privilege you do not already have.
| Variable | Default | Purpose |
|---|---|---|
REDACT_PDF_API_KEY | — | API key (stdio mode only; remote takes it per request). Empty or ${...} counts as unset, and the key saved by set_api_key is used instead. |
REDACT_PDF_BASE_URL | https://www.redact-pdf.ai | Point at a different API host. |
PORT | 8080 | HTTP server port. |
REDACT_PDF_MCP_PATH | /mcp | HTTP endpoint path. |
REDACT_PDF_ENABLE_URL_INPUT | unset | Accept file_url on the remote server. Off by default — see the DNS-rebinding note above. |
REDACT_PDF_ALLOW_PRIVATE_URLS | unset | Self-hosted only: permit file_url to reach private addresses. Never set this on a publicly reachable server. |
REDACT_PDF_DIRECTORY | unset | Hosted directory build. openai: no try_demo (listed or keyless) and no free, price or credit wording in instructions, tool descriptions, results or errors, as the OpenAI plugin guidelines require. Anything else stops the server at startup. |
REDACT_PDF_OPENAI_APPS_CHALLENGE | unset | OpenAI's domain-verification token, served as plain text at /.well-known/openai-apps-challenge (404 while unset). |
set_api_key.ephemeral retention the API deletes the original after a successful redaction.idempotency_key when you genuinely want a second, separate redaction of the same file.The full policy is at redact-pdf.ai/privacy. It covers the website, the app and the API this server calls. In short:
ephemeral retention the original is deleted
after a successful redaction; the redacted output follows your account's retention window (14 days
by default) and can be deleted at any time. Files sent to the keyless try_demo are
deleted after the first page is redacted; that page is kept 14 days.file_url
for anything large.pii_categories list is rejected: to the API an empty list means
"redact nothing", which would return an untouched file reported as redacted. Omit the
argument to use your account defaults.quota_exceeded error means top up — the tools tell the agent not to retry it.npm install
npm run build
npm test # offline unit + tool tests
npm run test:integration # hits the live keyless demo endpoint; no key needed
Support questions about redaction quality, billing, or your account go to info@redact-pdf.ai — GitHub issues here are for the MCP server itself.
MIT licensed.