The Paperless-NGX MCP server provides a convenient interface for interacting with your Paperless-NGX document management system through AI assistants. It allows you to search, manage, and organize your documents using natural language commands.
You can install the Paperless-NGX MCP server using npm:
npx -y @baruchiro/paperless-mcp@latest
For Claude Desktop, install automatically via Smithery:
npx -y @smithery/cli install @baruchiro/paperless-mcp --client claude
Add one of these configurations to your MCP config file:
For STDIO mode (recommended for local or CLI use):
"paperless": {
"command": "npx",
"args": [
"-y",
"@baruchiro/paperless-mcp@latest"
],
"env": {
"PAPERLESS_URL": "http://your-paperless-instance:8000",
"PAPERLESS_API_KEY": "your-api-token"
}
}
For 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"
}
}
Replace the placeholders in your MCP config with your actual Paperless-NGX URL and API token.
Here are some tasks you can ask Claude to perform:
Get a paginated list of all documents:
list_documents({
page: 1,
page_size: 25
})
Retrieve a specific document by ID:
get_document({
id: 123
})
Perform full-text search across documents:
search_documents({
query: "invoice 2024"
})
Download a document file by ID:
download_document({
id: 123,
original: false
})
Perform operations on multiple documents at once:
// Add a tag to multiple documents
bulk_edit_documents({
documents: [1, 2, 3],
method: "add_tag",
tag: 5
})
// Set correspondent for documents
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
})
Upload a new document to Paperless-NGX:
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"
})
Get all tags:
list_tags()
Create a new tag:
create_tag({
name: "Invoice",
color: "#ff0000",
match: "invoice",
matching_algorithm: "fuzzy"
})
Get all correspondents:
list_correspondents()
Create a new correspondent:
create_correspondent({
name: "ACME Corp",
match: "ACME",
matching_algorithm: "fuzzy"
})
Get all document types:
list_document_types()
Create a new document type:
create_document_type({
name: "Invoice",
match: "invoice total amount due",
matching_algorithm: "any"
})
The server will display clear error messages if:
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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