dropbox-mcp
dropbox-mcp
Ein Server für das Model Context Protocol, der einem LLM-Agenten Lese-/Schreibzugriff aufKonto gibt – privat oder Business/Team – über die Dropbox-API v2.
Das Problem
Das Datei-Syncing in dropbox: Er löst nicht das Problem, einem LLM-Agenten kontrollierten Zugriff auf ein Konto zu geben, von dem er keine lokale Kopie hat. Ein Agent, der nur synchronisierte Ordner sehen kann, kann ein 2-TB-Teamarchiv nicht durchsuchen, keinen Fregeblick erzeugen und keine Datei wide. Durchlesen
Dieser Server schließt diese Lücke: Er spricht direkt mit der Dropbox-HTTP-API, arbeitet also gegen das gesamte Konto, ohne ein Byte auf die Platte zu synchronisieren, und stellt diesen Zugriff als festen Satz von MCP-Tools bereit – nicht als rohen HTTP-Client. Der Agent bekommt dropbox_search, nicht fetch.
Related MCP server: Dropbox MCP Server
Architektur
Vier Toolmodule (files, search, sharing, account) registrieren sich bei einem einzigen McpServer, der MCP über stdio spricht. Jedes Módul läuft über einen einzigen HTTP-Client, der die beiden Dinge verwaltet, die die Dropbox-API kompliziert machen: den Auflösung. OAuth-Tokens-Verwaltung und den Team-Namespace. Die "Module" können beim Start einzeln über DROPBOX_DISABLED_MODULES deaktiviert werden. Ein "Deployment" das keine öffentlichen "Freigbabe-Links" erzeugen soll, registriert dieses Module also einfach nicht. Die Fähigkeit fehlt, wird nicht nur "unerwünscht".
MCP host (Claude, etc.)
| stdio (JSON-RPC)
+-------v--------------------------------------+
| index.ts module registry / stdio transport|
+-------+--------------------------------------+
|
+-------v-------+ +--------+ +---------+ +---------+
| tools/files | | search | | sharing | | account |
+-------+-------+ +---+----+ +----+----+ +----+----+
| | | |
+------+------+-----------+-----------+
|
+--------v-----------------------------------+
| client.ts |
| - refresh-token -> access-token cache |
| - 401 retry with a forced refresh |
| - Dropbox-API-Path-Root resolution |
| - ASCII-safe Dropbox-API-Arg encoding |
+--------+-----------------------------------+
|
RPC api.dropboxapi.com Content content.dropboxapi.comZwei Endpoint-Familien, bewusst als getrennte Funktzen gehalten: RPC-Endpunkte nehmen JSON entgegeben und geben JSON zuruck, while Content-Endpunkte die Argumente in "HTTP" packen. Header and use the body for Dateibytes. Hätte man sie zu einer generischen request() zusammengefagt, hätte das einen "Paramet" ergeben, der stillschweigend das Ziel der Argumente änert – andere bleiben sie getrennt.
Der wirklich schwierige Teil
Beim Dropbox-Business-Team setzt die API standardmäßig auf den home-Namespace des Members. Allea-Team-Ordenar, in dem die eigentliche gemeinsame Arbeit liegt, befindet sich statt dessen im root*-Namespace des Teams und ist schlicht unsichtbar. list_folder mit "" liefert die privaten Dateien de gar nicht members und sonst nichts – ohne Fehler und ohne Hinweis darauf, dass der größte Teil des Kontos fehlt. Es sieht aus wie ein Berechtigungsproblem, ist aber keines.
Behoeben wirdndas, indem man einen Dropbox-API-Path-Root-Header sendet, der auf den Root-Namespace des Teams zeigt; diese ID erhält man von users/get_current_account. Dadurch entsteht aber Newton: Fall: Der generische RPC-Helfer hängt den Path-Root-Header an ändert sogar jeden Aufruf. Würde ders Namespace durch sich selbst auflösen, ein get_current_account ausgerufen, würde die Header-Auflösung die Header-Auflösung unendlich rufen. resolveRootNamespaceId() führt daher a b comma "sichplicht bewusst "nackte fetch aus, der das Helfer umgeht; das Ergebnis wird zwischengespeichert, so dass der einliche zusatliche Roundtrip von one pro Prozess herausspringt (src/client.ts).
Ein en kleineres, verwandtesVariant – Content-Endpunkte übergeben their Argumente in DROPBOX-Api-Arg, and HTTP-Header sind ASCII. Etwas "Date" "versitzt", also jeder Namensteil in daten, point an emoji, löst innerha des fetch eine Exception aus, statt einen API-Fehlern zu liefern. apiArg() maskiert jedes Non-ASCII-Codepoint zu \UXXXX, befor der Header baut.
Was ich anders machen würde
Keine Tests. Das wurdeby Hand gegen echtges, verifiziert. The token-refresh path, der 401‑Retry and die Grenzälle des Chunked-uploads sind gena der Code, der mit einer Mocks until auf Abstand gefahren werden sollte – es sind die Teile, die selten und teuer scheitern.
Der Corp-Root-Cache ist prozess and never invaliedert. Für einen stdio als en Bass in, den ein HOST frei neu startet, ist das in Ordung; ach falsch für "Wie" something long-lasting, in dem anand ever "User in einen anderes Team versetzt" wird.
dropbox_deleteist withne confirmed "Bestätigung" exposed. Die "Aufbewahrung" von Dropbox macht itwiederherstellbar, but a destrutive tool should signal that in "seinen Schema" rather than waiting, dass der host fragt.Fehler werden zu Strings "geformt". Einen strukturierter Fehler-Code" together with the "week" zämäückgegeben, anuhme, an LLM-Agenten "rate limited" vs. "not found" zu -scheiden, ohne Prosa zu parsen.
Einrichtung
Erfordert Node 20+ (entwickelt) auf 24) und auf "Dropbox-Konto.
1. DropboxApp erstellen
Rufen Sie https://www.dropbox.com/developers/apps auf und wählen Sie Create app.
Wählen Sie Scoped access und Full Dropbox access.
Aktivieren Sie under Permissions
account_info.read,files.metadata.read,files.metadata.write,files.content.read,files.content.write,sharing.read,sharing.writeund klicken Sie dann Submit.Kopieren Sie **under Settings den App key und das App secret.
2. Build und autorisieren
git clone <this-repo>
cd dropbox-mcp
npm install
npm run build
cp .env.example .env # fill in DROPBOX_APP_KEY and DROPBOX_APP_SECRET
npm run auth # prints DROPBOX_REFRESH_TOKEN — paste it into .envnpm run auth gibt eine Zustimmungs-URL aus, nimmmt den Code, den Sie zurücksetzen, und tauscht ihn in einen Refresh-Token. Der Server tauscht die sen ab dann selbst in kurzlebendige Zugriffs-Tokes.
3. Bei einem MCP-Host registrieren
{
"mcpServers": {
"dropbox": {
"command": "node",
"args": ["/absolute/path/to/dropbox-mcp/dist/index.js"],
"env": {
"DROPBOX_APP_KEY": "your-app-key",
"DROPBOX_APP_SECRET": "your-app-secret",
"DROPBOX_REFRESH_TOKEN": "your-refresh-token"
}
}
}
}Starten Sie den Host neu und fragen Sie ihn etwas wie „Wie hoch ist mein Dropbox-Speicherverbrauch?“
Um den Server ohne Host auszuprobieren:
npm run inspect # @modelcontextprotocol/inspectorTools
files – dropbox_list_folder, dropbox_get_metadata, dropbox_create_folder, dropbox_move, dropbox_copy, dropbox_delete, dropbox_get_temporary_link, dropbox_read_file, dropbox_upload (große Dateien werden automatische in Upload-Sessionen "Chunks" aufgeteilt).
search – dropbox_search über Schaalten und rich et content, konto-weit oder auf einen Ordner eingeschränkt.
sharing – dropbox_create_shared_link, dropbox_list_shared_links, dropbox_get_shared_link_metadata, dropbox_revoke_shared_link.
account – dropbox_get_current_account, dropbox_get_space_usage.
Bewertung
Die gesamte Konfiguration läuft über Umgebungsvariablen; die fürt vollständig annotierte-Liste in [.env.example](. Beispiel). Mit dabei sind die Namespace-Steuerung (DROPBOX_UTH_LOOT), die Begrenzung der LeseGröße (DROPBOX_MAX_READ_BYTES), die Upload- "Size-Chunk" sowie die Kopfte für Team-App-Impersonatins.
Lizenz
MIT – siehe LICENSE.
Available Tools
16 toolsdropbox_copyCopyB
Copy a file or folder to a new path.
Inputs: to_path (required), from_path (required), autorename.
dropbox_create_folderCreate folderB
Create a folder at the given path.
Inputs: path (required), autorename.
dropbox_deleteDeleteADestructive
Delete a file or folder (and its contents). Destructive — the item moves to deleted state and can be restored from Dropbox for the retention window.
Inputs: path (required).
dropbox_get_current_accountGet current accountARead-only
Return the authenticated account (name, email, account id, team). Good for confirming the server is connected to the right Dropbox.
Inputs: no named parameters.
dropbox_get_metadataGet metadataARead-only
Get metadata (size, modified time, id, etc.) for a single file or folder.
Inputs: path (required), include_deleted.
dropbox_get_space_usageGet space usageARead-only
Return storage usage and allocation for the account.
Inputs: no named parameters.
dropbox_get_temporary_linkGet temporary linkARead-only
Get a direct, time-limited (~4h) download/streaming URL for a file. Use this to reference or fetch file contents without creating a permanent shared link.
Inputs: path (required).
dropbox_list_folderList folderARead-only
List the contents of a folder. Pass "" for the root. Set recursive=true to walk subfolders. If the result is truncated, call again with the returned cursor.
Inputs: path, limit, cursor, recursive.
dropbox_moveMove / renameA
Move or rename a file or folder from one path to another.
Inputs: to_path (required), from_path (required), autorename.
dropbox_read_fileRead file (text)ARead-only
Download a file and return its contents as UTF-8 text — for referencing docs, notes, code, csv, etc. Guarded by DROPBOX_MAX_READ_BYTES (default 5 MB). For large or binary files use dropbox_get_temporary_link instead.
Inputs: path (required).
dropbox_searchSearch filesARead-only
Search the account for files and folders matching a query (filename and, where indexed, content). Optionally scope to a folder. If the result has_more, call again with the returned cursor.
Inputs: query (required), path, cursor, file_status, +2 more.
dropbox_uploadUpload fileA
Upload content to a path. Provide either text (inline UTF-8) or localPath (a file on this machine to read). Files at/under ~140 MB go in a single request; larger local files are streamed in chunks via an upload session automatically.
Inputs: path (required), mode, text, localPath, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clear, non-overlapping purpose: folder operations (list, get metadata, create), file operations (move, copy, delete, upload, read, temporary link), search, shared link management (create, list, metadata, revoke), and account/space info. Even get_temporary_link vs read_file are distinct (URL vs content).
All tools follow a consistent verb_noun pattern prefixed with 'dropbox_' (e.g., list_folder, get_metadata, create_shared_link). The verbs (list, get, create, move, copy, delete, read, upload, search, revoke) and nouns are uniform and predictable.
16 tools is slightly above the ideal 3-15 range but appropriate given the comprehensive scope of Dropbox's API (folder, file, search, shared links, account). Each tool earns its place, and none seem redundant.
The surface covers core lifecycle operations for files and folders (create, read, update via upload/overwrite, delete, move/copy), search, and shared link management. Minor omissions like file version history or listing deleted items are acceptable gaps that agents can work around.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Your company's tools, memory and Automations for ChatGPT, Claude or any MCP agent. Open source.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides read access to Dropbox files with advanced search and content extraction capabilities. Supports browsing, reading, and searching within various file types including PDFs, DOCX, and text files.5-
- FlicenseAqualityNot gradedmaintenanceA local MCP server that enables Claude to manage Dropbox accounts through tools for file manipulation, searching, and sharing. It supports operations such as listing folders, moving files, creating shared links, and monitoring storage usage via natural language commands.10-
- AlicenseNot gradedqualityBmaintenanceEnables Dropbox file operations such as listing, searching, downloading, and creating folders via the Dropbox API v2 through MCP.77 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage Box files, folders, collaborations, and more via the Box API using tools for search, upload, and metadata operations.ISC