dropbox-mcp
Dropbox MCP server to recover deleted files, list revisions, search content, and force-download cloud-only files via server-side API.
README
dropbox-mcp
An MCP (Model Context Protocol) server that exposes the Dropbox API as tools for LLM agents. Built on FastMCP and dropbox-sdk-python.
Focus: recovery and discovery on an existing Dropbox account — restoring deleted files, listing revisions, searching content, and force-downloading cloud-only files. The server talks to the Dropbox server-side API, not the local sync folder, so it can see and restore files that local sync has already deleted.
Tools
All tool names are prefixed dropbox_ to avoid collisions with other MCP servers.
| Tool | Behavior | Read-only |
|---|---|---|
dropbox_restore |
Restore the most recent server-side revision of a deleted file. | No |
dropbox_restore_batch |
Restore multiple files in one call; reports per-path result. | No |
dropbox_restore_revision |
Restore a specific revision ID (e.g., a known-good earlier version). | No |
dropbox_download |
Force-download a file from Dropbox to the local sync folder, bypassing Smart Sync cloud-only state. | No |
dropbox_search |
Search by filename or content across the account. Returns path, size, modified date. | Yes |
dropbox_list_deleted |
List deleted entries in a folder (optionally recursive). Input for restore workflows. | Yes |
dropbox_file_info |
Return size, modified time, revision ID, and content hash for a path. | Yes |
dropbox_list_revisions |
List up to 100 revisions of a file with rev ID, size, and modified time. | Yes |
Read-only tools are safe to call freely. The four restore/download tools mutate state on Dropbox servers or local disk.
Installation
Prerequisites
- Python 3.10 or newer
- A Dropbox account and a Dropbox app
with
files.content.read,files.content.write, andfiles.metadata.readscopes
Install
git clone https://github.com/danielsimonjr/dropbox-mcp.git
cd dropbox-mcp
pip install -e .
Or, for dependencies only:
pip install -r requirements.txt
Authentication
The server loads credentials from ~/.claude/channels/dropbox/.env on startup. Create
that file and paste in the template below, then fill in your values:
mkdir -p ~/.claude/channels/dropbox
touch ~/.claude/channels/dropbox/.env
Template:
# --- Option A: OAuth 2 refresh token (recommended) ---
# Create an app at https://www.dropbox.com/developers/apps, enable the scopes
# files.content.read, files.content.write, files.metadata.read, then run the
# OAuth flow once to obtain a refresh token.
DROPBOX_REFRESH_TOKEN=
DROPBOX_APP_KEY=
DROPBOX_APP_SECRET=
# --- Option B: Long-lived access token (fallback) ---
# Leave blank if you are using Option A above.
DROPBOX_ACCESS_TOKEN=
# --- Optional ---
# Local Dropbox sync folder. Used by dropbox_download to write files.
# Defaults to ~/Dropbox if unset.
# DROPBOX_LOCAL_PATH=C:\Users\you\Dropbox
Two auth modes are supported, tried in order:
- OAuth 2 refresh token (recommended): set
DROPBOX_REFRESH_TOKEN,DROPBOX_APP_KEY, andDROPBOX_APP_SECRET. Access tokens are refreshed automatically, so credentials do not expire. - Legacy long-lived access token (fallback): set
DROPBOX_ACCESS_TOKENonly. Simpler to get from the app console, but tokens expire after a few hours for newer apps.
Running the server
Directly (for testing)
python server.py
The server communicates over stdio, so there is no interactive output — it waits for MCP protocol messages on stdin.
With the MCP Inspector
npx @modelcontextprotocol/inspector python server.py
This opens a browser UI where you can list tools and call them manually.
Registering with Claude Code
Add an entry to your ~/.claude/.mcp.json:
{
"mcpServers": {
"dropbox": {
"command": "python",
"args": [
"-X", "utf8",
"C:\\path\\to\\dropbox-mcp\\server.py"
]
}
}
}
The -X utf8 flag is recommended on Windows so that non-ASCII paths in results do
not trip up the default cp1252 encoding.
Restart Claude Code for the registration to take effect.
Examples
Restore a file deleted by accident:
Agent: dropbox_restore(path="/Projects/report-final.docx")
Result: Restored: /Projects/report-final.docx (rev: abc123, size: 45678 bytes)
Find a file without knowing its exact location:
Agent: dropbox_search(query="RSP consciousness paper", max_results=5)
Result: Found 3 results for 'RSP consciousness paper':
1.25 MB 2026-02-18 /Misc/Philosophy/Beyond the Bat/paper.pdf
0.31 MB 2026-02-10 /Misc/Philosophy/Beyond the Bat/drafts/outline.md
...
Roll back to a specific earlier revision:
Agent: dropbox_list_revisions(path="/report.docx", limit=5)
Agent: dropbox_restore_revision(path="/report.docx", rev="0123abc")
Security notes
- The
.envfile holds long-lived credentials — keep it out of version control (the default.gitignorealready excludes.envfiles). - Restore and download tools are not idempotent from the user's perspective:
they mutate Dropbox state or overwrite local files. Agents should confirm
intent before invoking them, especially
dropbox_restore_batch. - The server binds to no network ports — communication is stdio only, so there is
no inbound attack surface from the MCP layer itself. The only outbound
connection is to
api.dropbox.comvia HTTPS. - Logs go to stderr, never stdout (stdout is reserved for MCP protocol frames).
Development
# Syntax check
python -m py_compile server.py
# Quick smoke test (lists registered tools)
npx @modelcontextprotocol/inspector python server.py
For changes to the tool surface, update both this README and CHANGELOG.md in the
same commit.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。