Paperless-ngx MCP (paperless-mcp)
Use the paperless-mcp MCP tools and paperless:// resources as the primary interface for searching, reading, uploading, organizing, and automating a Paperless-ngx instance.
Core Workflows
- Lookup taxonomy IDs first: Filtering tools expect numeric IDs, not names. Call
list_tags,list_correspondents,list_document_types, orlist_custom_fieldsbefore filteringlist_documents/query_documentsor creating/updating documents. - Search without flooding context:
list_documents/query_documentsexclude document text by default and reportcontent_lengthso you can gauge size before reading. Preferquery_documentsover deprecatedsearch_documents.- Use
search_passagesto locate verbatim or stemmed full-text hits as bounded snippets (windowdefault800,max_passagesdefault5), withoffsetandcontent_lengthfor follow-up reads. - Use
get_document_contentto page through OCR text (offsetdefault0,max_charsdefault8000).
- Download files & previews:
download_documentandget_document_thumbnailreturnpaperless://resource URIs (paperless://documents/{id}/downloadandpaperless://documents/{id}/thumbnail). Read the returned MCP resource URI to fetch the file or WebP thumbnail. - Upload documents: Call
post_documentwith either base64file+filenameor a server-localfile_path(100 MB limit;file_pathis restricted byPAPERLESS_MCP_UPLOAD_PATHS). - Update & bulk-edit metadata: Use
update_documentfor single-document changes (passnullto clearcorrespondent,document_type,storage_path, orowner), orbulk_edit_documentsfor multi-document operations (set_correspondent,set_document_type,set_storage_path,add_tag,remove_tag,modify_tags,modify_custom_fields,reprocess,set_permissions,merge,split,rotate,delete_pages,delete).
Read references/tools-reference.md for all 45 tools, paperless:// resource templates, and parameter details.
Gotchas
update_documentcustom_fieldsreplaces the whole set: Unlike other omitted top-level fields, passingcustom_fieldsreplaces every custom field value on the document. Usebulk_edit_documentswithmethod: "modify_custom_fields"(add_custom_fields/remove_custom_fields) for incremental updates.- Destructive deletes require
confirm: true:bulk_edit_documents(method: "delete"),delete_document_note,delete_mail_rule,delete_tag,delete_correspondent,delete_document_type,delete_custom_field, anddeleteoperations onbulk_edit_*fail unlessconfirm: trueis passed. Noteremove_tagremoves a tag from documents, whereasdelete_tagdeletes it system-wide. set_permissionsclearsownerunlessmerge: true: Inbulk_edit_*, omittingownerclears existing ownership and passing[]clears users/groups unlessmerge: trueis set.- Inline character cap:
get_document_contentrejectsmax_charsrequests abovePAPERLESS_MCP_MAX_INLINE_CHARS(default50000) with an error showing the document length—page withoffsetor read thedownload_documentresource instead. - Sanitized full-text retries:
search_passagesretries Paperless HTTP 400 query syntax errors (such as stray quotes/apostrophes) with a sanitized query and setsquery_sanitized: true.
Connection Setup
Read references/setup-and-config.md when deploying @retiform/paperless-mcp (stdio or --http), configuring --no-auth, or setting PAPERLESS_API_VERSION and PAPERLESS_MCP_UPLOAD_PATHS.


