You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58Lines changed: 58 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ A .NET 8 Web API that integrates with [Paperless-ngx](https://github.com/paperle
19
19
-**/api/Export** -> uses multiple filters via query parameters (see swagger) and returns a compress zip file containing the documents and a metadata.xlsx file
20
20
-**/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
21
21
- 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
22
24
23
25
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.
24
26
@@ -38,9 +40,65 @@ The following additional environment variables are optional but useful:
38
40
39
41
**EXCEL__NUMBER_FORMAT** <- how to format numbers in Excel, can be a valid number mask like 0.00 (2 decimal places)
40
42
43
+
**STORAGE__DATA_PATH** <- where to store files for one-time downloads (see McpServer section)
41
44
42
45
There are pre-built Docker-Images for amd64 and arm64:
43
46
44
47
docker.io/mctristan/paperless-export-api
45
48
46
49
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:
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