Dropbox MCP server

Integrates with Dropbox to enable file management operations like listing, uploading, downloading, and sharing files for cloud storage workflows.
Back to servers
Setup instructions
Provider
Amgad Abdelhafez
Release date
Feb 26, 2025
Language
TypeScript
Stats
17 stars

The dbx-mcp-server provides integration with Dropbox, allowing MCP-compatible clients to interact with Dropbox through a set of powerful tools. This server acts as a bridge between Model Context Protocol clients and Dropbox's public API, enabling file operations, metadata retrieval, and account management.

Prerequisites

Before installing the server, you need to register a Dropbox app at Dropbox App Console:

  • Choose "Scoped access" API
  • Choose the access type your app needs
  • Name your app and click "Create app"
  • Under "Permissions", select the desired permissions for the actions you will be using
  • Add http://localhost as your redirect URI
  • Note your App key and App secret

Installation

Step 1: Clone the Repository

git clone https://github.com/your-username/dbx-mcp-server.git
cd dbx-mcp-server

Step 2: Install Dependencies and Build

npm install
npm run build

Step 3: Run the Setup Script

npm run setup

Step 4: Add to MCP Settings

Add the following to your MCP settings file:

{
  "mcpServers": {
    "dbx": {
      "command": "node",
      "args": ["/path/to/dbx-mcp-server/build/index.js"]
    }
  }
}

Authentication

The server uses OAuth 2.0 with PKCE for secure authentication with Dropbox.

Required Environment Variables

  • DROPBOX_APP_KEY: Your Dropbox app's key
  • DROPBOX_APP_SECRET: Your Dropbox app's secret
  • DROPBOX_REDIRECT_URI: OAuth redirect URI
  • TOKEN_ENCRYPTION_KEY: 32+ character key for token encryption

Optional Environment Variables

  • TOKEN_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)

Available Tools

File Operations

  • list_files: List files in a directory
  • upload_file: Upload a file
  • download_file: Download a file
  • safe_delete_item: Safely delete with recycle bin support
  • create_folder: Create a new folder
  • copy_item: Copy a file or folder
  • move_item: Move or rename a file/folder

Metadata and Search

  • get_file_metadata: Get file/folder metadata
  • search_file_db: Search files and folders
  • get_sharing_link: Create sharing links
  • get_file_content: Get file contents

Account Operations

  • get_account_info: Get account information

Required Dropbox Permissions

Below is a mapping of server actions to the minimum Dropbox OAuth scopes required:

Server Action Required Dropbox Scopes
list_files files.metadata.read
upload_file files.content.write, files.metadata.write
download_file files.content.read
safe_delete_item files.metadata.write
create_folder files.metadata.write
copy_item files.content.write, files.metadata.write
move_item files.content.write, files.metadata.write
get_file_metadata files.metadata.read
search_file_db files.metadata.read
get_sharing_link sharing.write
get_file_content files.content.read
get_account_info account_info.read

Usage Examples

Here are some examples of how to use the server with an MCP client:

Listing Files

// List files in root directory
await mcp.useTool("dbx-mcp-server", "list_files", { path: "" });

Uploading Files

// Upload a file
await mcp.useTool("dbx-mcp-server", "upload_file", {
  path: "/test.txt",
  content: Buffer.from("Hello World").toString("base64"),
});

Searching Files

// Search for files
await mcp.useTool("dbx-mcp-server", "search_file_db", {
  query: "report",
  path: "/Documents",
  max_results: 10,
});

Downloading Files

// Download a file
const result = await mcp.useTool("dbx-mcp-server", "download_file", {
  path: "/Documents/important.pdf"
});

Creating Folders

// Create a new folder
await mcp.useTool("dbx-mcp-server", "create_folder", {
  path: "/Documents/NewFolder"
});

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later