One drive MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with One drive MCP or direct API to find files, upload and organize documents, share folders, and collaborate in real time through natural language.

One drive logoOne drive
Oauth2S2s Oauth2

OneDrive is Microsoft’s cloud storage for storing, syncing, and sharing files across devices. Access your files securely anywhere with real-time collaboration and offline support.

60 Tools9 Triggers

Try One drive now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
One drive
Try asking
TOOLS & TRIGGERS

Supported Tools and Triggers

Every One drive action and event your agent gets out of the box.

Check In Drive Item

Tool to check in a checked out driveItem resource, making the version of the document available to others.

Checkout Drive Item

Tool to check out a driveItem to prevent others from editing it and make your changes invisible until checked in.

Copy Item

Tool to copy a DriveItem (file or folder) to a new location asynchronously.

Create Drive Item Permission

Tool to create a new permission on a OneDrive drive item.

Create Sharing Link

Tool to create a sharing link for a DriveItem (file or folder) by its unique ID.

Delete Item

Tool to delete a DriveItem (file or folder) by its unique ID from the authenticated user's OneDrive.

Permanently Delete Drive Item

Tool to permanently delete a driveItem by its ID without moving it to the recycle bin.

Delete Drive Item Permission

Tool to delete a permission from a drive item.

Delete Shares Permission

Tool to delete the permission navigation property for a shared drive item.

Discard Checkout

Tool to discard the checkout of a driveItem, releasing it and discarding any changes made while checked out.

Download a file

Downloads a file from a user's OneDrive using its item ID, which must refer to a file and not a folder.

Download file by path

Downloads the contents of a file from OneDrive by its path.

Download item as format

Tool to download the contents of a driveItem converted to a specific format (e.

Download Drive Item Version Content

Tool to download the contents of a specific previous version of a drive item (file).

Follow Drive Item

Tool to follow a driveItem (file or folder) in OneDrive or SharePoint.

Get Drive

Retrieves the properties and relationships of a Drive resource by its unique ID.

Get DriveItem by Sharing URL

Tool to resolve a OneDrive/SharePoint sharing URL (or shareId) to a DriveItem with driveId and itemId.

Get Drives Following

Tool to retrieve a specific followed driveItem from a drive.

Get Group Drive

Tool to retrieve the document library (drive) for a Microsoft 365 group.

Get Item Metadata

Retrieves the metadata of a DriveItem by its unique ID.

Get Item Permissions

Retrieves the permissions of a DriveItem by its unique ID within a specific Drive.

Get Item Thumbnails

Tool to retrieve the thumbnails associated with a DriveItem.

Get Item Versions

Tool to retrieve the version history of a DriveItem by its unique ID.

Get Recent Items

Get files and folders recently accessed by the user.

Get Drive Root Folder

Tool to retrieve metadata for the root folder of the signed-in user's OneDrive.

Get Shared Item by ShareId

Tool to access a shared DriveItem or collection of shared items using a shareId or encoded sharing URL.

Get Shared Items

Tool to retrieve items shared with the authenticated user (not items the user has shared with others).

Get SharePoint List Items

Tool to get the items (list items) within a specific SharePoint list on a site.

Get Site Details

Retrieves metadata for a specific SharePoint site by its ID.

Get SharePoint Site Page Content

Gets the content of a modern SharePoint site page.

Get Drive Special Folder

Tool to retrieve a special folder in OneDrive by name.

Grant Shares Permission

Tool to grant users access to a link represented by a permission using an encoded sharing URL.

Invite User to Drive Item

Tool to invite users or grant permissions to a specific item in a OneDrive drive.

List Drive Activities

Tool to retrieve recent activities on the authenticated user's OneDrive.

List Drive Bundles

Tool to retrieve a list of bundle resources from a specified drive.

List Drives

Tool to retrieve a list of Drive resources available to the authenticated user, or for a specific user, group, or site.

List Folder Children

List the direct children (files/folders) of a OneDrive/SharePoint folder by DriveItem ID or path.

List Drive Item Activities

Tool to list recent activities for a specific item in a OneDrive drive.

List Root Drive Changes

Tool to list changes in the root of the user's primary drive using a delta token.

List Shares Permission

Tool to retrieve permission details for a shared OneDrive or SharePoint item using a share ID.

List SharePoint List Items Delta

Tool to track changes to items in a SharePoint list using a delta query.

List Site Columns

Tool to list all column definitions for a SharePoint site.

List Site Drive Items Delta

Tool to track changes to DriveItems in the default document library of a SharePoint site.

List Site Lists

Tool to list all lists under a specific SharePoint site.

List Site Subsites

Tool to list all subsites of a SharePoint site.

List Subscriptions

Tool to list the current subscriptions for the authenticated user or app.

Move Item

Tool to move a file or folder to a new parent folder in OneDrive.

Create folder

Creates a new folder in the user's OneDrive, automatically renaming on conflict, optionally within a specified parent_folder (by ID or full path from root) which, if not the root, must exist and be accessible.

Create a new text file

Creates a new plain-text file with specified content in the authenticated user's personal OneDrive, using either the folder's unique ID or its absolute path relative to the user's OneDrive root (paths are automatically resolved to IDs); note that OneDrive may rename or create a new version if the filename already exists.

Find Item

Non-recursively finds an item (file or folder) in a specified OneDrive folder; if `folder` is provided as a path, it must actually exist.

Find Folder

Finds folders by name within an accessible parent folder in OneDrive, or lists all its direct child folders if no name is specified.

List OneDrive items

Retrieves all files and folders as `driveItem` resources from the root of a specified user's OneDrive, automatically handling pagination.

Upload file

Uploads a file to a specified OneDrive folder, automatically creating the destination folder if it doesn't exist, renaming on conflict, and supporting large files via chunking.

Preview Drive Item

Generates or retrieves a short-lived, permission-bound embeddable URL for a preview of a specific item.

Restore Deleted Item

Tool to restore a deleted OneDrive driveItem (file or folder) from the recycle bin.

Search Items

Search OneDrive for files and folders by keyword.

Delete Drive Following

Tool to unfollow a driveItem by removing it from the user's followed items collection.

Update Drive Item Metadata

Tool to update the metadata of a specific item (file or folder) in OneDrive.

Update Drive Item Permissions

Tool to update the roles of an existing permission on a OneDrive drive item.

Update File Content

Tool to create an upload session for updating an existing file's content in OneDrive.

SETUP GUIDE

Connect One drive MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Install the Composio SDK and Claude Agent SDK
2

Create Tool Router Session

typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
Initialize the Composio client and create a Tool Router session
3

Connect to AI Agent

typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Download the latest project report file from OneDrive' }],
  stopWhen: stepCountIs( 5 )
});

console.log(`Agent: ${text}`);
Use the MCP server with your AI agent
SETUP GUIDE

Connect One drive API Tool with your Agent

1

Install Composio

typescript
npm install @composio/openai
Install the Composio SDK
2

Initialize Composio and Create Tool Router Session

typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
Import and initialize Composio client, then create a Tool Router session
3

Execute One drive Tools via Tool Router with Your Agent

typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Find and download the latest project proposal file from my OneDrive.'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
Get tools from Tool Router session and execute One drive actions with your Agent

Why Use Composio?

AI Native One drive Integration

  • Supports both One drive MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your One drive data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke One drive access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access One drive
  • Scoped, least privilege access to One drive resources
  • Full audit trail of agent actions to support review and compliance
FAQ

Frequently asked questions

No, you can get started immediately using Composio's built-in One drive app. For production, we recommend configuring your own OAuth credentials.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Start with One drive.It takes 30 seconds.

Managed auth, hosted MCP servers, and every One drive tool your agent needs.Free to start.

Start building