@orellbuehler/paperless-mcp 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -4
- package/dist/paperless/format.js +1 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -75,6 +75,18 @@ claude mcp add paperless --scope user \
|
|
|
75
75
|
-- node /path/to/paperless-mcp/dist/index.js
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
### Regenerating the API spec
|
|
79
|
+
|
|
80
|
+
`paperless-openapi.yaml` is the Paperless-ngx OpenAPI schema used as a reference when building tools. Pull a fresh copy straight from a running instance (no Docker needed):
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
PAPERLESS_URL=https://your-paperless-instance.example.com \
|
|
84
|
+
PAPERLESS_TOKEN=your-api-token \
|
|
85
|
+
npm run spec:update
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This fetches `GET /api/schema/` and overwrites `paperless-openapi.yaml`. Run it whenever you upgrade Paperless-ngx.
|
|
89
|
+
|
|
78
90
|
## Available Tools
|
|
79
91
|
|
|
80
92
|
### Core API Tools
|
|
@@ -163,14 +175,28 @@ Browser-based clients are blocked unless you list their origin in
|
|
|
163
175
|
`MCP_ALLOWED_ORIGINS`. If the server is reachable on a public hostname, set
|
|
164
176
|
`MCP_ALLOWED_HOSTS` to the expected host(s) for DNS-rebinding protection.
|
|
165
177
|
|
|
166
|
-
## Run as an HTTP sidecar (Docker
|
|
178
|
+
## Run as an HTTP sidecar (Docker)
|
|
179
|
+
|
|
180
|
+
A prebuilt image is published to the GitHub Container Registry on every release
|
|
181
|
+
and every push to `main`:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
ghcr.io/orellbuehler/paperless-mcp:latest # tracks main
|
|
185
|
+
ghcr.io/orellbuehler/paperless-mcp:1 # latest 1.x release
|
|
186
|
+
ghcr.io/orellbuehler/paperless-mcp:1.0.0 # exact version
|
|
187
|
+
```
|
|
167
188
|
|
|
168
|
-
|
|
169
|
-
|
|
189
|
+
Pull it directly:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
docker pull ghcr.io/orellbuehler/paperless-mcp:latest
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Add the server as a service next to your existing Paperless-ngx compose stack:
|
|
170
196
|
|
|
171
197
|
```yaml
|
|
172
198
|
paperless-mcp:
|
|
173
|
-
|
|
199
|
+
image: ghcr.io/orellbuehler/paperless-mcp:latest
|
|
174
200
|
restart: unless-stopped
|
|
175
201
|
depends_on:
|
|
176
202
|
- webserver
|
|
@@ -189,6 +215,18 @@ paperless-mcp:
|
|
|
189
215
|
OPENAI_API_KEY: <key>
|
|
190
216
|
```
|
|
191
217
|
|
|
218
|
+
The image already defaults to `MCP_TRANSPORT=http`, `PORT=3001`, and
|
|
219
|
+
`PAPERLESS_MCP_DATA=/data`, so the only variables you must set are
|
|
220
|
+
`PAPERLESS_URL` and `PAPERLESS_TOKEN` (plus `OPENAI_API_KEY` when semantic
|
|
221
|
+
search is enabled). Mount a volume at `/data` to persist the embedding index
|
|
222
|
+
across restarts.
|
|
223
|
+
|
|
192
224
|
LAN clients connect to `http://<host>:3001/mcp` with their own Paperless API
|
|
193
225
|
token. Run `sync_embeddings` once with the admin token to build the shared
|
|
194
226
|
semantic index.
|
|
227
|
+
|
|
228
|
+
To build the image yourself instead of pulling it, a `Dockerfile` is included:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
docker build -t paperless-mcp .
|
|
232
|
+
```
|
package/dist/paperless/format.js
CHANGED
|
@@ -6,10 +6,7 @@ export function buildQS(params) {
|
|
|
6
6
|
if (Array.isArray(v)) {
|
|
7
7
|
if (v.length === 0)
|
|
8
8
|
continue;
|
|
9
|
-
|
|
10
|
-
sp.set(k, v.join(","));
|
|
11
|
-
else
|
|
12
|
-
v.forEach((item) => sp.append(k, String(item)));
|
|
9
|
+
sp.set(k, v.join(","));
|
|
13
10
|
}
|
|
14
11
|
else {
|
|
15
12
|
sp.set(k, String(v));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orellbuehler/paperless-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Model Context Protocol server for Paperless-ngx: documents, organization, saved views, users, workflows, and optional semantic search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"lint": "eslint src",
|
|
20
20
|
"format": "prettier --write .",
|
|
21
21
|
"format:check": "prettier --check .",
|
|
22
|
+
"spec:update": "bash scripts/update-openapi.sh",
|
|
22
23
|
"prepare": "npm run build"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|