How to integrate Dropbox MCP with CrewAI

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Dropbox logo
CrewAI logo
divider

Introduction

This guide walks you through connecting Dropbox to CrewAI using the Composio tool router. By the end, you'll have a working Dropbox agent that can list files in your shared projects folder, create a new folder for invoices, search for last month's sales report through natural language commands.

This guide will help you understand how to give your CrewAI agent real control over a Dropbox account through Composio's Dropbox MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Dropbox with

TL;DR

Here's what you'll learn:
  • Get a Composio API key and configure your Dropbox connection
  • Set up CrewAI with an MCP enabled agent
  • Create a Tool Router session or standalone MCP server for Dropbox
  • Build a conversational loop where your agent can execute Dropbox operations

What is CrewAI?

CrewAI is a powerful framework for building multi-agent AI systems. It provides primitives for defining agents with specific roles, creating tasks, and orchestrating workflows through crews.

Key features include:

  • Agent Roles: Define specialized agents with specific goals and backstories
  • Task Management: Create tasks with clear descriptions and expected outputs
  • Crew Orchestration: Combine agents and tasks into collaborative workflows
  • MCP Integration: Connect to external tools through Model Context Protocol

What is the Dropbox MCP server, and what's possible with it?

The Dropbox MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Dropbox account. It provides structured and secure access to your cloud files, so your agent can perform actions like searching, uploading, organizing, reading, and deleting files and folders on your behalf.

  • Smart file search and retrieval: Ask your agent to search for files or folders by name, keyword, or within specific directories, and quickly locate what you need.
  • Automated file uploads and folder creation: Direct your agent to create new folders for organization or request file uploads with unique shareable links, streamlining content collection and storage.
  • Seamless file reading and downloads: Have your agent read the contents of any file or download important documents from your Dropbox, whenever you need them.
  • Effortless organization and cleanup: Let your agent move, delete, or reorganize files and folders to keep your Dropbox tidy and efficient.
  • Account insights and management: Retrieve up-to-date details about your Dropbox account, including user info and storage status, for complete oversight.

Supported Tools & Triggers

Tools
Activate team folderTool to activate an archived team folder.
Add file memberTool to add specified members to a Dropbox file with configurable access levels.
Add file propertiesTool to add custom properties to a Dropbox file using a filled property template.
Add tag to file or folderTool to add a tag to a file or folder in Dropbox.
Add folder memberTool to add members to a shared folder with specified access levels.
Add users to space limits exclusion listTool to add users to the team's space limits exclusion list in Dropbox.
Add sharing allowlistTool to add domains or email addresses to the team sharing allowlist.
Add members to team groupTool to add members to a team group with specified access levels.
Add team membersTool to add new members to a Dropbox team.
Add secondary emails to team membersTool to add secondary email addresses to Dropbox team members.
Add property template for teamTool to add a property template for a team in Dropbox.
Alpha Upload FileTool to upload a new file to Dropbox using the alpha upload endpoint.
Append data to upload sessionTool to append more data to an existing upload session.
Append to multiple upload sessionsTool to append data to multiple upload sessions in a single request.
Archive team folderTool to archive an active team folder in Dropbox.
Check copy batch job statusTool to check the status of an asynchronous copy batch job in Dropbox.
Check delete batch statusTool to check the status of an asynchronous delete batch job in Dropbox.
Check folder batch statusTool to check the status of an asynchronous folder batch creation job.
Check sharing job statusTool to check the status of an asynchronous sharing job in Dropbox.
Check move batch job statusTool to check the status of an asynchronous move batch job.
Check move former member files job statusTool to check the status of an asynchronous move former member files job.
Check remove member job statusTool to check the status of an asynchronous remove folder member job in Dropbox.
Check save URL job statusTool to check the status of a save_url job in Dropbox.
Check share job statusTool to check the status of an asynchronous folder sharing job in Dropbox.
Check team folder archive statusTool to check the status of an asynchronous team folder archive job in Dropbox.
Check upload batch statusTool to check the status of an asynchronous upload batch job in Dropbox.
Check userTool to test Dropbox API connection and validate access token by echoing back a supplied string.
Copy multiple files or foldersTool to copy multiple files or folders to different locations at once in Dropbox.
Copy file or folderTool to copy a file or folder to a different location in Dropbox.
Count file requestsTool to get the total number of file requests owned by the authenticated user.
Create file requestTool to create a new file request in Dropbox.
Create folderTool to create a new folder at a specified path in Dropbox.
Create multiple foldersTool to create multiple folders at once in Dropbox.
Create paper documentCreates a new Dropbox Paper document at the specified path using HTML or Markdown content.
Create Paper folderTool to create a new Paper folder with the provided info.
Create shared linkTool to create a stable, long-lived shared link for a Dropbox file or folder.
Create team folderTool to create a new, active team folder with no members in Dropbox.
Create team groupTool to create a new, empty team group in Dropbox with a specified name.
Delete all closed file requestsTool to delete all closed file requests owned by the current user.
Delete multiple files/foldersTool to delete multiple files or folders at once in Dropbox.
Delete file or folderTool to delete a file or folder at the specified path in Dropbox.
Delete file requestsTool to delete a batch of closed file requests in Dropbox.
Delete manual contacts batchTool to delete specific manually added contacts from Dropbox by their email addresses.
Permanently delete archived team folderTool to permanently delete an archived team folder in Dropbox.
Delete team groupTool to delete a Dropbox team group.
Delete team member profile photoTool to delete a team member's profile photo.
Delete team members secondary emailsTool to delete secondary email addresses from Dropbox team members.
Download Folder as ZipTool to download a folder from Dropbox as a zip file.
Export FileTool to export non-downloadable Dropbox files (especially Dropbox Paper) to Markdown/HTML/plain text and return usable content.
Search files and foldersTool to search for files and folders in Dropbox by name or content.
Finish upload sessionTool to finish an upload session and save the uploaded data to the given file path.
Finish batch upload sessionsTool to commit many files at once into a user's Dropbox after uploading file contents via upload_session/start and upload_session/append.
Get about meTool to get information about the current user's Dropbox account.
Get accountTool to get information about a user's Dropbox account using their account ID.
Get account batchTool to get information about multiple user accounts in a single request.
Get available team member rolesTool to retrieve all available team member roles for the connected Dropbox team.
Get copy referenceTool to get a copy reference to a file or folder.
Get file lock batchTool to return lock metadata for multiple files in a single batch request.
Get shared file metadata batchTool to retrieve metadata for multiple shared files in a single batch request.
Get file previewTool to get a preview for a file.
Get file request detailsTool to retrieve details of an existing file request by ID.
Get file or folder tagsTool to get list of tags assigned to files or folders in Dropbox.
Get folder state cursorTool to get a cursor representing the current state of a folder without listing its contents.
Get JWKSTool to retrieve JSON Web Key Set containing public verification keys for Dropbox signed ID tokens.
Get file or folder metadataTool to fetch metadata for a file or folder by path.
Get file or folder metadata (alpha)Tool to fetch metadata for a file or folder using the alpha endpoint.
Get OpenID configTool to retrieve Dropbox's OpenID Connect discovery document describing supported OAuth 2.
Get shared file metadataTool to retrieve metadata for a shared file in Dropbox.
Get shared folder metadataTool to retrieve metadata for a specific shared folder by its ID.
Download file from shared linkTool to download a file from a Dropbox shared link.
Get shared link metadataTool to resolve a Dropbox shared link URL into structured metadata.
Get space usageTool to get space usage information for the current user's Dropbox account.
Get team feature valuesTool to get values for one or more team features.
Get team folder infoTool to retrieve metadata for team folders.
Get team groups infoTool to retrieve information about one or more team groups by their IDs or external IDs.
Get team groups job statusTool to check the status of an asynchronous team groups job in Dropbox.
Get team infoTool to retrieve information about a Dropbox team.
Get team audit log eventsTool to retrieve team audit log events from Dropbox.
Get team log events (continue)Tool to paginate through team audit log events using a cursor from team_log/get_events.
Get team member custom quotaTool to retrieve custom storage quotas for team members.
Get team members add job status v2Tool to poll the status of an asynchronous team member addition job.
Get team members infoTool to retrieve information about multiple team members in a single request.
Get property template for teamTool to get the schema for a specified property template for a team.
Get temporary linkTool to get a one-click temporary (expiring) download link.
Get temporary upload linkTool to get a one-time use temporary upload link to upload a file to Dropbox.
Get thumbnailTool to get a thumbnail for an image file.
Get thumbnail batchTool to get thumbnails for multiple image files in a single batch request.
Get thumbnail v2Tool to get a thumbnail for an image file.
Get user featuresTool to get a list of feature values configured for the current Dropbox account.
List member space limits excluded users (continue)Tool to paginate through team members excluded from space limits using a cursor from a previous list call.
List file membersTool to obtain the members who have been invited to a file, both inherited and uninherited members.
List file members batchTool to get members of multiple files at once.
List file requestsTool to list all file requests owned by the current user.
List file requests (continue)Tool to paginate through file requests using a cursor from a previous list call.
List file revisionsTool to retrieve the revision history for a file.
List files in folderTool to list files and folders in a specified Dropbox directory.
List folder continueTool to continue paginating through folder contents using a cursor from list_folder.
List folder membersTool to list members of a shared folder, including users, groups, and invitees.
List folder members continueTool to continue paginating through shared folder members using a cursor from list_folder_members.
List shared folders continueTool to continue paginating through shared folders using a cursor from list_folders.
List member linked appsTool to list all applications linked to a specific team member's account.
List excluded users from space limitsTool to list team members excluded from space limits.
List mountable foldersTool to list all shared folders the current user can mount or unmount.
List mountable folders continueTool to paginate through mountable shared folders using a cursor.
List Paper docsTool to return the list of all Paper docs according to filter and sort specifications.
List Paper documents (continue)Tool to continue paginating through Paper documents using a cursor from paper/docs/list.
List received filesTool to list all files shared with the current user.
List shared foldersTool to list all shared folders the authenticated user has access to.
List shared linksTool to list existing shared links for the current user, optionally filtered by path.
List team sharing allowlistTool to list Approve List entries for a team from newest to oldest.
List team devicesTool to list all device sessions of a team including web sessions, desktop clients, and mobile clients.
List team foldersTool to list all team folders for a Dropbox Business team.
List team folders continueTool to continue paginating through team folders using a cursor from team_folder/list.
List team group membersTool to list members of a Dropbox team group.
List team groupsTool to list all groups on a Dropbox team.
List team groups continueTool to continue listing team groups using a cursor from team/groups/list.
List team group members continueTool to continue listing team group members using a cursor from team/groups/members/list.
List members linked appsTool to list all applications linked to team members' accounts.
List team member devicesTool to list all device sessions of a team's member, including web sessions, desktop clients, and mobile clients.
List team membersTool to list members of a Dropbox team.
List team members continue (v2)Tool to continue listing team members using a cursor from team/members/list or team/members/list/continue_v2.
List team namespacesTool to list all team-accessible namespaces in a Dropbox Business team.
List team namespaces continueTool to continue paginating through team-accessible namespaces using a cursor from team/namespaces/list.
List team sharing allowlist continueTool to continue paginating through team sharing allowlist entries using a cursor.
List property templates for teamTool to list all property templates for a team.
List user templatesTool to get the template identifiers for a user.
Modify shared link settingsTool to modify settings of an existing Dropbox shared link.
Mount shared folderTool to mount a shared folder for the current user after they have been added as a member.
Move multiple files or folders in batchTool to move multiple files or folders to different locations at once in Dropbox.
Move file or folderMove file or folder
Overwrite file propertiesTool to overwrite property groups associated with a file or folder.
Read a fileDownloads a file from the specified Dropbox path, requiring `files.
Remove file memberTool to remove a specified member from a file's sharing permissions.
Remove File PropertiesTool to permanently remove specified property groups from a file or folder.
Remove file properties template for teamTool to remove a property template from a team.
Remove tag from file or folderTool to remove a tag from a file or folder in Dropbox.
Remove folder memberTool to remove a member from a shared folder.
Remove group membersTool to remove members from a Dropbox team group.
Remove sharing allowlistTool to remove domains or email addresses from the team sharing allowlist.
Remove team member custom quotaTool to remove custom storage quota for team members, reverting them to the team's default quota.
Remove member space limits excluded usersTool to remove users from the member space limits excluded users list.
Rename team folderTool to rename an existing team folder in Dropbox.
Resend secondary email verificationTool to resend secondary email verification emails to team members.
Restore file to specific revisionTool to restore a specific revision of a file to the given path in Dropbox.
Revoke shared linkTool to revoke a Dropbox shared link.
Save copy referenceTool to save a copy reference to the user's Dropbox.
Save file from URLTool to save a file to Dropbox directly from a public URL via server-side fetch.
Continue Dropbox SearchTool to fetch the next page of search results from a previous Dropbox search.
Search File or FolderTool to search for files and folders in Dropbox by name or content, optionally scoped to a path, with pagination support.
Search File PropertiesTool to search across property templates for particular property field values.
Send team member welcome emailTool to send a welcome email to a pending team member.
Set profile photoTool to set the profile photo for the current user's Dropbox account.
Set team member custom quotaTool to set custom storage quotas for team members in Dropbox.
Share folderTool to share a folder with collaborators in Dropbox.
Start upload sessionTool to start a new upload session with the given data.
Start batch of upload sessionsTool to start a batch of upload sessions.
Unlock multiple filesTool to unlock multiple files at specified paths in a single batch operation.
Unmount shared folderTool to unmount a shared folder for the current user.
Unshare fileTool to remove all members from a Dropbox file.
Unshare folderTool to allow a shared folder owner to unshare the folder.
Update file memberTool to change a member's access level on a shared file.
Update file propertiesTool to update custom properties on a file or folder in Dropbox.
Update file requestTool to update an existing file request in Dropbox.
Update folder memberTool to update another member's permissions in a shared folder.
Update folder policyTool to update the sharing policies for a shared folder.
Set group member access typeTool to change a member's access type in a team group.
Update Paper DocumentTool to update an existing Dropbox Paper document with new content in Markdown, HTML, or plain text format.
Update property template for teamTool to update a property template for a team in Dropbox.
Update team folder sync settingsTool to update the sync settings on a team folder or its contents in Dropbox.
Update team groupTool to update a team group's name, external ID, and/or management type.
Set team member admin permissionsTool to update a team member's admin permissions.
Set team member profileTool to update a team member's profile information.
Set team member profile photoTool to update a team member's profile photo.
Upload FileUploads a file (up to ~150 MB) to a specified path in the user's Dropbox, with options for handling existing files.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Prerequisites

Before starting, make sure you have:
  • Python 3.9 or higher
  • A Composio account and API key
  • A Dropbox connection authorized in Composio
  • An OpenAI API key for the CrewAI LLM
  • Basic familiarity with Python

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.

Install dependencies

bash
pip install composio crewai crewai-tools[mcp] python-dotenv
What's happening:
  • composio connects your agent to Dropbox via MCP
  • crewai provides Agent, Task, Crew, and LLM primitives
  • crewai-tools[mcp] includes MCP helpers
  • python-dotenv loads environment variables from .env

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
OPENAI_API_KEY=your_openai_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates with Composio
  • USER_ID scopes the session to your account
  • OPENAI_API_KEY lets CrewAI use your chosen OpenAI model

Import dependencies

python
import os
from composio import Composio
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter
import dotenv

dotenv.load_dotenv()

COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set")
What's happening:
  • CrewAI classes define agents and tasks, and run the workflow
  • MCPServerHTTP connects the agent to an MCP endpoint
  • Composio will give you a short lived Dropbox MCP URL

Create a Composio Tool Router session for Dropbox

python
composio_client = Composio(api_key=COMPOSIO_API_KEY)
session = composio_client.create(user_id=COMPOSIO_USER_ID, toolkits=["dropbox"])

url = session.mcp.url
What's happening:
  • You create a Dropbox only session through Composio
  • Composio returns an MCP HTTP URL that exposes Dropbox tools

Initialize the MCP Server

python
server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users search the internet effectively",
        backstory="You are a helpful assistant with access to search tools.",
        tools=tools,
        verbose=False,
        max_iter=10,
    )
What's Happening:
  • Server Configuration: The code sets up connection parameters including the MCP server URL, streamable HTTP transport, and Composio API key authentication.
  • MCP Adapter Bridge: MCPServerAdapter acts as a context manager that converts Composio MCP tools into a CrewAI-compatible format.
  • Agent Setup: Creates a CrewAI Agent with a defined role (Search Assistant), goal (help with internet searches), and access to the MCP tools.
  • Configuration Options: The agent includes settings like verbose=False for clean output and max_iter=10 to prevent infinite loops.
  • Dynamic Tool Usage: Once created, the agent automatically accesses all Composio Search tools and decides when to use them based on user queries.

Create a CLI Chatloop and define the Crew

python
print("Chat started! Type 'exit' or 'quit' to end.\n")

conversation_context = ""

while True:
    user_input = input("You: ").strip()

    if user_input.lower() in ["exit", "quit", "bye"]:
        print("\nGoodbye!")
        break

    if not user_input:
        continue

    conversation_context += f"\nUser: {user_input}\n"
    print("\nAgent is thinking...\n")

    task = Task(
        description=(
            f"Conversation history:\n{conversation_context}\n\n"
            f"Current request: {user_input}"
        ),
        expected_output="A helpful response addressing the user's request",
        agent=agent,
    )

    crew = Crew(agents=[agent], tasks=[task], verbose=False)
    result = crew.kickoff()
    response = str(result)

    conversation_context += f"Agent: {response}\n"
    print(f"Agent: {response}\n")
What's Happening:
  • Interactive CLI Setup: The code creates an infinite loop that continuously prompts for user input and maintains the entire conversation history in a string variable.
  • Input Validation: Empty inputs are ignored to prevent processing blank messages and keep the conversation clean.
  • Context Building: Each user message is appended to the conversation context, which preserves the full dialogue history for better agent responses.
  • Dynamic Task Creation: For every user input, a new Task is created that includes both the full conversation history and the current request as context.
  • Crew Execution: A Crew is instantiated with the agent and task, then kicked off to process the request and generate a response.
  • Response Management: The agent's response is converted to a string, added to the conversation context, and displayed to the user, maintaining conversational continuity.

Complete Code

Here's the complete code to get you started with Dropbox and CrewAI:

python
from crewai import Agent, Task, Crew, LLM
from crewai_tools import MCPServerAdapter
from composio import Composio
from dotenv import load_dotenv
import os

load_dotenv()

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not GOOGLE_API_KEY:
    raise ValueError("GOOGLE_API_KEY is not set in the environment.")
if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set in the environment.")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set in the environment.")

# Initialize Composio and create a session
composio = Composio(api_key=COMPOSIO_API_KEY)
session = composio.create(
    user_id=COMPOSIO_USER_ID,
    toolkits=["dropbox"],
)
url = session.mcp.url

# Configure LLM
llm = LLM(
    model="gpt-5",
    api_key=os.getenv("OPENAI_API_KEY"),
)

server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users with internet searches",
        backstory="You are an expert assistant with access to Composio Search tools.",
        tools=tools,
        llm=llm,
        verbose=False,
        max_iter=10,
    )

    print("Chat started! Type 'exit' or 'quit' to end.\n")

    conversation_context = ""

    while True:
        user_input = input("You: ").strip()

        if user_input.lower() in ["exit", "quit", "bye"]:
            print("\nGoodbye!")
            break

        if not user_input:
            continue

        conversation_context += f"\nUser: {user_input}\n"
        print("\nAgent is thinking...\n")

        task = Task(
            description=(
                f"Conversation history:\n{conversation_context}\n\n"
                f"Current request: {user_input}"
            ),
            expected_output="A helpful response addressing the user's request",
            agent=agent,
        )

        crew = Crew(agents=[agent], tasks=[task], verbose=False)
        result = crew.kickoff()
        response = str(result)

        conversation_context += f"Agent: {response}\n"
        print(f"Agent: {response}\n")

Conclusion

You now have a CrewAI agent connected to Dropbox through Composio's Tool Router. The agent can perform Dropbox operations through natural language commands.

Next steps:

  • Add role-specific instructions to customize agent behavior
  • Plug in more toolkits for multi-app workflows
  • Chain tasks for complex multi-step operations

How to build Dropbox MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Dropbox MCP?

With a standalone Dropbox MCP server, the agents and LLMs can only access a fixed set of Dropbox tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Dropbox and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with CrewAI?

Yes, you can. CrewAI fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Dropbox tools.

Can I manage the permissions and scopes for Dropbox while using Tool Router?

Yes, absolutely. You can configure which Dropbox scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Dropbox data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.