How to integrate Box MCP with Claude Code

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Box logo
Claude Code logo
divider

Introduction

Manage your Box directly from Claude Code with zero worries about OAuth hassles, API-breaking issues, or reliability and security concerns.

You can do this in two different ways:

  1. Via Composio Connect - Direct and easiest approach
  2. Via Composio SDK - Programmatic approach with more control

Also integrate Box with

Why use Composio?

  • Only one MCP URL to connect multiple apps with Claude Code with zero auth hassles.
  • Programmatic tool calling allows LLMs to write its code in a remote workbench to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Handling Large tool responses out of LLM context to minimize context rot.
  • Dynamic just-in-time access to 20,000 tools across 1000+ other Apps for cross-app workflows. It loads the tools you need, so LLMs aren't overwhelmed by tools you don't need.

Connecting Box to Claude Code using Composio

1. Add the Composio MCP to Claude

Terminal

2. Start Claude Code

bash
claude

3. Open your MCP list

bash
/mcp

4. Select Composio and click on Authenticate

Select Composio and click Authenticate

5. This will redirect you to the Composio OAuth page. Complete the flow by authorizing Composio and you're all set.

Composio OAuth authorization page
Composio authorization complete
Ask Claude to connect to your account and authenticate via the link

Supported Tools & Triggers

Tools
Triggers
Add domain to list of allowed collaboration domainsCreates a new entry in the list of allowed domains for collaboration within your enterprise.
Add classification to fileAdds a classification to a file by specifying the label of the classification to add.
Add classification to folderAdds a classification to a folder by specifying the label of the classification to add.
Add initial classificationsInitializes the classification template for an enterprise with an initial set of classification options.
Add or update user avatarAdds or updates a user avatar.
Add shared link to fileAdds a shared link to a file.
Add shared link to folderAdds a shared link to a folder, allowing it to be shared with others via a URL.
Add shared link to web linkAdds a shared link to a web link.
Add user to groupCreates a group membership.
Append metadata taxonomy levelAppends a new level to a metadata taxonomy structure.
Apply watermark to fileApplies or update a watermark on a file.
Apply watermark to folderApplies or update a watermark on a folder.
Ask questionAsk questions about Box files using Box AI.
Assign legal hold policyAssign a legal hold policy to a file, file version, folder, or user.
Assign retention policyAssigns a retention policy to an item in Box to enforce content retention.
Assign storage policyCreates a storage policy assignment for an enterprise or user.
Assign taskAssigns a task to a user.
Authorize userAuthorize a user by sending them through the [Box](https://box.
Cancel box sign requestCancels a pending Box Sign request that has not yet been fully signed or declined.
Commit upload sessionCommits an upload session and creates a file from the uploaded chunks.
Copy fileCreates a copy of a file.
Copy file requestCopies an existing file request to a new folder.
Copy folderCreates a copy of a folder within a destination folder.
Create AI AgentCreates a custom AI agent in Box AI Studio.
Create Box Sign RequestCreates a Box Sign request to send documents for electronic signing.
Create box skill cards on fileApplies one or more Box Skills metadata cards to a file.
Create user exemption from collaboration domain restrictionsExempts a specific user from the enterprise's collaboration domain restrictions.
Create collaborationAdds a collaboration for a single user or a single group to a file or folder.
Create commentAdds a comment by the user to a specific file, or as a reply to an other comment.
Create email aliasAdds a new email alias to a user account.
Create folderCreates a new empty folder within the specified parent folder.
Create folder lockCreates a folder lock on a folder, preventing it from being moved and/or deleted.
Create groupCreates a new group of users in an enterprise.
Create legal hold policyCreate a new legal hold policy in Box.
Create metadata cascade policyCreates a new metadata cascade policy that automatically applies a metadata template to all files and subfolders within a specified folder.
Create metadata instance on fileApplies an instance of a metadata template to a file.
Create metadata instance on folderApplies an instance of a metadata template to a folder.
Create metadata taxonomyTool to create a new metadata taxonomy in Box.
Create metadata taxonomy levelsCreates new hierarchical levels for a metadata taxonomy in Box.
Create metadata taxonomy nodeTool to create a new metadata taxonomy node within a specified taxonomy.
Create metadata templateCreates a new metadata template that can be applied to files and folders.
Create retention policyCreates a retention policy for managing content lifecycle in Box.
Create shield information barrierCreates a shield information barrier to establish an "ethical wall" that separates individuals/groups within an enterprise and prevents confidential information sharing.
Create shield information barrier reportCreates a shield information barrier report for a given barrier.
Create shield information barrier segmentCreates a new shield information barrier segment for compliance and information isolation.
Create shield information barrier segment memberAdds a Box user to a shield information barrier segment for compliance and information security.
Create shield information barrier segment restrictionCreates a ONE-WAY shield information barrier segment restriction preventing collaboration between members of two segments (e.
Create slack integration mappingCreates a [Slack integration mapping](https://support.
Create taskCreates a single task on a file.
Create Teams integration mappingCreates a Microsoft Teams integration mapping that links a Teams channel or team to a Box folder.
Create terms of serviceCreates a terms of service for a given enterprise and type of user.
Create terms of service status for new userCreates a terms of service status record for a user who has not previously accepted or rejected the terms.
Create upload sessionCreates an upload session for chunked upload of large files (20MB+).
Create upload session for existing fileCreates an upload session for uploading a new version of an existing file using chunked upload.
Create userCreates a new managed user in an enterprise.
Create user inviteInvites an existing external user to join an enterprise.
Create webhookCreates a webhook to monitor a file or folder for specific events.
Create web linkCreates a web link object within a folder.
Create zip downloadCreates a request to download multiple files and folders as a single `zip` archive file.
Delete AI AgentPermanently deletes a custom AI agent from Box AI Studio.
Remove domain from list of allowed collaboration domainsRemoves a domain from the list of allowed collaboration domains (whitelist) within your enterprise.
Delete shield information barrier segment restriction by idDeletes a shield information barrier segment restriction by its unique ID.
Remove box skill cards from fileRemoves any Box Skills cards metadata from a file.
Remove collaborationRemoves a collaboration from a file or folder, revoking the collaborator's access.
Remove commentPermanently deletes a comment from a file or folder in Box.
Remove device pinDeletes an individual device pin from the enterprise.
Remove email aliasRemoves an email alias from a user.
Delete fileDeletes a file from Box by moving it to trash or permanently (based on enterprise settings).
Permanently remove filePermanently deletes a file from the trash.
Delete file requestDeletes a file request permanently.
Remove file versionMove a file version to the trash.
Delete folderDeletes a folder, either permanently or by moving it to the trash.
Delete folder lockDeletes a folder lock on a given folder, removing restrictions on move and delete operations.
Permanently remove folderPermanently deletes a folder that is in the trash.
Remove groupPermanently deletes a group.
Remove legal hold policyPermanently delete an existing legal hold policy from Box.
Remove metadata cascade policyPermanently deletes a metadata cascade policy from a folder.
Remove metadata instance from fileRemoves a metadata instance from a file.
Remove metadata instance from folderRemove a metadata instance from a folder.
Remove metadata taxonomyPermanently deletes a metadata taxonomy from the enterprise.
Remove metadata taxonomy nodePermanently deletes a metadata taxonomy node from Box.
Remove metadata templatePermanently delete a metadata template and all its instances from files and folders.
Delete retention policyPermanently deletes a retention policy from the Box enterprise.
Remove retention policy assignmentRemoves a retention policy assignment from content in Box.
Remove shared link from fileRemoves a shared link from a file in Box.
Remove shared link from folderRemoves a shared link from a folder in Box.
Remove shared link from web linkRemoves a shared link from a web link in Box.
Delete shield information barrier segmentPermanently deletes a shield information barrier segment by its ID.
Delete shield information barrier segment member by idRemoves a user from a shield information barrier segment by deleting their membership.
Delete Slack integration mappingDeletes a Slack integration mapping that links a Box folder to a Slack channel.
Unassign storage policyDeletes a storage policy assignment, causing the assigned user to inherit the enterprise's default storage policy (Box Zone).
Remove taskPermanently deletes a task from Box.
Unassign taskDeletes a specific task assignment, removing the task from the assigned user.
Delete teams integration mappingDeletes a Microsoft Teams integration mapping that links a Box folder to a Teams channel.
Remove upload sessionAbort and permanently remove a chunked upload session, discarding all uploaded data.
Delete userPermanently deletes a user from the enterprise.
Delete user avatarDeletes a user's custom avatar image from Box.
Remove User Domain ExemptionRemoves a user's exemption from the enterprise's collaboration domain restrictions.
Remove user from groupDeletes a specific group membership.
Remove watermark from fileRemoves the watermark from a file.
Remove watermark from folderRemoves the watermark from a folder.
Remove webhookPermanently deletes a webhook from the Box account.
Remove web linkDeletes a web link.
Permanently remove web linkPermanently deletes a web link that is in the trash.
Download fileReturns the contents of a file in binary format.
Download zip archiveDownloads a zip archive containing files and/or folders from Box.
Extract metadata freeformExtract metadata from Box files using AI with freeform prompts.
Extract metadata structuredExtract structured metadata from files using Box AI.
Find item for shared linkReturns the file, folder, web link, or app item represented by a shared link.
Find file for shared linkReturns the file represented by a shared link.
Find folder for shared linkReturn the folder represented by a shared link.
Find metadata template by instance idFinds a metadata template by searching for the ID of an instance of the template.
Force apply metadata cascade policy to folderForces a metadata cascade policy to immediately apply the folder's metadata template to all existing child files and subfolders.
Generate textGenerate text using Box AI based on a prompt and file context.
Get AI Agent by IDRetrieves detailed information about a specific AI Agent by its unique identifier.
Get ai agent default configurationRetrieve the default AI agent configuration for a specific mode.
Get allowed collaboration domainRetrieves details of a specific allowed collaboration domain entry within your enterprise.
Get box sign request by idRetrieves the details of a specific Box Sign request by its unique ID.
Get Box Sign Template by IDRetrieves details of a specific Box Sign template by its unique ID.
Get collaborationRetrieves details of a single collaboration by its ID.
Get collection by idRetrieves details of a specific collection by its unique identifier.
Get commentRetrieves the message and metadata for a specific comment, as well as information on the user who created the comment.
Get current userRetrieves information about the user who is currently authenticated.
Get device pinRetrieves information about an individual device pin in the enterprise.
Get Real-Time Server URL for Long-Polling EventsReturns a list of real-time servers that can be used for long-polling user events.
Get file informationRetrieves the details about a file.
Get file requestRetrieves detailed information about a file request in Box.
Get files under retentionReturns a paginated list of files under retention for a specific retention policy assignment.
Get file thumbnailRetrieves a thumbnail, or smaller image representation, of a file.
Get file versionRetrieve detailed information about a specific version of a file.
Get file version legal holdRetrieves detailed information about a specific file version legal hold by its ID.
Get file versions under retentionReturns a list of file versions under retention for a specified retention policy assignment.
Get folder informationRetrieves details for a folder, including the first 100 entries in the folder.
Get groupRetrieves information about a group.
Get group membershipRetrieves a specific group membership.
Get legal hold policyRetrieve detailed information about a specific legal hold policy by its ID.
Get legal hold policy assignmentRetrieves detailed information about a specific legal hold policy assignment by its ID.
Get metadata cascade policyRetrieve a specific metadata cascade policy assigned to a folder.
Get metadata instance on fileRetrieves a specific metadata template instance that has been applied to a file.
Get metadata instance on folderRetrieves the instance of a metadata template that has been applied to a folder.
Get metadata taxonomies for namespaceRetrieves all metadata taxonomies within a specific namespace.
Get metadata taxonomy by taxonomy keyRetrieves a metadata taxonomy by its namespace and taxonomy key.
Get metadata taxonomy node by IDRetrieves a specific node from a metadata taxonomy by its identifier.
Get metadata template by idRetrieves a metadata template by its ID.
Get metadata template by nameRetrieves a metadata template by its `scope` and `templateKey` values.
Get retention policyRetrieves a retention policy by its unique ID.
Get retention policy assignmentRetrieves a retention policy assignment by its unique ID.
Get shared link for fileRetrieves the shared link information for a file.
Get shared link for folderRetrieves shared link information for a folder.
Get shared items web linksTool to retrieve web link information for a shared link.
Get shield information barrier with specified idRetrieves a shield information barrier by its unique ID.
Get shield information barrier report by idRetrieves a shield information barrier report by its ID.
Get shield information barrier segment with specified idRetrieves a shield information barrier segment by its unique identifier.
Get shield information barrier segment member by idRetrieves a shield information barrier segment member by its unique ID.
Get shield information barrier segment restriction by idRetrieves a shield information barrier segment restriction by its unique ID.
Get storage policyFetches a specific storage policy by its ID.
Get storage policy assignmentRetrieves information about a specific storage policy assignment.
Get taskRetrieves detailed information about a specific task in Box.
Get task assignmentRetrieves detailed information about a specific task assignment in Box.
Get terms of serviceRetrieves a specific terms of service by its unique identifier.
Get trashed fileRetrieves a file that has been moved to the trash.
Get trashed folderRetrieves a folder that has been moved to the trash.
Get trashed web linkRetrieves a web link that has been moved to the trash.
Get upload sessionRetrieves detailed information about an existing chunked upload session.
Get userRetrieves information about a user in the enterprise.
Get user avatarRetrieves the avatar image of a Box user.
Get user exempt from collaboration domain restrictionsRetrieves details of a specific user exemption from collaboration domain restrictions.
Get user invite statusReturns the status of a user invite.
Get watermark on fileRetrieve the watermark for a file.
Get watermark for folderRetrieve the watermark for a folder.
Get webhookRetrieves detailed information about a specific webhook by its ID.
Get web linkRetrieve detailed information about a web link (bookmark) in Box.
Get zip download statusGet the download status of a zip archive, including progress, skipped items, and current state.
List ai agentsLists AI agents based on the provided parameters.
List all classificationsRetrieves the classification metadata template and lists all the classifications available to this enterprise.
List all collectionsRetrieves all collections for a given user.
List all file versionsRetrieve a list of the past versions for a file.
List all global metadata templatesUsed to retrieve all generic, global metadata templates available to all enterprises using Box.
List allowed collaboration domainsReturns the list domains that have been deemed safe to create collaborations for within the current enterprise.
List box sign requestsGets signature requests created by a user.
List box sign templatesGets Box Sign templates created by a user.
List box skill cards on fileList the Box Skills metadata cards that are attached to a file.
List collection itemsRetrieves the files and/or folders contained within a Box collection.
List enterprise device pinsRetrieves all the device pins within an enterprise.
List groups for enterpriseRetrieves all of the groups for a given enterprise.
List all metadata templates for enterpriseUsed to retrieve all metadata templates created to be used specifically within the user's enterprise
List enterprise usersReturns a list of all users for the Enterprise along with their `user_id`, `public_name`, and `login`.
List user and enterprise eventsReturns up to a year of past events for a given user or for the entire enterprise.
List file app item associations**This is a beta feature, which means that its availability might be limited.
List file collaborationsRetrieves a list of pending and active collaborations for a file.
List file commentsRetrieves a list of comments for a file.
Review files on legal hold policy assignmentGet a list of files with current file versions for a legal hold assignment.
List file version legal holdsGet a list of file versions on legal hold for a legal hold assignment.
List folder app item associations**This is a beta feature, which means that its availability might be limited.
List folder collaborationsRetrieves a list of pending and active collaborations for a folder.
List folder locksRetrieves folder lock details for a given folder.
List group collaborationsRetrieves all the collaborations for a group.
List members of groupRetrieves all the members for a group.
List previous file versions for legal hold policy assignmentRetrieves a list of previous (non-current) file versions that are on legal hold for a specific legal hold policy assignment.
List Box HubsTool to list all Box Hubs for the authenticated user or enterprise.
List items in folderRetrieves a page of items in a folder.
List all legal hold policiesRetrieves a list of legal hold policies that belong to an enterprise.
List legal hold policy assignmentsRetrieves a list of items a legal hold policy has been assigned to.
List metadata cascade policiesRetrieves a list of all the metadata cascade policies that are applied to a given folder.
List metadata instances on fileRetrieves all metadata instances applied to a file.
List metadata instances on folderRetrieves all metadata for a given folder.
List metadata taxonomy nodesRetrieves metadata taxonomy nodes based on the specified parameters.
List pending collaborationsRetrieves all pending collaboration invites for this user.
List recently accessed itemsReturns information about the recent items accessed by a user, either in the last 90 days or up to the last 1000 items accessed.
List retention policiesRetrieves all of the retention policies for an enterprise.
List retention policy assignmentsRetrieves all retention policy assignments for a specified retention policy.
List shield information barrier reportsLists shield information barrier reports for a specified barrier.
List shield information barriersRetrieves a list of shield information barrier objects for the enterprise of JWT.
List shield information barrier segment membersLists shield information barrier segment members based on provided segment IDs.
List shield information barrier segment restrictionsLists all shield information barrier segment restrictions for a specific segment.
List shield information barrier segmentsRetrieves a list of shield information barrier segment objects for the specified Information Barrier ID.
List slack integration mappingsLists [Slack integration mappings](https://support.
List storage policiesFetches all the storage policies in the enterprise.
List storage policy assignmentsFetches all the storage policy assignment for an enterprise or user.
List task assignmentsLists all of the assignments for a given task.
List tasks on fileRetrieves a list of all the tasks for a file.
List teams integration mappingsLists [Teams integration mappings](https://support.
List terms of servicesReturns the current terms of service text and settings for the enterprise.
List terms of service user statusesRetrieves a list of users and their acceptance status for a specific terms of service.
List trashed itemsRetrieves the files and folders that have been moved to the trash.
List upload session partsList the parts (chunks) that have been uploaded to a chunked upload session.
List user's email aliasesRetrieves all email aliases for a user.
List user's groupsRetrieves all group memberships for a user, including the groups they belong to and their role in each group (member or admin).
List users exempt from collaboration domain restrictionsReturns a list of users who have been exempt from the collaboration domain restrictions.
List all webhooksReturns all defined webhooks for the requesting application.
List workflowsLists Box Relay workflows configured for a specific folder.
Preflight check before uploadPerforms a preflight check to verify that a file will be accepted by Box before uploading the entire file.
Promote file versionPromote a specific version of a file.
Query files folders by metadataQuery files and folders by metadata using SQL-like syntax.
Refresh access tokenRefresh an Access Token using its client ID, secret, and refresh token.
Request access tokenRequest an Access Token using either a client-side obtained OAuth 2.
Resend Box Sign RequestResends signature request emails to all outstanding signers.
Restore fileRestores a file that has been moved to the trash.
Restore file versionRestores a specific version of a file after it was deleted (trashed).
Restore folderRestores a folder that has been moved to the trash.
Restore web linkRestores a web link that has been moved to the trash.
Revoke access tokenRevoke an active Access Token, effectively logging a user out that has been previously authenticated.
Search for contentSearches for files, folders, web links, and shared files across the users content or across the entire enterprise.
Starts workflow based on request bodyStarts a Box Relay workflow with trigger type `WORKFLOW_MANUAL_START`.
Create jobs to terminate user group sessionTerminates all active sessions for users belonging to the specified Box enterprise groups.
Create jobs to terminate users sessionCreates asynchronous jobs to terminate active Box sessions for specified users.
Transfer owned foldersTransfers all files and folders owned by one user to another user's account in Box.
Trim metadata taxonomy levelsDeletes the last level from a metadata taxonomy by trimming it.
Unassign legal hold policyRemove a legal hold policy assignment from an item (user, folder, file, or file version).
Update AI AgentUpdates an existing custom AI agent in Box AI Studio.
Update all box skill cards on fileAn alternative method to overwrite and update all Box Skill metadata cards on a file.
Update shield information barrier segment with specified idUpdates a shield information barrier segment's name and/or description.
Update box skill cards on fileUpdates one or more Box Skills metadata cards on a file using JSON-Patch format.
Update collaborationUpdates a collaboration.
Update commentUpdate the message of a comment.
Update fileUpdates a file.
Update file requestUpdates a file request in Box.
Update folderUpdates a folder.
Update groupUpdates a specific group.
Update group membershipUpdates a user's group membership.
Update legal hold policyUpdate an existing legal hold policy in Box.
Update metadata instance on fileUpdates a metadata instance on a file using JSON-Patch operations.
Update metadata instance on folderUpdates metadata on a folder using JSON-Patch operations (RFC 6902).
Update metadata taxonomyTool to update an existing metadata taxonomy's display name.
Update metadata taxonomy nodeTool to update an existing metadata taxonomy node's display name.
Update metadata templateUpdates a metadata template by applying JSON-Patch operations.
Update retention policyUpdates an existing Box retention policy.
Update shared link on fileUpdates a shared link on a file.
Update shared link on folderUpdates a shared link on a folder.
Update shared link on web linkUpdates a shared link on a web link.
Change shield information barrier statusChange the status of a shield information barrier.
Update slack integration mappingUpdates an existing [Slack integration mapping](https://support.
Update storage policy assignmentUpdates a storage policy assignment for an enterprise or user.
Update taskUpdates a task.
Update task assignmentUpdates a task assignment to change its resolution state or add a message.
Update teams integration mappingUpdates a Microsoft Teams integration mapping that links a Box folder to a Teams channel.
Update terms of serviceUpdates an existing terms of service for the enterprise.
Update terms of service status for existing userUpdates the acceptance status of a terms of service for a user who has previously accepted or rejected it.
Update userUpdates a managed or app user in an enterprise.
Update webhookUpdates an existing webhook's configuration.
Update web linkUpdates a web link object.
Upload fileUploads a small file to Box.
Upload file versionUpdate a file's content.
Upload part of fileUploads a chunk of a file for an upload session.

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

The Box MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Box account. It provides structured and secure access to your files and folders, so your agent can perform actions like sharing files, managing classifications, applying watermarks, and controlling collaboration on your behalf.

  • File sharing and collaboration: Instantly add or manage shared links for files, folders, or web links, making it easy to collaborate securely with others.
  • Automated classification management: Let your agent add, initialize, or update file and folder classifications to enforce security or organizational policies.
  • Watermarking and content protection: Apply or update watermarks on files to safeguard sensitive information and manage compliance.
  • Group and user management: Have your agent add users to groups or update user avatars to streamline administrative tasks within your team.
  • Domain and access control: Automatically update the list of allowed collaboration domains, ensuring only trusted domains can access your resources.

Connecting Box via Composio SDK

Composio SDK is the underlying tech that powers Rube. It's a universal gateway that does everything Rube does but with much more programmatic control. You can programmatically generate an MCP URL with the app you need (here Box) for even more tool search precision. It's secure and reliable.

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:
  • Claude Pro, Max, or API billing enabled Anthropic account
  • Composio API Key
  • A Box account
  • Basic knowledge of Python or TypeScript

Install Claude Code

bash
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash

# Windows PowerShell
irm https://claude.ai/install.ps1 | iex

# Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

To install Claude Code, use one of the following methods based on your operating system:

Set up Claude Code

bash
cd your-project-folder
claude

Open a terminal, go to your project folder, and start Claude Code:

  • Claude Code will open in your terminal
  • Follow the prompts to sign in with your Anthropic account
  • Complete the authentication flow
  • Once authenticated, you can start using Claude Code
Claude Code initial setup showing sign-in prompt
Claude Code terminal after successful login

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here

Create a .env file in your project root with the following variables:

  • COMPOSIO_API_KEY authenticates with Composio (get it from Composio dashboard)
  • USER_ID identifies the user for session management (use any unique identifier)

Install Composio library

pip install composio-core python-dotenv

Install the Composio Python library to create MCP sessions.

  • composio-core provides the core Composio functionality
  • python-dotenv loads environment variables from your .env file

Generate Composio MCP URL

import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

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

composio_client = Composio(api_key=COMPOSIO_API_KEY)

composio_session = composio_client.create(
    user_id=USER_ID,
    toolkits=["box"],
)

COMPOSIO_MCP_URL = composio_session.mcp.url

print(f"MCP URL: {COMPOSIO_MCP_URL}")
print(f"\nUse this command to add to Claude Code:")
print(f'claude mcp add --transport http box-composio "{COMPOSIO_MCP_URL}" --headers "X-API-Key:{COMPOSIO_API_KEY}"')

Create a script to generate a Composio MCP URL for Box. This URL will be used to connect Claude Code to Box.

What's happening:

  • We import the Composio client and load environment variables
  • Create a Composio instance with your API key
  • Call create() to create a Tool Router session for Box
  • The returned mcp.url is the MCP server URL that Claude Code will use
  • The script prints this URL so you can copy it

Run the script and copy the MCP URL

python generate_mcp_url.py

Run your Python script to generate the MCP URL.

  • The script connects to Composio and creates a Tool Router session
  • It prints the MCP URL and the exact command you need to run
  • Copy the entire claude mcp add command from the output

Add Box MCP to Claude Code

bash
claude mcp add --transport http box-composio "YOUR_MCP_URL_HERE" --headers "X-API-Key:YOUR_COMPOSIO_API_KEY"

# Then restart Claude Code
exit
claude

In your terminal, add the MCP server using the command from the previous step. The command format is:

  • claude mcp add registers a new MCP server with Claude Code
  • --transport http specifies that this is an HTTP-based MCP server
  • The server name (box-composio) is how you'll reference it
  • The URL points to your Composio Tool Router session
  • --headers includes your Composio API key for authentication

After running the command, close the current Claude Code session and start a new one for the changes to take effect.

Verify the installation

bash
claude mcp list

Check that your Box MCP server is properly configured.

  • This command lists all MCP servers registered with Claude Code
  • You should see your box-composio entry in the list
  • This confirms that Claude Code can now access Box tools

If everything is wired up, you should see your box-composio entry listed:

Claude Code MCP list showing the toolkit MCP server

Authenticate Box

The first time you try to use Box tools, you'll be prompted to authenticate.

  • Claude Code will detect that you need to authenticate with Box
  • It will show you an authentication link
  • Open the link in your browser (or copy/paste it)
  • Complete the Box authorization flow
  • Return to the terminal and start using Box through Claude Code

Once authenticated, you can ask Claude Code to perform Box operations in natural language. For example:

  • "Add watermark to confidential file in Box"
  • "Create shared link for project folder"
  • "Add classification label to financial report"

Complete Code

Here's the complete code to get you started with Box and Claude Code:

import os
from composio import Composio
from dotenv import load_dotenv

load_dotenv()

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

composio_client = Composio(api_key=COMPOSIO_API_KEY)

composio_session = composio_client.create(
    user_id=USER_ID,
    toolkits=["box"],
)

COMPOSIO_MCP_URL = composio_session.mcp.url

print(f"MCP URL: {COMPOSIO_MCP_URL}")
print(f"\nUse this command to add to Claude Code:")
print(f'claude mcp add --transport http box-composio "{COMPOSIO_MCP_URL}" --headers "X-API-Key:{COMPOSIO_API_KEY}"')

Conclusion

You've successfully integrated Box with Claude Code using Composio's MCP server. Now you can interact with Box directly from your terminal using natural language commands.

Key features of this setup:

  • Terminal-native experience without switching contexts
  • Natural language commands for Box operations
  • Secure authentication through Composio's managed MCP
  • Tool Router for dynamic tool discovery and execution

Next steps:

  • Try asking Claude Code to perform various Box operations
  • Add more toolkits to your Tool Router session for multi-app workflows
  • Integrate this setup into your development workflow for increased productivity

You can extend this by adding more toolkits, implementing custom workflows, or building automation scripts that leverage Claude Code's capabilities.

How to build Box MCP Agent with another framework

FAQ

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

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

Can I use Tool Router MCP with Claude Code?

Yes, you can. Claude Code 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 Box tools.

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

Yes, absolutely. You can configure which Box 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 Box 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.