The Dropbox MCP Server is an integration that allows Model Context Protocol (MCP) compatible clients to interact with Dropbox, providing a set of powerful tools for file operations, metadata handling, and account management through Dropbox's API.
You need to register a Dropbox app before using this server:
files.metadata.read
files.content.read
files.content.write
sharing.write
account_info.read
http://localhost:3000/callback
as your redirect URIClone the repository
git clone https://github.com/your-username/dbx-mcp-server.git
cd dbx-mcp-server
Install dependencies and build
npm install
npm run build
Run the setup script
npm run setup
Configure MCP settings
Add the following to your MCP settings file:
{
"mcpServers": {
"dbx": {
"command": "node",
"args": ["/path/to/dbx-mcp-server/build/index.js"]
}
}
}
The server uses OAuth 2.0 with PKCE for secure Dropbox authentication.
Set the following environment variables:
DROPBOX_APP_KEY
: Your Dropbox app's keyDROPBOX_APP_SECRET
: Your Dropbox app's secretDROPBOX_REDIRECT_URI
: OAuth redirect URITOKEN_ENCRYPTION_KEY
: 32+ character key for token encryptionTOKEN_REFRESH_THRESHOLD_MINUTES
: Minutes before expiration to refresh token (default: 5)MAX_TOKEN_REFRESH_RETRIES
: Maximum number of refresh attempts (default: 3)TOKEN_REFRESH_RETRY_DELAY_MS
: Delay between refresh attempts in ms (default: 1000)list_files
: List files in a directoryupload_file
: Upload a filedownload_file
: Download a filesafe_delete_item
: Safely delete with recycle bin supportcreate_folder
: Create a new foldercopy_item
: Copy a file or foldermove_item
: Move or rename a file/folderget_file_metadata
: Get file/folder metadatasearch_file_db
: Search files and foldersget_sharing_link
: Create sharing linksget_file_content
: Get file contentsget_account_info
: Get account informationHere are examples of how to use the tools through an MCP client:
// List files in root directory
await mcp.useTool("dbx-mcp-server", "list_files", { path: "" });
// Upload a file
await mcp.useTool("dbx-mcp-server", "upload_file", {
path: "/test.txt",
content: Buffer.from("Hello World").toString("base64"),
});
// Search for files
await mcp.useTool("dbx-mcp-server", "search_file_db", {
query: "report",
path: "/Documents",
max_results: 10,
});
// Create a new folder
await mcp.useTool("dbx-mcp-server", "create_folder", {
path: "/New Folder"
});
// Move or rename a file
await mcp.useTool("dbx-mcp-server", "move_item", {
from_path: "/old_name.txt",
to_path: "/new_name.txt"
});
// Copy a file
await mcp.useTool("dbx-mcp-server", "copy_item", {
from_path: "/source.txt",
to_path: "/destination.txt"
});
// Get account information
await mcp.useTool("dbx-mcp-server", "get_account_info", {});
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "dbx" '{"command":"node","args":["/path/to/dbx-mcp-server/build/index.js"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"dbx": {
"command": "node",
"args": [
"/path/to/dbx-mcp-server/build/index.js"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"dbx": {
"command": "node",
"args": [
"/path/to/dbx-mcp-server/build/index.js"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect