Paperless-NGX MCP server

Integrates with Paperless-NGX API to provide document management operations including listing, searching, editing, and uploading for efficient organization and retrieval of digital files.
Back to servers
Setup instructions
Provider
Nick Loui
Release date
Dec 28, 2024
Language
TypeScript
Package
Stats
1.1K downloads
76 stars

Paperless-NGX MCP Server is a powerful integration that lets you interact with your Paperless-NGX document management system through Claude. With this server, you can search, organize, and manage your documents, tags, correspondents, and document types using natural language commands.

Installation

Installing via Smithery

The easiest way to install is through Smithery:

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

Manual Installation

If you prefer to install manually, follow these steps:

  1. Install the MCP server:
npm install -g paperless-mcp
  1. Configure Claude to use the server:

For Claude desktop app, edit the configuration file:

{
  "mcpServers": {
    "paperless": {
      "command": "npx",
      "args": ["paperless-mcp", "http://your-paperless-instance:8000", "your-api-token"]
    }
  }
}

For VSCode extension, edit the settings file:

{
  "mcpServers": {
    "paperless": {
      "command": "npx",
      "args": ["paperless-mcp", "http://your-paperless-instance:8000", "your-api-token"]
    }
  }
}
  1. Obtain your API token:

    • Log into your Paperless-NGX instance
    • Click your username in the top right
    • Select "My Profile"
    • Click the circular arrow button to generate a new token
  2. Update your configuration with:

    • Your Paperless-NGX URL (e.g., http://your-paperless-instance:8000)
    • Your API token

Usage Examples

Here are some tasks you can ask Claude to perform:

  • "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 Management

Listing and Searching Documents

To list all documents:

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

To search for specific documents:

search_documents({
  query: "invoice 2024"
})

To retrieve a specific document:

get_document({
  id: 123
})

Downloading Documents

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

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]
})

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
})

Split a document:

bulk_edit_documents({
  documents: [9],
  method: "split",
  pages: "[1-2,3-4,5]"
})

Tag Management

List all tags:

list_tags()

Create a new tag:

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

Correspondent Management

List all correspondents:

list_correspondents()

Create a new correspondent:

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

Document Type Management

List all document types:

list_document_types()

Create a new document type:

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

Troubleshooting

If you encounter errors, check:

  • Your Paperless-NGX URL is correct and accessible
  • Your API token is valid
  • Your Paperless-NGX server is running
  • The parameters you've provided match the expected format

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":["paperless-mcp","http://your-paperless-instance:8000","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": [
                "paperless-mcp",
                "http://your-paperless-instance:8000",
                "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": [
                "paperless-mcp",
                "http://your-paperless-instance:8000",
                "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