Back to Browse

Proton Drive MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Unofficial MCP server for Proton Drive and Photos, driving the official Proton Drive CLI.

About

Unofficial MCP server for Proton Drive and Photos, driving the official Proton Drive CLI.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (2 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (3/3 approved).

3 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "proton-drive-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "proton-drive-mcp@1.13.1"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

  ____  ____   ___ _____ ___  _   _   ____  ____  _____     _______ 
 |  _ \|  _ \ / _ \_   _/ _ \| \ | | |  _ \|  _ \|_ _\ \   / / ____|
 | |_) | |_) | | | || || | | |  \| | | | | | |_) || | \ \ / /|  _|  
 |  __/|  _ <| |_| || || |_| | |\  | | |_| |  _ < | |  \ V / | |___ 
 |_|   |_| \_\\___/ |_| \___/|_| \_| |____/|_| \_\___|  \_/  |_____|
  MCP server and CLI · Full Proton Drive control for Claude

npm version CI License: MIT Node.js 22+ TypeScript MCP GitHub stars Last commit Platforms proton-drive-mcp MCP server


Unofficial community project, not affiliated with or endorsed by Proton AG. Proton and Proton Drive are trademarks of Proton AG. This server only drives the official Proton Drive CLI and never handles your password or session. See the threat model for what it protects and what reaches your AI provider.

Give Claude Desktop (or any MCP client) full access to your Proton Drive and Proton Photos: list folders, upload and download files, invite collaborators, manage sharing, handle trash, and manage photo albums — all with end-to-end encryption intact. Most of the same operations are also available as a companion CLI for scripting, backups, and cron.

Related projects: the same author's Proton Mail Bridge MCP server handles Proton Mail. It is a separate server on purpose: mail and Drive need different permissions, so you can grant a model one without the other.

Quick start (60 seconds)

  1. Install the official Proton Drive CLI, then sign in once: proton-drive auth login.
  2. Not sure about the details? Run npx -y proton-drive-mcp init. It finds the proton-drive CLI, runs the same checks as doctor, tells you the exact next step if something is wrong (for example proton-drive auth login), and prints the ready-to-paste Claude Desktop config and claude mcp add line. Add --write to put the Claude Desktop entry in place (dry run by default, timestamped backup first, other servers untouched). Or connect manually, either way:
    • Bundle: install proton-drive-mcp-<version>.mcpb from the latest release. The CLI is found automatically in the usual places; if not, set proton-drive CLI path to the output of which proton-drive.
    • Global install: npm install -g proton-drive-mcp, then proton-drive-cli doctor, then proton-drive-cli setup-claude-desktop --write. (setup-claude-desktop refuses to run from a temporary npx cache, so install globally first.) Fully quit and restart Claude Desktop afterwards.
    • Claude Code: claude mcp add proton-drive --env PROTON_DRIVE_BIN="$(which proton-drive)" -- npx -y proton-drive-mcp
  3. Try these prompts:
    • "Find files named invoice in my Drive." (drive_search)
    • "What is using my Drive space?" (drive_usage)
    • "Find duplicate files in my Drive." (drive_find_duplicates)
    • "Who has access to my shared folders?" (drive_sharing_audit)
    • "Tidy up /Downloads, show me a plan first." (drive_bulk_move / drive_bulk_trash preview first, nothing changes until you approve)
  4. Sensitive files? Start read-only and confined: PROTON_DRIVE_MODE=readonly and PROTON_DRIVE_REMOTE_ROOTS=/my-files/<folder>, plus an audit log (guard layer, secure setup).
  5. Optional: PROTON_DRIVE_INDEX=1 keeps a plaintext local copy of file names so searches are instant after a restart (details); PROTON_DRIVE_TOOL_TIER=core exposes a smaller tool set.

Compatibility

Status
Proton Drive CLIBuilt against 0.8.0 (all 32 scriptable commands, without auth login, have a tool). Of the 34 in 0.9.0, takeout run has none. 0.9.0 (SDK js 0.22.2) was live-tested for file operations (list, info, tree, search, read, download, upload, mkdir, rename, move, trash), sharing reads and the audit, and photo and album reads; sharing changes, album and photo writes, and other versions are untested. Run proton-drive-cli doctor after upgrading the CLI.
Node.js22 or newer
macOSLive-tested. Built-in Vision OCR.
LinuxThe test suite runs on Ubuntu in CI; not live-tested against a real account.
WindowsNot supported

Recipes

Checkup, cleanup, undo

Ask: "Give /my-files/Documents a checkup." Claude calls drive_checkup and reports a score from 0 to 100 and what it found: exact-duplicate candidates and the space they waste, empty folders, large old files, public links without a known expiry, items shared with other accounts, sensitive-looking names inside shared items, and what sits in the trash. Say "Do it" for the safe part and the flow continues:

  1. drive_cleanup with path and fixes (duplicates, empty-folders) returns a plan and changes nothing. The server, not the assistant, builds the list from a fresh, complete scan: Claude names no files, the copy that is kept is never on the list, and items that are shared, under a shared folder or link, or whose name is already in the trash are left out and reported under skipped.
  2. With confirmed: true the server asks you to approve the exact list (see Human approval; a list too long for the macOS dialog goes to the terminal), showing for each item the path that goes to the trash and, on the next line, the copy that is kept (/my-files/Documents/Inbox/2024-03 (1).pdf then keeps: /my-files/Documents/Invoices/2024-03.pdf), and applies it only if you approve and Drive has not changed since. It uses the same batched trash call as drive_bulk_trash: everything goes to the trash, nothing is deleted. Up to 50 items per call, so the client dialog or the terminal record lists every item with its kept copy (each path with up to 600 characters, unusual characters shown as escapes); remaining says how many are left and Claude calls again.
  3. The result carries an undo code such as U7K2-M9XD. Say "undo that" and Claude calls drive_undo. The server asks you to approve again (always, also for a plain restore), then puts each item back in its original folder and checks every one by its id.

drive_undo also covers drive_bulk_trash, drive_trash, drive_bulk_move, drive_move and drive_rename; these now record what they change (see Undo). The MCP prompt drive-checkup (argument path) runs the whole flow. On the command line: proton-drive-cli checkup [path] and proton-drive-cli undo.

Privacy.

  • Nothing new leaves your computer. No new network call, no telemetry, no dependency.
  • Your model provider sees what the tools return. For a checkup summary that is counts, sizes, a score and at most 3 example names per finding (the result states the number as namesInResult); a finding page shows up to 200 names; a cleanup plan shows at most 10 sample lines.
  • The full list of items to trash is shown to you by the server in the approval question (dialog or terminal record). It does not pass through the model.
  • The undo record is a local file with the names of the items you changed, kept 30 days (at most 50 bulk and 50 single-item batches).
  • No file content is read unless you ask drive_cleanup for verify, which downloads candidates to a private temporary folder, hashes them and deletes them.

Honest limits.

  • Undo works while the items are in the trash, and only for items whose name is unique there. The CLI restores a trashed item by name, so an item whose name is already in the trash (or that shares a name with another item of the same batch) cannot be restored safely. drive_cleanup leaves such items out; drive_trash and drive_bulk_trash still trash them but mark them not undoable in the result.
  • Trash does not free space until you empty it, and emptying is permanent. A cleanup result does not claim freed space.
  • Nothing is overwritten on undo. If the original folder is gone or already holds an item of that name, that item is skipped with the reason.
  • The duplicate finding relies on the hash the uploader claimed. Without verify, drive_cleanup only acts on groups with the same claimed hash and size where nothing is shared; anything shared needs verify: true, which downloads and compares sha256.
  • The score is a conversation starter, not a measurement. Names that look sensitive are a guess from file names only.
  • drive_checkup walks the folder like drive_usage does: on a big drive the first call can answer partial: true; call it again. Point it at one folder, or enable the persistent index.
  • drive_cleanup needs a complete, fresh listing and refuses otherwise: when the whole walk would need more than 300 folder listings (the cap on listing calls for one walk, not per folder), when a folder cannot be listed, or when an entry comes back without an id. Its walk has no time limit and it never reads the saved index, so on a big folder the plan can take longer than your client waits (a client timeout can hit before the plan returns): point it at a subfolder. Only one bulk apply (drive_cleanup, drive_undo apply, drive_bulk_trash, drive_bulk_move) runs at a time: a second one that arrives meanwhile is refused at once with "nothing was changed" (in human and strict mode without a dialog; in model mode a dialog may already have been shown before the call reached the lock, and that yes is not used).
  • Journalling adds one folder listing per single-item call (drive_trash, drive_move, drive_rename; none for a trashed photo); drive_bulk_trash and drive_cleanup also list /trash once. Undo puts an item back only into the same folder it came from, not into a new folder that took over the old name.
  • A live test of drive_cleanup and drive_undo passed on 2026-11-20 on a scratch folder with CLI 0.9.0, using terminal approvals; clicking an approval dialog has not been verified. Claude Desktop showed no client dialog in the author's use, and the macOS dialog has not yet been verified on screen (approval routes). Windows is untested.

How the score is computed. It starts at 100. Each finding that is present takes off min(cap, ceil(units x rate)) points, integer arithmetic only; scoreParts in the result shows every deduction. The lowest possible score is 5.

FindingUnitsPoints per unitCap
duplicatesextra copies (group size minus 1, summed)1/215
empty-foldersempty folders1/105
large-oldfiles of at least minSizeMB (default 50) not changed for olderThanDays (default 365)110
public-linkspublic links without a known expiry520
outside-accessitems shared with other accounts210
sensitive-exposedsensitive-looking names in shared places830
trashwhole GiB in the trash15

Find my scanned documents

Searching by name (drive_search) will not find a scan called IMG_0042.jpg. Search by content instead:

  1. Set PROTON_DRIVE_OCR=1 and PROTON_DRIVE_CONTENT_INDEX=1 in the server's environment and restart it. Both are off by default.
  2. Ask: "Index my /my-files/Scans folder." Claude calls drive_content_index with that path. If the result says partial: true, it calls again to continue.
  3. Ask: "Find the scan that mentions my 2023 tax return." Claude calls drive_search_content.

Honest limits: on macOS the OCR helper is compiled the first time it is needed, a one-time wait of about 30 s (the server warms it in the background shortly after start). OCR makes mistakes, especially on handwriting, low-resolution photos and unusual layouts, so a document can be missed or matched on a wrong word; open the file to check. OCR runs one file at a time, so a big folder of scans takes a while. The index covers only the folders you indexed and reflects the last update. Details: OCR for scans, Content search.

Audit who can see my files

Ask: "Who has access to my shared folders?" and then "Which public links expire soon or never expire?"

  • drive_sharing_audit lists public links (role, expiry, password), invitees and pending invitations, with risk flags such as public-link-no-expiry, public-link-editor and external-invitee.
  • drive_share_expiry_report lists public links with the time left, soonest first (withinDays sets what counts as soon).

Both only read; they change nothing, and link URLs are left out of the results. Each checks at most 100 shared items, so on a big drive point it at one folder at a time. To act on a finding, drive_share_remove_url or drive_share_revoke change sharing; the server asks you to approve each one (Human approval).

Tidy a folder safely

Ask: "Move all the PDFs in /Downloads into /Documents/Inbox. Show me the plan first."

  1. drive_bulk_move (or drive_bulk_trash for clean-up) without confirmed returns a plan and any problems and changes nothing.
  2. Read the plan. If it is right, say so, and Claude repeats the call with confirmed=true. That argument only switches from plan to apply; it is not your approval. Before anything moves, the server asks you to approve the exact list (a bulk trash writes out every path; a move of more than 50 shows counts per folder and the first 50; the macOS dialog shortens long move lists further and sends long trash lists to the terminal). It applies only if there are no problems, and only if the plan it computes after your approval is the same as the one you saw; if Drive changed in between, nothing is applied (approval_changed). If your client cannot show a dialog, the server uses its macOS dialog, and where that is not possible the call is refused until you approve it in a terminal (Human approval, threat model).
  3. Trash is reversible: drive_restore brings an item back (drive_list_trash shows what is there). drive_empty_trash and drive_delete are permanent, so do not ask for those during a tidy-up.

Each call handles up to 200 items. For a first attempt on important data, use the guard layer (PROTON_DRIVE_REMOTE_ROOTS limits the folders Claude can touch).

New to this and want to stay cautious? See the safe-use guide.


Why this, and not just the Proton Drive CLI?

For syncing, backups and cron jobs, use the official CLI directly: it is simpler and that is what it is for. This project does not replace it; it needs it, and wraps it so an AI assistant can drive it. It is worth using when you want to work with your Drive by conversation:

  • Things the CLI does not have (it has no search, recursive listing, usage or content-reading commands, and Drive's end-to-end encryption rules out server-side search): drive_search, drive_tree, drive_usage, drive_find_duplicates (verified by sha256), drive_sharing_audit, drive_read_content, drive_sync_plan. They run locally on your computer, so encryption stays intact.
  • Checkup, cleanup and undo: drive_checkup gives a folder a health report, drive_cleanup trashes redundant copies from a list the server builds, and drive_undo puts a recorded batch back, each item checked by its id. See Checkup, cleanup, undo.
  • Safe changes by an AI: destructive or outward-facing actions need your own approval, asked by the server and not by the assistant (a dialog in your client, a macOS dialog, or a command you run in a terminal); bulk move/trash is two steps (plan first, then apply), trash is reversible, and the duplicate finder never deletes anything. A bare CLI assumes you know exactly what you are doing.
  • Rough edges smoothed over: the CLI reports some per-item failures with exit code 0, returns lists in random order, and can fail with database is locked under parallel calls. The server checks per-item results, sorts and paginates lists, and retries read-only calls.

What to expect: search matches names, sizes and dates, not the text of every file (you read one file at a time); the first walk of a large drive takes minutes unless you enable the opt-in persistent index; and this is an independent project, not an official Proton product.


What you get

  • Claude manages your Proton Drive — list, upload, download, move, share, trash, restore
  • Proton Photos album management — list albums, create/delete albums, add and remove photos
  • Companion CLI — 47 of the 58 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, drive_refresh_index and drive_cleanup are MCP-only)
  • Proton Drive CLI command coverage — all 32 scriptable commands of CLI 0.8.0 and 33 of the 34 of CLI 0.9.0 have a matching tool (checked against the CLI's own help; takeout run has none, and auth login is 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
  • Zero credential exposure — auth is handled entirely by the official Proton Drive CLI; this MCP never touches your password or session token
  • Shell injection safe — all CLI calls pass discrete argument arrays to spawn (no shell), never string interpolation
  • Privacy-native — end-to-end encryption is handled by Proton's own CLI; this server is just a thin MCP wrapper

Privacy model

Your files travel: Proton Drive (cloud, E2E encrypted) → Proton Drive CLI (local, decrypts) → this MCP server (local) → your AI client.

The Proton Drive CLI handles all cryptography locally. This MCP server calls the CLI as a subprocess and forwards results — it never receives your password, never stores credentials, and never touches the raw encrypted data. Authentication state lives in your OS keychain (macOS Keychain, Linux libsecret; the official CLI also uses Windows Credential Manager on Windows, which this project does not support), managed exclusively by the official Proton CLI.

If you use Claude Desktop with the default Anthropic API, file content you ask Claude to act on is sent to Anthropic per their privacy policy.


Prerequisites

1. Proton Drive CLI — download from proton.me/download/drive/cli and add to your PATH.

2. Authenticate the CLI — run once in your terminal:

proton-drive auth login

This opens a browser for Proton's standard sign-in flow. Credentials are stored in your OS keychain — not on disk, not in config files.

3. Node.js 22 or later — node --version to check.


Install

Via npx (no install needed):

# Used directly in Claude Desktop config — no global install required
npx -y proton-drive-mcp

Global install:

npm install -g proton-drive-mcp

Connect to Claude Desktop

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows (informational only, this project does not support Windows): %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "proton-drive-mcp": {
      "command": "npx",
      "args": ["-y", "proton-drive-mcp"],
      "env": { "PROTON_DRIVE_BIN": "/absolute/path/to/proton-drive" }
    }
  }
}

Claude Desktop starts servers with a minimal PATH. Without PROTON_DRIVE_BIN the server looks for proton-drive in PATH, then ~/.local/bin, /opt/homebrew/bin and /usr/local/bin. If it is elsewhere, set PROTON_DRIVE_BIN to the output of which proton-drive, written out in full (e.g. /Users/you/.local/bin/proton-drive). If npx itself is not found, use its absolute path as command (which npx).

Restart Claude Desktop. Check + → Connectors → proton-drive-mcp to confirm the server is connected.

Tip: Make sure proton-drive auth login has been run at least once before starting Claude Desktop.

One-click install (MCPB bundle)

Instead of editing JSON, download proton-drive-mcp-<version>.mcpb from the latest GitHub release and open it (or drag it into Settings → Extensions in Claude Desktop). In the extension settings, proton-drive CLI path can stay empty (the CLI is searched in PATH, ~/.local/bin, /opt/homebrew/bin and /usr/local/bin); otherwise set it to the output of which proton-drive. Optionally set the Proton Drive sync folder to enable drive_read_file / drive_write_file, and the Persistent search index switch (off by default; it stores file names in plain text on this computer, see Persistent index). The Who approves destructive operations setting (human by default, strict, or model) is PROTON_DRIVE_APPROVAL, see Human approval. Keep an undo record (on by default) is PROTON_DRIVE_UNDO. You still need the official proton-drive CLI installed and proton-drive auth login done once.

If installed globally

The simplest way is proton-drive-cli setup-claude-desktop --write, which writes absolute paths (see Setup and diagnostics). By hand, because of the minimal PATH, use the output of which node as command and the installed dist/index.js (under npm root -g) as its argument:

{
  "mcpServers": {
    "proton-drive-mcp": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/node_modules/proton-drive-mcp/dist/index.js"],
      "env": { "PROTON_DRIVE_BIN": "/absolute/path/to/proton-drive" }
    }
  }
}

Setup and diagnostics

Three commands of the companion CLI help when Claude Desktop reports "proton-drive CLI not found" (it starts servers with a minimal PATH). init combines the first two for a first run (it also works as npx -y proton-drive-mcp init, writing the npx form of the entry so no package path is pinned):

# First run: doctor checks + ready-to-paste Claude Desktop and Claude Code config; --write adds the Desktop entry
proton-drive-cli init [--json] [--config <path>] [--write]

# Read-only checks: Node >= 22, proton-drive CLI + version, auth, PROTON_DRIVE_SYNC_PATH, your Claude Desktop entry
proton-drive-cli doctor [--json] [--config <path>]

# Dry run: prints the entry it would add and the target file, changes nothing
proton-drive-cli setup-claude-desktop [--config <path>] [--sync-path <dir>]

# Apply it (timestamped backup first; only mcpServers["proton-drive-mcp"] is touched)
proton-drive-cli setup-claude-desktop --sync-path "$HOME/Proton Drive" --write

doctor exits 1 if any check fails (warnings do not fail). It only ever reports on the proton-drive-mcp entry of the config, never on other servers. setup-claude-desktop writes the absolute path of the running node, of this package's dist/index.js, and of the resolved proton-drive binary (PROTON_DRIVE_BIN, otherwise found automatically). It refuses to run if the CLI cannot be found, the config file is not valid JSON, or the package is running from a temporary npx cache (install it first with npm install -g proton-drive-mcp). The entry pins the current node binary, so re-run it after switching Node versions (e.g. with nvm). Re-running with unchanged settings leaves the file alone; otherwise the file is replaced atomically and a timestamped .bak-… copy is kept.

The default config location is per OS (macOS ~/Library/Application Support/Claude/, Windows %APPDATA%\Claude\, Linux $XDG_CONFIG_HOME or ~/.config/Claude/); use --config or the CLAUDE_DESKTOP_CONFIG environment variable to point elsewhere. On Windows the CLI lookup honours PATHEXT.

Claude Desktop only reads its config at startup: fully quit and restart it afterwards (closing the window is not enough).


Try it: example Claude prompts

Backup a build artifact

"Upload ./dist/app-v2.zip to /my-files/Releases and tell me if it succeeded."

Morning file triage

"List everything in /my-files. Tell me what's larger than 10MB and what was modified most recently."

Share a folder with a colleague

"Share /my-files/Q2-Reports with alice@proton.me as editor. Add a message: 'Please review before Friday.'"

Offboarding

"Revoke bob@company.com's access from /my-files/Projects and /shared/Design. Confirm when done."

Automated download

"Download /my-files/contracts/nda-2026.pdf to ~/Documents/Legal/."

Trash cleanup

"List what's in the trash and empty it once I confirm."


CLI

proton-drive-cli <command> [args]

Each command accepts only its own flags (see proton-drive-cli --help), plus --json. Anything else that looks like a flag, including a typo, a single dash or --flag=value, is refused before the proton-drive CLI is run, and so is an argument more than the command takes. Flags may stand before or after the arguments.

Auth & info

proton-drive-cli auth status          # probes /my-files; the CLI has no dedicated status command
proton-drive-cli auth logout          # log out (clears OS keychain session)
proton-drive-cli version              # CLI and SDK version

Files & folders

proton-drive-cli list /my-files
proton-drive-cli list /my-files/Reports
proton-drive-cli info /my-files/report.pdf       # full metadata, incl. revision details
proton-drive-cli read /my-files/notes.md --max-chars 5000   # text of a file, paged with --offset

proton-drive-cli mkdir /my-files/NewFolder

proton-drive-cli upload ./report.pdf /my-files/Reports
proton-drive-cli upload ./dist /my-files/Releases --file-conflict replace --folder-conflict merge

proton-drive-cli download /my-files/report.pdf ./local/report.pdf
proton-drive-cli download /my-files/Reports ./local/Reports --file-conflict rename --folder-conflict merge

proton-drive-cli rename /my-files/old-name.pdf new-name.pdf   # in place, no move
proton-drive-cli move /my-files/old-name.pdf /my-files/new-name.pdf
proton-drive-cli copy /my-files/report.pdf /my-files/Archive
proton-drive-cli delete /trash/obsolete-draft.pdf --confirm   # only works on items already in trash

# Machine-readable output (pipe-friendly)
proton-drive-cli list /my-files --json | jq '.[].name'

Sharing

proton-drive-cli share status /my-files/Reports
proton-drive-cli share invite /my-files/Reports alice@pm.me editor
proton-drive-cli share invite /my-files/Reports bob@pm.me viewer --message "FYI"
proton-drive-cli share revoke /my-files/Reports alice@pm.me
proton-drive-cli share remove-all /my-files/Reports --confirm   # strip every member + pending invite

# set-url replaces ALL link settings: if the link has a password or expiration you do not pass again, it refuses; --reset-settings drops them on purpose.
# An omitted --role keeps an existing link's role (a new link is viewer).
proton-drive-cli share set-url /my-files/Reports --role viewer --expiration 2026-06-06
proton-drive-cli share remove-url /my-files/Reports

Trash

proton-drive-cli trash /my-files/old-draft.pdf        # move to trash
proton-drive-cli trash list                            # see what's in trash
proton-drive-cli restore /my-files/old-draft.pdf       # restore from trash
proton-drive-cli trash empty --confirm                  # permanently delete all trashed items

Approvals

Used when neither your MCP client nor the macOS dialog can ask you, or the list is too long for the dialog (see Human approval). These commands only read and write local files; they need no Proton session.

proton-drive-cli approvals          # pending and approved requests: code, tool, status, time left, first line
proton-drive-cli approve K7Q2-M9XD  # shows the server's record, asks you to type 'yes' (interactive terminal only)
proton-drive-cli deny K7Q2-M9XD     # discard a request

Search, analytics and cleanup

drive_search · drive_tree · drive_usage · drive_find_duplicates · drive_sharing_audit · drive_checkup · drive_sync_plan · drive_bulk_move · drive_bulk_trash · drive_undo

proton-drive-cli tree /my-files --depth 2
proton-drive-cli search /my-files --ext pdf --min-size 1000000
proton-drive-cli usage /my-files --top 20 --older-than 365
proton-drive-cli duplicates /my-files --min-size 1000000 [--verify]
proton-drive-cli share audit /my-files
proton-drive-cli checkup /my-files/Documents [--finding duplicates] [--no-sharing] [--refresh] [--json]   # health report, read-only
proton-drive-cli undo --list                                                         # recorded batches, newest first
proton-drive-cli undo K7Q2-M9XD [--confirm] [--json]                                  # plan; --confirm applies
proton-drive-cli sync-plan ./local /my-files/backup --direction up
proton-drive-cli bulk-move /my-files/Archive /my-files/a.pdf /my-files/b.pdf          # plan only
proton-drive-cli bulk-trash /my-files/old1.txt /my-files/old2.txt --confirm           # apply
proton-drive-cli index status                                                         # persistent index: enabled?, path, size, age, entries
proton-drive-cli index clear                                                          # delete the saved index file
  • The first walk of a large drive can take minutes (measured about 21 s per 1,200 files at the default concurrency (12); about 25 s at concurrency 8). drive_search, drive_tree and drive_usage stop waiting after 25 s (PROTON_DRIVE_WALK_BUDGET_MS, 0 = never) and return what was listed so far with partial: true, continuing: true (the walk is still running) and a note; the same walk keeps running in the background, so repeating the call returns the full result from cache. drive_find_duplicates, drive_sharing_audit and drive_sync_plan always wait for the complete walk. Later calls reuse a 5-minute in-memory cache; refresh bypasses it. With the opt-in persistent index, a saved copy up to 24 h old can answer first (marked stale: true).
  • Walks skip .git and node_modules by default.
  • With PROTON_DRIVE_INDEX=1, results may come from a saved index (stale: true = served from the saved index, not a walk made now) while a refresh runs; repeat the call or pass refresh: true for a fresh read. On a huge drive drive_refresh_index refreshes the index in resumable slices. Off by default, see Persistent index.
  • Read-only tools (drive_search, drive_tree, drive_usage, drive_find_duplicates, drive_checkup, drive_sharing_audit, drive_share_expiry_report, drive_recent_changes, drive_sync_plan) change nothing. drive_bulk_move and drive_bulk_trash are two-step: call without confirmed for the plan, then with confirmed: true to apply; applying still needs your approval of the exact list. Bulk trash is reversible with drive_restore.
  • Duplicate detection uses the sha1 the uploader claimed, which is unverified. verify: true downloads the candidates and hashes them.
  • The sharing audit flags an invitee as external when the address is outside Proton domains, so Proton users on a custom domain are over-flagged.
  • Sizes are sums of file sizes, not your account quota.
  • drive_usage trash stats always make one uncached /trash listing (~2.5 s), even when the walk is cached.

Persistent index (opt-in)

By default every new server process (each Claude Desktop session) walks the drive again on the first drive_search, drive_tree, drive_usage or drive_find_duplicates: about 21 s per 1,200 files at the default concurrency (12), minutes on big drives. Set PROTON_DRIVE_INDEX=1 to keep completed walks on disk and answer instantly after a restart.

Privacy: this is off by default. Your Drive is end-to-end encrypted, but the index is a plaintext copy of file and folder names, paths, sizes, dates and claimed sha1 hashes on your local disk. Anyone who can read your user account's files (or your backups) can read it. Enable it only on a machine you trust.

  • What is stored: the node list of up to 8 recent walks under /my-files (a failed walk or a drive_tree that stops at its depth limit is never saved; an unfinished incremental refresh saves its progress and is marked as partial, see Keeping the index fresh on huge drives), the time each folder was last listed, plus a fingerprint of your account's Drive root. No file contents, no credentials, no tokens.
  • Where: PROTON_DRIVE_INDEX_DIR if set; otherwise ~/Library/Caches/proton-drive-mcp (macOS) or $XDG_CACHE_HOME/proton-drive-mcp / ~/.cache/proton-drive-mcp (Linux). One file, walk-index.json, mode 0600 in a 0700 directory, written atomically. Use a dedicated directory: a pre-existing directory with group/other access (or owned by someone else) is refused with one warning and never chmodded; a missing one is created 0700. A symlinked directory or file is refused. A saved file with loose permissions, another owner, a future timestamp, or above 200 MB is ignored. Not written above 200 MB.
  • Account check: before any saved data is served, one list /my-files (~2 s) confirms it belongs to the account that is logged in now; if the check fails (network, rate limit) nothing is served from disk for that call and the file is kept; a proven account mismatch deletes it. Either way the drive is walked fresh.
  • Freshness: data up to PROTON_DRIVE_INDEX_MAX_AGE_H hours old (default 24; 0 = never use saved data) is returned immediately with stale: true (and refreshing: true while one background walk replaces it); a repeated call then returns the fresh walk. A failed or incomplete background walk is not retried for 5 minutes within the same server process (PROTON_DRIVE_INDEX_REFRESH_COOLDOWN_MS); a new process tries once again. The saved data is account-checked first (see above). Data older than that, and a tree from an unfinished refresh, are refreshed in place rather than walked from scratch (see the next section). drive_sync_plan, drive_find_duplicates, the sharing audit and drive_recent_changes never serve saved data; with the index on they only reuse saved folder listings read less than 5 minutes ago (the memory-cache TTL). refresh: true always does a blocking full fresh walk. Writes made through this server drop the affected entries from memory and disk.
  • Change snapshots: drive_recent_changes with snapshot stores a second plaintext file, changes-snapshot.json, in the same directory under the same rules (see Recent changes); it is only written when you ask for snapshot: "save", and index clear removes it as well.
  • Read-only directory: an index in a directory (or file) you cannot write to is ignored, because it could not be kept current after the server's own writes.
  • Depth-limited requests: drive_tree with a depth (and drive_search/drive_usage of a subfolder) is answered from a complete saved full walk that covers it and is within the max age, with its age in ageMs; it is not refreshed in the background on its own (refresh the full walk instead). A tree from an unfinished refresh does not answer it; the request walks live.
  • Limits: changes made by other clients or processes are not seen until the data is refreshed.
  • Check or remove it: proton-drive-cli index status and proton-drive-cli index clear (or just delete the file). In the MCPB bundle, the Persistent search index setting is the opt-in.

Keeping the index fresh on huge drives

Folder listings cost about 2 s each, so a full re-walk of a drive with hundreds of thousands of files takes hours. With PROTON_DRIVE_INDEX=1 the saved index is therefore refreshed incrementally, in slices that you can repeat until it is done:

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!