这是一个用于与 Paperless-NGX API 服务器交互的 MCP(Model Context Protocol)服务器。该服务器提供了管理文档、标签、通信者和文档类型的工具。
要通过 Smithery 自动安装 Paperless NGX MCP 服务器到 Claude 桌面版:
npx -y @smithery/cli install @nloui/paperless-mcp --client claude
npm install -g paperless-mcp
对于 VSCode 扩展,编辑 ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
:
{
"mcpServers": {
"paperless": {
"command": "npx",
"args": ["paperless-mcp", "http://your-paperless-instance:8000", "your-api-token"]
}
}
}

对于 Claude 桌面应用程序,编辑 ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"paperless": {
"command": "npx",
"args": ["paperless-mcp", "http://your-paperless-instance:8000", "your-api-token"]
}
}
}

获取你的 API 令牌:
替换 MCP 配置中的占位符:
http://your-paperless-instance:8000
替换为你的 Paperless-NGX URLyour-api-token
替换为你刚刚生成的令牌完成!现在你可以让 Claude 帮助你管理 Paperless-NGX 文档了。
这里有一些你可以要求 Claude 做的事情:
获取分页的所有文档列表。
参数:
list_documents({
page: 1,
page_size: 25
})

通过 ID 获取特定文档。
参数:
get_document({
id: 123
})

在文档中进行全文搜索。
参数:
search_documents({
query: "invoice 2024"
})

通过 ID 下载文档文件。
参数:
download_document({
id: 123,
original: false
})

对多个文档执行批量操作。
参数:
示例:
// 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 document into parts
bulk_edit_documents({
documents: [9],
method: "split",
pages: "[1-2,3-4,5]"
})
// Modify multiple tags at once
bulk_edit_documents({
documents: [10, 11],
method: "modify_tags",
add_tags: [1, 2],
remove_tags: [3, 4]
})

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

获取所有标签。
list_tags()

创建新标签。
参数:
create_tag({
name: "Invoice",
color: "#ff0000",
match: "invoice",
matching_algorithm: "fuzzy"
})

获取所有联系人。
list_correspondents()

创建新联系人。
参数:
create_correspondent({
name: "ACME Corp",
match: "ACME",
matching_algorithm: "fuzzy"
})

获取所有文档类型。
list_document_types()

创建新文档类型。
参数:
create_document_type({
name: "Invoice",
match: "invoice total amount due",
matching_algorithm: "any"
})

如果发生以下情况,服务器将显示清晰的错误消息:
想要贡献代码或修改服务器?以下是你需要知道的内容:
npm install
server.js
进行修改node server.js http://localhost:8000 your-test-token
该服务器使用以下技术构建:
此 MCP 服务器实现了 Paperless-NGX REST API 的端点。有关底层 API 的更多详细信息,请参阅官方文档。