Paperless-NGX MCP server

Enables AI to interact with Paperless-NGX document management systems for organizing, searching, and managing document collections through natural language commands.
Back to servers
Setup instructions
Provider
Baruch Odem
Release date
May 20, 2025
Stats
27 stars

The Paperless-NGX MCP server provides a bridge between AI assistants and your Paperless-NGX document management system, allowing you to manage documents, tags, correspondents, and more through conversational interfaces. This tool makes it easier to search, organize and work with your document collection.

Installation

Quick Installation Options

You can install the Paperless-NGX MCP server in several ways depending on your preferences:

Via Smithery

For Claude Desktop users, install automatically using Smithery:

npx -y @smithery/cli install @baruchiro/paperless-mcp --client claude

Manual Installation

Add the configuration to your MCP config file using one of these options:

STDIO Mode (recommended for local use)

"paperless": {
  "command": "npx",
  "args": [
    "-y",
    "@baruchiro/paperless-mcp@latest",
  ],
  "env": {
    "PAPERLESS_URL": "http://your-paperless-instance:8000",
    "PAPERLESS_API_KEY": "your-api-token",
    "PAPERLESS_PUBLIC_URL": "https://your-public-domain.com"
  }
}

HTTP Mode (recommended for Docker or remote use)

"paperless": {
  "command": "docker",
  "args": [
    "run",
    "-i",
    "--rm",
    "ghcr.io/baruchiro/paperless-mcp:latest",
  ],
  "env": {
    "PAPERLESS_URL": "http://your-paperless-instance:8000",
    "PAPERLESS_API_KEY": "your-api-token",
    "PAPERLESS_PUBLIC_URL": "https://your-public-domain.com"
  }
}

Getting Your API Token

To set up the connection to your Paperless-NGX instance:

  1. Log into your Paperless-NGX instance
  2. Click your username in the top right
  3. Select "My Profile"
  4. Click the circular arrow button to generate a new token

Replace the placeholders in your configuration:

  • http://your-paperless-instance:8000 with your actual Paperless-NGX URL
  • your-api-token with the token you generated
  • https://your-public-domain.com with your public Paperless-NGX URL (optional)

Using the Paperless-NGX MCP Server

Once installed, you can ask your AI assistant to help manage your Paperless-NGX documents. Here are some example requests:

  • "Show me all documents tagged as 'Invoice'"
  • "Search for documents containing 'tax return'"
  • "Create a new tag called 'Receipts' with color #FF0000"
  • "Download document #123"
  • "List all correspondents"
  • "Create a new document type called 'Bank Statement'"

Available Tools

Document Operations

Listing Documents

list_documents({
  page: 1,
  page_size: 25
})

Getting a Specific Document

get_document({
  id: 123
})

Searching Documents

search_documents({
  query: "invoice 2024"
})

Downloading Documents

download_document({
  id: 123,
  original: false
})

Bulk Editing Documents

// Add a tag to multiple documents
bulk_edit_documents({
  documents: [1, 2, 3],
  method: "add_tag",
  tag: 5
})

// Set correspondent and document type
bulk_edit_documents({
  documents: [4, 5],
  method: "set_correspondent",
  correspondent: 2
})

// Merge documents
bulk_edit_documents({
  documents: [6, 7, 8],
  method: "merge",
  metadata_document_id: 6,
  delete_originals: true
})

Uploading Documents

post_document({
  file: "base64_encoded_content",
  filename: "invoice.pdf",
  title: "January Invoice",
  created: "2024-01-19",
  correspondent: 1,
  document_type: 2,
  tags: [1, 3],
  archive_serial_number: "2024-001",
  custom_fields: [1, 2]
})

Tag Operations

Listing Tags

list_tags()

Creating Tags

create_tag({
  name: "Invoice",
  color: "#ff0000",
  match: "invoice",
  matching_algorithm: 5
})

Correspondent Operations

Listing Correspondents

list_correspondents()

Creating Correspondents

create_correspondent({
  name: "ACME Corp",
  match: "ACME",
  matching_algorithm: 5
})

Document Type Operations

Listing Document Types

list_document_types()

Creating Document Types

create_document_type({
  name: "Invoice",
  match: "invoice total amount due",
  matching_algorithm: 1
})

Custom Field Operations

Listing Custom Fields

list_custom_fields()

Getting a Specific Custom Field

get_custom_field({
  id: 1
})

Creating Custom Fields

create_custom_field({
  name: "Invoice Number",
  data_type: "string"
})

Updating Custom Fields

update_custom_field({
  id: 1,
  name: "Updated Invoice Number",
  data_type: "string"
})

Deleting Custom Fields

delete_custom_field({
  id: 1
})

Bulk Editing Custom Fields

bulk_edit_custom_fields({
  custom_fields: [1, 2, 3],
  operation: "delete"
})

Error Handling

The server provides clear error messages for common issues:

  • Incorrect Paperless-NGX URL or API token
  • Unreachable Paperless-NGX server
  • Failed operations
  • Invalid parameters

These error messages will help you troubleshoot any connection or usage problems.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "paperless" '{"command":"npx","args":["-y","@baruchiro/paperless-mcp@latest"],"env":{"PAPERLESS_URL":"http://your-paperless-instance:8000","PAPERLESS_API_KEY":"your-api-token"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "paperless": {
            "command": "npx",
            "args": [
                "-y",
                "@baruchiro/paperless-mcp@latest"
            ],
            "env": {
                "PAPERLESS_URL": "http://your-paperless-instance:8000",
                "PAPERLESS_API_KEY": "your-api-token"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "paperless": {
            "command": "npx",
            "args": [
                "-y",
                "@baruchiro/paperless-mcp@latest"
            ],
            "env": {
                "PAPERLESS_URL": "http://your-paperless-instance:8000",
                "PAPERLESS_API_KEY": "your-api-token"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later