Skip to main content

mcp-server-paperless

Talk to your paperless-ngx archive.
Claude, Cursor, VS Code and every other MCP client can find, read, file, upload and organise your documents, by name, and nothing final happens without your yes.

PyPI Downloads CI E2E full suite paperless-ngx 3.x Python 3.14+ License: MIT GitHub stars

Install in VS Code Install in Cursor Claude Code

Quick start · What you can ask · Comparison · Toolsets · Safety · Documentation

claude mcp add paperless --env PAPERLESS_URL=https://paperless.example.org \
    --env PAPERLESS_TOKEN=your-api-token -- uvx mcp-server-paperless@latest

mcp-server-paperless is a Model Context Protocol server for paperless-ngx 3.x, built on FastMCP 4. It gives Claude Code, Claude Desktop, claude.ai, Cursor, VS Code and any other MCP client 87 tools in 13 toolsets that cover most of what the Paperless API can do, from a search to saved views, mail rules and workflows. It starts small and careful: 19 tools by default, names instead of ids, and a confirmation step before anything that cannot be undone.

flowchart LR
    A["Claude Code · Claude Desktop<br>Cursor · VS Code"] -- stdio --> S
    B["claude.ai<br>connector"] -- "HTTPS + OIDC" --> S
    C["Other MCP<br>clients"] -- "HTTP + bearer token" --> S
    S(["mcp-server-paperless"]) -- "REST API v10" --> P[("paperless-ngx 3.x")]

What you can ask

  • "What is in my inbox? Suggest a correspondent, type and tags for each document and file them once I agree."
  • "Find last year's electricity bills and add up what I paid."
  • "Upload this PDF as an invoice from ACME and tag it tax-2026."
  • "Which documents mention the rental deposit? Show me the paragraph."
  • "Merge the three scans of the contract into one document and rotate page 2."
  • "Give me a link to my insurance policy that expires in a week."
  • "Set up a mail rule that files the invoices from billing@example.org."
  • "Find duplicate and unused tags and propose how to clean them up."
  • "Which documents have no document type yet? Then run my saved view To do."

An example of how that goes (illustrative):

You: What is still in my inbox?

Claude: Three documents. Here is how I would file them:

Document Correspondent Type Tags
Electricity bill, March City Power Invoice utilities, tax-2026
Policy update Northwind Insurance Letter insurance
Receipt, hardware store new: Brick & Bolt Receipt household

"Brick & Bolt" does not exist yet as a correspondent; I would create it. Shall I apply this?

You: Yes, and tag the policy update tax-2026 too.

Four built-in prompts start such tasks from the client's prompt menu: triage_inbox, find_document, annual_review and cleanup_taxonomy. Each one proposes its changes and waits for your yes before it writes.

Why this one

There are already several MCP servers for paperless-ngx. This one is a new build, made for people who want all of the following in one server:

  • 🗂️ Much more than search. Besides finding, reading and filing documents it handles notes, custom fields, saved views, file versions, the trash, PDF operations, share links, mail rules, workflows, permissions and user administration: most of what paperless-ngx 3.x can do.
  • 🏷️ Names instead of numbers. You say "invoices from ACME tagged tax-2026" and the server finds the matching ids itself. If a name does not exist or fits more than one entry, it says so and lists the candidates instead of guessing.
  • 🛡️ Nothing final without your yes. Before a tool deletes, overwrites, publishes or shares anything, it reports what would happen and waits for your confirmation. Changes to many documents at once can be previewed first.
  • 🪶 Small to start with. Only 19 tools by default out of the 87, so the assistant starts with the essentials and you decide what else it may do. Search results are short lists and long documents are read piece by piece, so a conversation does not fill up with text it does not need.
  • 🧪 Tested against a real Paperless. More than 600 tests run against a real paperless-ngx after every change and every night, on top of more than 4,500 faster tests. Every week the whole suite also runs against the newest Paperless release.
  • 🔐 Safe to reach from outside. Over the network the server does not start without authentication. Claude Code signs in with a token, claude.ai through your own identity provider, and the container image runs without root rights.

How it compares

Some other paperless-ngx MCP servers, as their code stood on 23 November 2026 (read from their sources, not run; ❌ means not found; open an issue if something is wrong or has changed):

Tools by default / in total Toolsets and read-only mode Names instead of ids Confirms what is final Runs saved views Notices misread full-text syntax HTTP Tested on a real Paperless
mcp-server-paperless 19 / 87 ✅ opt-in ✅ tags, types, people, views ✅ with a preview ✅ ✅ bearer, OIDC 3.4.2 after every merge, newest 3.x weekly
OrellBuehler/paperless-mcp 123 / 126 ✅ all on by default ❌ hints only ❌ ❌ bearer, OAuth ❌
freeformz/paperless-ngx-mcp 123 / 123 ❌ ❌ ❌ ❌ ❌ stdio only ❌
cubinet-code/paperless-ngx-mcp 109 / 109 ❌ in results ✅ ❌ ❌ no auth 3.2.1 on every change
tobee89/mcp-paperless-ngx 85 / 99 ✅ 7 of 9 on by default ❌ hints only ❌ ❌ stdio only by hand
pvliesdonk/paperless-mcp 50 / 52 tool allow list ❌ hints only ❌ ❌ bearer, OIDC not in CI
baruchiro/paperless-mcp 47 / 47 ❌ in results ✅ ❌ ❌ bearer 2.20 and newest on every change
barryw/PaperlessMCP 44 / 44 ❌ ❌ ✅ with a preview ❌ ❌ no auth ❌
nloui/paperless-mcp 16 / 16 ❌ ❌ ❌ ❌ ❌ no auth ❌

Others exist; tb1337 and chaosbit-dev also run saved views.

More tools is not better by itself: every tool a client loads costs context in every conversation. This server keeps the default small and lets you switch on the rest.

Quick start

You need a Paperless API token: in Paperless open your profile menu, "My Profile", and create an API auth token. The server acts as that user and sees and changes only what that user may.

Claude Code

With uv installed, one command, no clone:

claude mcp add paperless \
    --env PAPERLESS_URL=https://paperless.example.org \
    --env PAPERLESS_TOKEN=your-api-token \
    -- uvx mcp-server-paperless@latest

Add --scope user to have it in every project. Then ask Claude for an overview of your Paperless instance. @latest makes uvx check for a new release at every start; to stay on one, name its version instead (mcp-server-paperless@0.2.0).

Claude Desktop

Add the server to claude_desktop_config.json (Settings, Developer, Edit Config) and restart:

{
  "mcpServers": {
    "paperless": {
      "command": "uvx",
      "args": ["mcp-server-paperless@latest"],
      "env": {
        "PAPERLESS_URL": "https://paperless.example.org",
        "PAPERLESS_TOKEN": "your-api-token"
      }
    }
  }
}

If Claude Desktop cannot find uvx, give its full path (which uvx). Other MCP clients that start a stdio server (Windsurf, Zed, Cline, Continue, ...) take the same command, arguments and environment.

VS Code

Install in VS Code: VS Code asks for the Paperless URL and the API token and keeps the token as a secret. By hand, add the server to .vscode/mcp.json with the same uvx command as for Claude Desktop.

Cursor

Install in Cursor, then replace the placeholder URL and token in the server settings (~/.cursor/mcp.json).

Container, for remote clients

The image serves MCP over Streamable HTTP and does not start without authentication:

export MCP_TOKEN="$(openssl rand -hex 32)"
docker run -d --name mcp-server-paperless -p 127.0.0.1:8001:8000 \
    -e PAPERLESS_URL=https://paperless.example.org \
    -e PAPERLESS_TOKEN=your-api-token \
    -e PAPERLESS_MCP_HTTP_AUTH_TOKENS="$MCP_TOKEN" \
    -e PAPERLESS_MCP_HTTP_ALLOWED_HOSTS=localhost \
    ghcr.io/gardenbaum/mcp-server-paperless:0.3.0

claude mcp add --transport http paperless http://127.0.0.1:8001/mcp \
    --header "Authorization: Bearer $MCP_TOKEN"

Run in a container has the compose file next to Paperless and the reverse proxy setup, Run over HTTP the details of the transport.

claude.ai

claude.ai custom connectors sign in with OAuth. Put the HTTP server behind your identity provider (Authentik, Keycloak, Google, Auth0 or any other OpenID Connect provider) with five environment variables: Connect claude.ai.

Toolsets

The 87 tools are grouped into toolsets, and only two are on by default, so the model is not handed tools you never use. Switch more on with PAPERLESS_MCP_TOOLSETS=core,ai,pdf,trash or all.

Toolset Tools Default What it is for
core 17 on Search, read, download, file and upload documents; run saved views; notes; tags, correspondents, types, storage paths and custom fields; background tasks
ai 2 on Ask Paperless AI about your documents and get its filing suggestions (offered only while Paperless AI is enabled)
bulk 2 Change many documents or taxonomy items in one step, with a dry run first
pdf 7 Rotate, merge, split, delete pages, edit PDFs, remove passwords, reprocess
versions 5 The file versions of a document: list, upload, label, delete, merge documents as versions
trash 3 List the trash, restore from it, empty it
views 5 Saved views: list, create, change and delete them (running them is in core)
sharing 8 Public share links and bundles, and sending documents by e-mail
permissions 3 Owners and view and change rights of documents and taxonomy; list users and groups
mail 13 Mail accounts and rules for the mail import, and what it processed
workflows 5 The workflows Paperless runs by itself: triggers and actions
admin 16 Users, groups, application configuration, logs, tasks, bulk download
raw 1 A read-only escape hatch: GET any path of the Paperless API the other tools do not cover

Every tool with its kind and a one-line description is in the tool reference; what to know before switching a toolset on is in Configuration.

How it keeps your archive safe

An assistant that can file your documents can also delete them. The server is built so that this takes more than a misunderstanding:

  • Confirmation before anything final. Tools that delete, overwrite, publish or grant access change nothing when called without confirm=true. They answer with what would happen (which documents, who gains access, what cannot be undone), so the client shows it to you first.
  • Dry runs for bulk edits. bulk_edit_documents and bulk_edit_taxonomy preview how many objects would change before they ask for confirmation.
  • The trash first. Deleting a document moves it to the Paperless trash, from where it can be restored. Emptying the trash is a separate tool in a toolset that is off by default.
  • You choose the surface. Toolsets are opt-in, PAPERLESS_MCP_READ_ONLY=true offers only tools that change nothing, and PAPERLESS_MCP_DISABLED_TOOLS takes single tools away.
  • Paperless stays in charge. The server acts as the user of its API token: the permissions set in Paperless apply to every call.
  • Secrets stay secret. Passwords and API keys are write-only, and tokens, document text and search queries are not logged at the default log level.
  • No reach beyond Paperless. Callers cannot make the server read local files or reach other hosts. Uploading by file path exists only over stdio and only from directories you name.

Configuration

The settings you are most likely to touch; Configuration has all of them.

Variable Meaning
PAPERLESS_URL Base URL of your Paperless instance (required)
PAPERLESS_TOKEN Paperless API token (required)
PAPERLESS_PUBLIC_URL Base URL for links shown to you, if it differs from PAPERLESS_URL
PAPERLESS_MCP_TOOLSETS Toolsets to offer, comma-separated, or all (default core,ai)
PAPERLESS_MCP_READ_ONLY true to offer only tools that change nothing
PAPERLESS_MCP_DISABLED_TOOLS Tools never offered, by name
PAPERLESS_MCP_UPLOAD_DIRS Directories the model may upload files from by path (stdio only; default: none)

Compatibility

paperless-ngx 3.4.2 and later (API version 10). Every change is tested against 3.4.2, the latest 3.x release weekly. 2.x is not supported
Clients Claude Code and Claude Desktop over stdio, claude.ai custom connectors and other MCP clients over Streamable HTTP
Runtime Python 3.14 or later (uvx fetches it for you), or the container image

Documentation

Known limitations

  • One Paperless user per server. Every client of a server acts as the user of its PAPERLESS_TOKEN, also when clients sign in through an identity provider. Run one server per Paperless account.
  • search_documents with more_like_id can return nothing on Paperless 3.4.2. Paperless 3.4.2 (Tantivy 0.26) panics while scoring a more-like-this query once edited or deleted documents have left stale entries in the search index. Paperless catches the panic, logs More Like This scoring panicked and answers an empty list with HTTP 200, so the server cannot tell it from "no similar documents". If a result is empty although similar documents should exist, have an administrator run document_index reindex in the Paperless container (for example docker compose exec webserver document_index reindex). The fix is upstream in Tantivy (tantivy PR 2964); it needs a Paperless release that ships it.

How this project is built

The code is written by AI agents and held to rules that are checked, not remembered: a layered architecture enforced by import contracts, every design decision recorded with the test that guards it (backlog/decisions/), a contract suite that runs the same tests against a fake and a real Paperless, and mutation testing with a gate. Plans and task history are in backlog/. See Development to run the checks yourself; issues and pull requests are welcome.

Credits

This is a new build, not a fork, but it learned from three existing paperless-ngx MCP servers and adopts some of their ideas deliberately:

  • pvliesdonk/paperless-mcp (MIT): field projection in lists, content slicing with a next offset, retries only for idempotent calls, token redaction, errors that name the next call, a central tool-annotation table, web_url, and the OIDC proxy beside bearer tokens.
  • baruchiro/paperless-mcp (ISC): names instead of IDs in output, confirm: true for destructive calls, an upload allowlist, live end-to-end tests against a real Paperless, a test over every advertised tool schema.
  • OrellBuehler/paperless-mcp (MIT): toolsets, a read-only mode and a test that every tool belongs to a toolset, coverage of Paperless 3.x features (versions, AI suggestions, trash, PDF operations), prompts that ask for confirmation, a test that every tool named in a prompt exists.

Thanks to the paperless-ngx and FastMCP projects, which this server stands on.

Licence

MIT, see LICENSE.


If mcp-server-paperless saves you time, a ⭐ helps other Paperless users find it.

Metadata

Release files for mcp-server-paperless 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-paperless 0.3.1
File Size Uploaded Provenance Actions
mcp_server_paperless-0.3.1.tar.gz 292.0 kB With provenance Details for mcp_server_paperless-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-paperless 0.3.1
File Interpreter ABI Platform Actions
mcp_server_paperless-0.3.1-py3-none-any.whl Python 3 none any Details for mcp_server_paperless-0.3.1-py3-none-any.whl

Total release size: 639.2 kB

Release files / mcp_server_paperless-0.3.1.tar.gz

Download URL mcp_server_paperless-0.3.1.tar.gz
Size 292.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6174f483a53e9c87714429a6abc165608377bbf707f8ac84a26a9dfb21b1b92b
BLAKE2b-256 checksum
How to use checksums
f7f097129a8c0e0359e9d6b961fde89e5683282c9ac78a14817a4fb81546e68f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / mcp_server_paperless-0.3.1-py3-none-any.whl

Download URL mcp_server_paperless-0.3.1-py3-none-any.whl
Size 347.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96669d210975258b4eb9d5d6b8f12027a651f0ae4796a1b3dca56cf270f89256
BLAKE2b-256 checksum
How to use checksums
f50458cd220940068bae894dea7b1ce35e07cf285d900b38be0fbd066eaf405b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for mcp-server-paperless 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_server_paperless-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page