Skip to content

Commit 5c19f8e

Browse files
author
Sandro Lange
committed
feat: extends documentation
1 parent 45a70f4 commit 5c19f8e

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ A .NET 8 Web API that integrates with [Paperless-ngx](https://github.com/paperle
1919
- **/api/Export** -> uses multiple filters via query parameters (see swagger) and returns a compress zip file containing the documents and a metadata.xlsx file
2020
- **/api/Export/view** -> exports a saved view (user defined) and returns the same zip. Query parameters, ordering and so on is taken from the configured settings of the corresponding view
2121
- Exposes an OpenAPI compatible Swagger Documentation at /swagger
22+
- can store documents and excel metadata of saved views and return an url to download them later (one time download link)
23+
- provides a first version of a Mcp Server which allows to export saved views by name and/or id
2224

2325
Saved Views can be created by a user inside the Paperless UI. When exporting using this api we apply the most common filters from the view and try to export the metadata as accurate as possible.
2426

@@ -38,9 +40,65 @@ The following additional environment variables are optional but useful:
3840

3941
**EXCEL__NUMBER_FORMAT** <- how to format numbers in Excel, can be a valid number mask like 0.00 (2 decimal places)
4042

43+
**STORAGE__DATA_PATH** <- where to store files for one-time downloads (see McpServer section)
4144

4245
There are pre-built Docker-Images for amd64 and arm64:
4346

4447
docker.io/mctristan/paperless-export-api
4548

4649
use the :latest tag for the latest release, the corresponding version tag (i.e. v0.0.1) for a specific version.
50+
51+
## MCP Server
52+
53+
#### Note:
54+
The Model Context Protocol support is an early trial as the protocol is rather new and the tool supported rather limited.
55+
There is no docker support for the McpServer part yet so you have to have a dotnet runtime installed and you would need to check out the source and configure your favorite Ai tool to use the server.
56+
57+
A sample Claude configuration could look like this:
58+
59+
in `claude_desktop_config.json`
60+
```
61+
{
62+
"mcpServers": {
63+
"paperless-saved-view-exporter": {
64+
"command": "/Users/myusername/.dotnet/dotnet",
65+
"args": [
66+
"run",
67+
"--project",
68+
"/Users/myusername/Desktop/Projects/ExportPaperless/ExportPaperless.McpServer",
69+
"--no-build"
70+
],
71+
"env": {
72+
"MCP__EXPORT_PAPERLESS_API_URL": "http://localhost:5288/"
73+
}
74+
}
75+
}
76+
}
77+
```
78+
79+
Of course the ExportPaperless API needs to be running (i.e. as docker image or via dotnet run) as long as you want to use the McpServer tool.
80+
81+
Unfortunately Claude AI is not very helpful with error handling at the moment, you will most of the time only get an "invocation error" - that's it.
82+
Make sure your environment variables are correct (both in your paperless export api and the claude configuration file).
83+
84+
Make also sure you allow the access to the various tools (i.e.: always allow).
85+
86+
A sample query for Claude would then be:
87+
88+
```
89+
Can you help me export the documents of my saved view Invoices 2024 from my paperless instance?
90+
```
91+
92+
or
93+
94+
```
95+
Can you export invoices from paperless for me?
96+
```
97+
98+
or
99+
100+
```
101+
Can you export the saved view Invoices 2024 as excel for me?
102+
```
103+
104+
I guess you get the idea. What you will get in return (if everything works out) is a URL of .zip or .xlsx file which you can download (one time download).

0 commit comments

Comments
 (0)