proton-drive-mcp 1.9.0 → 1.10.0
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/CHANGELOG.md +9 -0
- package/README.md +7 -4
- package/dist/index.js +21 -3
- package/dist/services/drive.js +14 -1
- package/glama.json +4 -0
- package/package.json +1 -1
- package/smithery.yaml +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.0 — 2026-11-18
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **`drive_size` tool** (read-only, allowed in readonly mode, in the full tier only): size of one file or folder from the official CLI command `proton-drive filesystem size <path>`, which exists from CLI 0.9.0. The path honours `PROTON_DRIVE_REMOTE_ROOTS`. On CLI 0.8.x the command is unknown and the tool fails with "drive_size needs Proton Drive CLI 0.9.0 or newer". Now 55 tools; `drive_size` is MCP-only in the companion CLI. Not live-tested against a real account (output shape follows the CLI as-is, passed through the same noise trimming as `drive_info`).
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- Documentation: new safe-use guide for non-developers (`docs/GUIDE.md`): read-only setup, what the model provider sees, copy-paste prompts, and a checklist before allowing writes.
|
|
10
|
+
- Dependencies: `hono` 4.13.18, `@hono/node-server` 2.1.8; CI uses `codeql-action` 4.39.3.
|
|
11
|
+
|
|
3
12
|
## 1.9.0 — 2026-11-06
|
|
4
13
|
|
|
5
14
|
### Added
|
package/README.md
CHANGED
|
@@ -91,6 +91,8 @@ Ask: "Move all the PDFs in /Downloads into /Documents/Inbox. Show me the plan fi
|
|
|
91
91
|
|
|
92
92
|
Each call handles up to 200 items. For a first attempt on important data, use the [guard layer](#guard-layer-opt-in) (`PROTON_DRIVE_REMOTE_ROOTS` limits the folders Claude can touch).
|
|
93
93
|
|
|
94
|
+
New to this and want to stay cautious? See the [safe-use guide](docs/GUIDE.md).
|
|
95
|
+
|
|
94
96
|
---
|
|
95
97
|
|
|
96
98
|
## Why this, and not just the Proton Drive CLI?
|
|
@@ -109,7 +111,7 @@ What to expect: search matches names, sizes and dates, not the text of every fil
|
|
|
109
111
|
|
|
110
112
|
- **Claude manages your Proton Drive** — list, upload, download, move, share, trash, restore
|
|
111
113
|
- **Proton Photos album management** — list albums, create/delete albums, add and remove photos
|
|
112
|
-
- **Companion CLI** — 45 of the
|
|
114
|
+
- **Companion CLI** — 45 of the 55 operations, scriptable and pipeable, works in cron and shell scripts (the two sync-folder tools, `drive_read_file` and `drive_write_file`, `drive_audit_log`, `drive_size` and the newer `drive_read_many`, `drive_share_expiry_report`, `drive_recent_changes`, `drive_content_index`, `drive_search_content` and `drive_refresh_index` are MCP-only)
|
|
113
115
|
- **Full Proton Drive CLI command coverage** — all 32 scriptable commands of CLI 0.8.0 have a matching tool (checked against the CLI's own help; `auth login` is the one command excluded, since it's an interactive browser flow). Not every optional flag is exposed: `sharing invite --include-node-name` is deliberately off (it would put the file name in the invitation email in clear text) and the `inherited` invite role is not offered; commands that accept several paths run one path per call except bulk move and bulk trash
|
|
114
116
|
- **Zero credential exposure** — auth is handled entirely by the official Proton Drive CLI; this MCP never touches your password or session token
|
|
115
117
|
- **Shell injection safe** — all CLI calls pass discrete argument arrays to `spawn` (no shell), never string interpolation
|
|
@@ -410,7 +412,7 @@ The server offers four MCP prompts (also declared in the MCPB manifest): `organi
|
|
|
410
412
|
`drive_auth_status` · `drive_auth_logout` · `drive_version`
|
|
411
413
|
|
|
412
414
|
### Filesystem
|
|
413
|
-
`drive_list` · `drive_info` · `drive_read_content` · `drive_read_many` · `drive_tree` · `drive_search` · `drive_mkdir` · `drive_upload` · `drive_download` · `drive_rename` · `drive_move` · `drive_delete`
|
|
415
|
+
`drive_list` · `drive_info` · `drive_size` · `drive_read_content` · `drive_read_many` · `drive_tree` · `drive_search` · `drive_mkdir` · `drive_upload` · `drive_download` · `drive_rename` · `drive_move` · `drive_delete`
|
|
414
416
|
|
|
415
417
|
### Sharing
|
|
416
418
|
`drive_share_status` · `drive_share_invite` · `drive_share_revoke` · `drive_share_remove_all` · `drive_share_set_url` · `drive_share_remove_url`
|
|
@@ -456,6 +458,7 @@ The server offers four MCP prompts (also declared in the MCPB manifest): `organi
|
|
|
456
458
|
| `drive_version` | CLI and SDK version info | — |
|
|
457
459
|
| `drive_list` | List files and folders at a path (paginated, default 200; `/` lists the roots) | `path`, `limit?`, `offset?` |
|
|
458
460
|
| `drive_info` | Get metadata for one file/folder, including revision details (noise trimmed) | `path`, `verbose?` (raw CLI node) |
|
|
461
|
+
| `drive_size` | Size of one file or folder as reported by the CLI (`filesystem size`; needs Proton Drive CLI 0.9.0 or newer, read-only) | `path` |
|
|
459
462
|
| `drive_read_content` | Read the text of a file stored in Drive (no sync folder needed): text/code, `.docx`, text-layer `.pdf`; scans and images with opt-in local [OCR](#ocr-for-scans-opt-in). Paged; content is untrusted data. See [Reading file contents](#reading-file-contents) | `path`, `maxChars?` (default 20000, max 100000), `offset?` |
|
|
460
463
|
| `drive_read_many` | Read the text of up to 10 Drive files in one call, two at a time; per-file and total character caps; one failing file does not fail the rest. Content is untrusted data. See [Reading file contents](#reading-file-contents) | `paths` (max 10), `maxCharsPerFile?` (default 4000, max 20000), `maxTotalChars?` (default 40000, max 100000) |
|
|
461
464
|
| `drive_tree` | Folder overview: per-folder file counts and size totals (largest first), depth-limited, cached 5 min | `path?`, `depth?` (default 2, max 10), `limit?`, `foldersOnly?`, `refresh?` |
|
|
@@ -539,7 +542,7 @@ The server offers four MCP prompts (also declared in the MCPB manifest): `organi
|
|
|
539
542
|
|
|
540
543
|
### Token cost
|
|
541
544
|
|
|
542
|
-
`tools/list` is sent to the model in every session. Measured payload (JSON bytes): `full` 48.
|
|
545
|
+
`tools/list` is sent to the model in every session. Measured payload (JSON bytes): `full` 48.5 KB (55 tools), `core` 17.9 KB (19 tools). Set `PROTON_DRIVE_TOOL_TIER=core` to load only:
|
|
543
546
|
|
|
544
547
|
`drive_auth_status`, `drive_version`, `drive_list`, `drive_info`, `drive_read_content`, `drive_list_trash`, `drive_search`, `drive_tree`, `drive_mkdir`, `drive_upload`, `drive_download`, `drive_rename`, `drive_move`, `drive_copy`, `drive_trash`, `drive_restore`, `drive_share_status`, `photos_list_timeline`, `photos_download`.
|
|
545
548
|
|
|
@@ -675,7 +678,7 @@ Every tool group was live-tested on 2026-09-28 against a real Proton account, **
|
|
|
675
678
|
| `PROTON_DRIVE_OCR_TIMEOUT_MS` | Optional | Time limit for OCR of one file, in milliseconds (default 90000, max 600000); the engine process group is killed on expiry. |
|
|
676
679
|
| `PROTON_DRIVE_DEBUG` | Optional | Set to `1` to log debug lines (for example a failed background OCR warm-up) to stderr. |
|
|
677
680
|
| `PROTON_DRIVE_READ_TIMEOUT_MS` | Optional | Hard time limit for parsing one `.pdf`/`.docx` in `drive_read_content`, in milliseconds (default 20000; clamped to 1-120000). On expiry the parsing worker is terminated and the call returns an error. |
|
|
678
|
-
| `PROTON_DRIVE_TOOL_TIER` | Optional | `full` (default, all
|
|
681
|
+
| `PROTON_DRIVE_TOOL_TIER` | Optional | `full` (default, all 55 tools) or `core` (19 everyday tools; see [Token cost](#token-cost)). Tools outside the active tier are hidden from `tools/list` and refused at call time. Read once at startup; an unknown value falls back to `full` with a warning on stderr. |
|
|
679
682
|
| `PROTON_DRIVE_MODE` | Optional | `full` (default) or `readonly`: hide and refuse every tool that changes Drive or the account. An unknown value is treated as `readonly`, with a warning. See [Guard layer](#guard-layer-opt-in). |
|
|
680
683
|
| `PROTON_DRIVE_REMOTE_ROOTS` | Optional | Drive folders (separated by `:`, or `;` on Windows) that every remote path argument must stay inside, e.g. `/my-files/Projects/X`. Tools that cannot be limited to a folder are refused while it is set. See [Guard layer](#guard-layer-opt-in). |
|
|
681
684
|
| `PROTON_DRIVE_AUDIT_LOG` | Optional | Absolute path of an append-only, hash-chained JSONL audit log (`0600`). If it cannot be written, tools that change Drive are refused. Read it with `drive_audit_log`. See [Guard layer](#guard-layer-opt-in). |
|
package/dist/index.js
CHANGED
|
@@ -200,6 +200,22 @@ const TOOLS = [
|
|
|
200
200
|
additionalProperties: false,
|
|
201
201
|
},
|
|
202
202
|
},
|
|
203
|
+
{
|
|
204
|
+
name: "drive_size",
|
|
205
|
+
description: "Get the size of one Proton Drive file or folder as reported by the CLI (`filesystem size`; folders are totalled by the CLI). Read-only. Needs Proton Drive CLI 0.9.0 or newer. For per-folder breakdowns use drive_tree.",
|
|
206
|
+
annotations: { readOnlyHint: true, idempotentHint: true },
|
|
207
|
+
inputSchema: {
|
|
208
|
+
type: "object",
|
|
209
|
+
properties: {
|
|
210
|
+
path: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "Absolute remote path, e.g. /my-files/Projects.",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
required: ["path"],
|
|
216
|
+
additionalProperties: false,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
203
219
|
{
|
|
204
220
|
name: "drive_tree",
|
|
205
221
|
description: "Folder overview with per-folder file counts and size totals, largest first. Returns {files, folders, size, complete, unexpanded?, skipped?, tree}. Totals cover opened folders only; 'unexpanded' counts folders not opened (depth limit, .git/node_modules, failures). complete=false: part of the tree failed to load. Cached 5 min; refresh=true re-reads.",
|
|
@@ -1143,7 +1159,7 @@ const TOOL_TITLES = {
|
|
|
1143
1159
|
drive_find_duplicates: "Find duplicate files", drive_sharing_audit: "Audit sharing",
|
|
1144
1160
|
drive_sync_plan: "Plan local/Drive sync", drive_bulk_move: "Move many items", drive_bulk_trash: "Trash many items",
|
|
1145
1161
|
drive_auth_status: "Check sign-in status", drive_auth_logout: "Sign out", drive_version: "CLI version",
|
|
1146
|
-
drive_list: "List folder", drive_info: "Get item info", drive_upload: "Upload to Drive", drive_download: "Download from Drive",
|
|
1162
|
+
drive_list: "List folder", drive_info: "Get item info", drive_size: "Get item size", drive_upload: "Upload to Drive", drive_download: "Download from Drive",
|
|
1147
1163
|
drive_mkdir: "Create folder", drive_rename: "Rename item", drive_move: "Move item", drive_delete: "Delete permanently",
|
|
1148
1164
|
drive_share_status: "Show sharing status", drive_list_trash: "List trash", drive_share_invite: "Invite to share",
|
|
1149
1165
|
drive_share_revoke: "Revoke member access", drive_trash: "Move to trash", drive_restore: "Restore from trash",
|
|
@@ -1221,7 +1237,7 @@ export const MUTATING_TOOL_NAMES = new Set([
|
|
|
1221
1237
|
]);
|
|
1222
1238
|
/** Reads and analytics. Downloads only write to the local disk; so does the content index (an encrypted local file). */
|
|
1223
1239
|
export const READ_TOOL_NAMES = new Set([
|
|
1224
|
-
"drive_auth_status", "drive_version", "drive_list", "drive_info", "drive_tree", "drive_search", "drive_download",
|
|
1240
|
+
"drive_auth_status", "drive_version", "drive_list", "drive_info", "drive_size", "drive_tree", "drive_search", "drive_download",
|
|
1225
1241
|
"drive_list_trash", "drive_share_status", "drive_list_invitations", "drive_read_content", "drive_read_file",
|
|
1226
1242
|
"drive_sync_plan", "drive_usage", "drive_find_duplicates", "drive_sharing_audit", "drive_audit_log",
|
|
1227
1243
|
"drive_read_many", "drive_share_expiry_report", "drive_recent_changes", "drive_content_index", "drive_search_content", "drive_refresh_index",
|
|
@@ -1239,7 +1255,7 @@ export function resolveMode(raw) {
|
|
|
1239
1255
|
const walkRoot = [{ arg: "path", dflt: "/my-files" }];
|
|
1240
1256
|
const sharePath = [{ arg: "path" }];
|
|
1241
1257
|
export const REMOTE_PATH_ARGS = {
|
|
1242
|
-
drive_list: [{ arg: "path" }], drive_info: [{ arg: "path" }], drive_read_content: [{ arg: "path" }],
|
|
1258
|
+
drive_list: [{ arg: "path" }], drive_info: [{ arg: "path" }], drive_size: [{ arg: "path" }], drive_read_content: [{ arg: "path" }],
|
|
1243
1259
|
drive_read_file: [{ arg: "path" }], drive_write_file: [{ arg: "path" }], drive_mkdir: [{ arg: "path" }],
|
|
1244
1260
|
drive_tree: walkRoot, drive_search: walkRoot, drive_usage: walkRoot, drive_find_duplicates: walkRoot, drive_sharing_audit: walkRoot,
|
|
1245
1261
|
drive_share_expiry_report: walkRoot, drive_recent_changes: walkRoot, drive_refresh_index: walkRoot, drive_read_many: [{ arg: "paths", list: true }],
|
|
@@ -1436,6 +1452,8 @@ export async function main() {
|
|
|
1436
1452
|
}
|
|
1437
1453
|
case "drive_info":
|
|
1438
1454
|
return ok(await drive.info(validateRemotePath(a.path), a.verbose === true));
|
|
1455
|
+
case "drive_size":
|
|
1456
|
+
return ok(await drive.size(validateRemotePath(a.path)));
|
|
1439
1457
|
case "drive_tree":
|
|
1440
1458
|
return ok(await driveTree(drive, a));
|
|
1441
1459
|
case "drive_search":
|
package/dist/services/drive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { runDrive as defaultRunDrive, runDriveRaw as defaultRunDriveRaw } from "../utils/subprocess.js";
|
|
2
|
-
import { DriveNotAuthenticatedError, DriveParseError } from "../utils/errors.js";
|
|
2
|
+
import { DriveCliError, DriveNotAuthenticatedError, DriveParseError } from "../utils/errors.js";
|
|
3
3
|
import { validateName } from "../utils/validation.js";
|
|
4
4
|
import { invalidatePath } from "./walk.js";
|
|
5
5
|
// A trashed item shows up in the trash listings, so cached trash walks go stale too.
|
|
@@ -333,6 +333,19 @@ export class DriveService {
|
|
|
333
333
|
return trimmed;
|
|
334
334
|
return { ...trimmed, ...revisionMeta(raw) };
|
|
335
335
|
}
|
|
336
|
+
// `filesystem size` exists from CLI 0.9.0. Older CLIs print usage or "unknown command"
|
|
337
|
+
// for it; that is mapped to a clear message instead of leaking the usage text.
|
|
338
|
+
async size(remotePath) {
|
|
339
|
+
try {
|
|
340
|
+
return trimNode(await this.run(["filesystem", "size", remotePath]));
|
|
341
|
+
}
|
|
342
|
+
catch (err) {
|
|
343
|
+
if (err instanceof DriveCliError && /unknown (sub)?command|command not found|^\s*usage:/im.test(err.message)) {
|
|
344
|
+
throw new Error("drive_size needs Proton Drive CLI 0.9.0 or newer");
|
|
345
|
+
}
|
|
346
|
+
throw err;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
336
349
|
// Renames in place — does not move to a different folder. Returns the
|
|
337
350
|
// renamed node (raw pass-through).
|
|
338
351
|
async rename(remotePath, newName) {
|
package/glama.json
CHANGED
|
@@ -170,6 +170,10 @@
|
|
|
170
170
|
"name": "photos_upload",
|
|
171
171
|
"description": "Upload local photos or videos directly into your Proton Photos library."
|
|
172
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"name": "drive_size",
|
|
175
|
+
"description": "Get the size of one Proton Drive file or folder (needs Proton Drive CLI 0.9.0 or newer)."
|
|
176
|
+
},
|
|
173
177
|
{
|
|
174
178
|
"name": "drive_tree",
|
|
175
179
|
"description": "Show a Proton Drive folder as a tree with per-folder file counts and size totals."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proton-drive-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"mcpName": "io.github.googlarz/proton-drive-mcp",
|
|
5
5
|
"description": "MCP server and CLI that gives Claude full access to Proton Drive — upload, download, share, and manage your end-to-end encrypted files without leaving the conversation.",
|
|
6
6
|
"type": "module",
|