# How to connect One drive MCP with VS Code

```json
{
  "title": "How to connect One drive MCP with VS Code",
  "toolkit": "One drive",
  "toolkit_slug": "one_drive",
  "framework": "VS Code",
  "framework_slug": "vscode",
  "url": "https://composio.dev/toolkits/one_drive/framework/vscode",
  "markdown_url": "https://composio.dev/toolkits/one_drive/framework/vscode.md",
  "updated_at": "2026-05-06T08:21:55.789Z"
}
```

## Introduction

### How to connect One drive MCP with VS Code
VS Code is the most popular code editor out there. With its recent AI makeover, it can do more than just help you write code. You can connect your applications to it and let LLMs automate many of the mundane tasks in your workflow.
In this guide, I will explain how to connect One drive with VS Code in the most secure and robust way possible via Composio.

## Also integrate One drive with

- [ChatGPT](https://composio.dev/toolkits/one_drive/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/one_drive/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/one_drive/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/one_drive/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/one_drive/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/one_drive/framework/codex)
- [Cursor](https://composio.dev/toolkits/one_drive/framework/cursor)
- [OpenCode](https://composio.dev/toolkits/one_drive/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/one_drive/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/one_drive/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/one_drive/framework/cli)
- [Google ADK](https://composio.dev/toolkits/one_drive/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/one_drive/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/one_drive/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/one_drive/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/one_drive/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/one_drive/framework/crew-ai)

## TL;DR

### Why use Composio?
Composio provides:
- Access to 1,000+ managed apps from a single MCP endpoint. This makes it convenient for agents to run cross-app workflows.
- 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.
- Large tool response handling outside the LLM context. This minimizes context bloat from large tool responses.
- Dynamic just-in-time access to thousands of tools across hundreds of apps. Composio loads the tools your agent needs, so LLMs are not overwhelmed by tools they do not need.

## Connect One drive to VS Code

### Integrate One drive MCP with VS Code
### 1. Install with one click
Click the button below to add Composio to VS Code. You will be prompted to authorize. This requires VS Code 1.99+ with GitHub Copilot.
[+Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22composio%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fconnect.composio.dev%2Fmcp%22%7D)
### 2. Or add manually
Open or create .vscode/mcp.json in your project root and add the following configuration:

```bash
{
  "servers": {
    "composio": {
      "type": "http",
      "url": "https://connect.composio.dev/mcp"
    }
  }
}
```

## What is the One drive MCP server, and what's possible with it?

The One drive MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your OneDrive account. It provides structured and secure access to your cloud files and folders, so your agent can perform actions like uploading documents, sharing files, managing storage, and retrieving version histories on your behalf.
- File and folder management: Effortlessly copy, move, or delete files and folders, keeping your OneDrive organized with just a prompt.
- Easy sharing and collaboration: Instantly generate secure sharing links for documents or folders, making collaboration with others seamless.
- File download and preview: Have your agent fetch files or retrieve visual thumbnails for quick previews and streamlined access.
- Access control and permissions review: Check who can view or edit any file or folder, and manage sharing permissions without manual clicks.
- Version tracking and quota monitoring: Retrieve version histories for files and monitor your storage quota to stay on top of changes and space usage.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `ONE_DRIVE_COPY_ITEM` | Copy Item | Tool to copy a driveitem (file or folder) to a new location asynchronously. use when you need to duplicate an item, optionally renaming it or specifying a different parent folder. the operation is asynchronous; the response provides a url to monitor the copy progress. |
| `ONE_DRIVE_CREATE_LINK` | Create Sharing Link | Tool to create a sharing link for a driveitem (file or folder) by its unique id. use when you need to generate a shareable link for an item in onedrive or sharepoint. |
| `ONE_DRIVE_DELETE_ITEM` | Delete Item | Tool to delete a driveitem (file or folder) by its unique id from the authenticated user's onedrive. use when you need to remove an item from onedrive. this action moves the item to the recycle bin, not permanently deleting it. |
| `ONE_DRIVE_DOWNLOAD_FILE` | 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. |
| `ONE_DRIVE_GET_DRIVE` | Get Drive | Retrieves the properties and relationships of a drive resource by its unique id. use this action when you need to get details about a specific onedrive, user's onedrive, group's document library, or a site's document library. |
| `ONE_DRIVE_GET_ITEM` | Get Item Metadata | Retrieves the metadata of a driveitem by its unique id. use this tool to get information about a specific file or folder in onedrive when you have its id. if a `drive id` is not provided, it defaults to the user's main drive. |
| `ONE_DRIVE_GET_ITEM_PERMISSIONS` | Get Item Permissions | Retrieves the permissions of a driveitem by its unique id or path within a specific drive. use when you need to check who has access to a file or folder and what level of access they have. |
| `ONE_DRIVE_GET_ITEM_THUMBNAILS` | Get Item Thumbnails | Tool to retrieve the thumbnails associated with a driveitem. use when you need to display visual previews of files. |
| `ONE_DRIVE_GET_ITEM_VERSIONS` | Get Item Versions | Tool to retrieve the version history of a driveitem by its unique id. use when you need to access or list previous versions of a file. |
| `ONE_DRIVE_GET_QUOTA` | Get Drive Quota | Tool to retrieve the quota information for the authenticated user's onedrive. use this action to check the storage space details like total, used, and remaining space on the user's onedrive. |
| `ONE_DRIVE_GET_RECENT_ITEMS` | Get Recent Items | Retrieves a list of items that have been recently used by the authenticated user. this tool is useful when you need to access or display files and folders that the user has interacted with recently across their onedrive and accessible shared drives. |
| `ONE_DRIVE_GET_SHARED_ITEMS` | Get Shared Items | Tool to retrieve a list of items that have been shared with the authenticated user. use this action to get details of files and folders shared with the current user. |
| `ONE_DRIVE_GET_SHAREPOINT_LIST_ITEMS` | Get SharePoint List Items | Tool to get the items (list items) within a specific sharepoint list on a site. use when you need to retrieve data from a sharepoint list. |
| `ONE_DRIVE_GET_SITE_DETAILS` | Get Site Details | Retrieves metadata for a specific sharepoint site by its id. use this action when you need to get details like display name, web url, and creation/modification dates for a known sharepoint site. |
| `ONE_DRIVE_GET_SITE_PAGE_CONTENT` | Get SharePoint Site Page Content | Gets the content of a modern sharepoint site page. use when you need to retrieve the details and content of a specific page within a sharepoint site. |
| `ONE_DRIVE_INVITE_USER_TO_DRIVE_ITEM` | Invite User to Drive Item | Tool to invite users or grant permissions to a specific item in a onedrive drive. use when you need to share a file or folder with other users and define their access level (e.g., read or write). |
| `ONE_DRIVE_LIST_DRIVE_ITEM_ACTIVITIES` | List Drive Item Activities | Tool to list recent activities for a specific item in a onedrive drive. use when you need to track changes or actions performed on a file or folder. |
| `ONE_DRIVE_LIST_DRIVES` | List Drives | Tool to retrieve a list of drive resources available to the authenticated user, or for a specific user, group, or site. use when you need to find out what drives are accessible. |
| `ONE_DRIVE_LIST_ROOT_DRIVE_CHANGES` | List Root Drive Changes | Tool to list changes in the root of the user's primary drive using a delta token. use when you need to track file and folder modifications, additions, or deletions in the main onedrive directory. |
| `ONE_DRIVE_LIST_SHAREPOINT_LIST_ITEMS_DELTA` | List SharePoint List Items Delta | Tool to track changes to items in a sharepoint list using a delta query. use when you need to get newly created, updated, or deleted list items without performing a full read of the entire item collection. |
| `ONE_DRIVE_LIST_SITE_COLUMNS` | List Site Columns | Tool to list all column definitions for a sharepoint site. use this when you need to retrieve the schema or structure of columns within a specific sharepoint site. |
| `ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA` | List Site Drive Items Delta | Tool to track changes to driveitems in the default document library of a sharepoint site. use when you need to get a list of items that have been added, modified, or deleted since a previous state or to get an initial enumeration of all items. |
| `ONE_DRIVE_LIST_SITE_LISTS` | List Site Lists | Tool to list all lists under a specific sharepoint site. use when you need to enumerate lists within a known site. |
| `ONE_DRIVE_LIST_SITE_SUBSITES` | List Site Subsites | Tool to list all subsites of a sharepoint site. use when you need to retrieve a collection of subsites for a given parent site. |
| `ONE_DRIVE_LIST_SUBSCRIPTIONS` | List Subscriptions | Tool to list the current subscriptions for the authenticated user or app. use this to retrieve details of existing webhook subscriptions. |
| `ONE_DRIVE_MOVE_ITEM` | Move Item | Tool to move a file or folder to a new parent folder in onedrive. use when you need to reorganize your files or folders by changing their location. you can optionally rename the item during the move. |
| `ONE_DRIVE_ONEDRIVE_CREATE_FOLDER` | 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. |
| `ONE_DRIVE_ONEDRIVE_CREATE_TEXT_FILE` | Create a new text file | Creates a new text file with specified content in a onedrive folder, using either the folder's unique id or its absolute path (paths are automatically resolved to ids); note that onedrive may rename or create a new version if the filename already exists. |
| `ONE_DRIVE_ONEDRIVE_FIND_FILE` | 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. |
| `ONE_DRIVE_ONEDRIVE_FIND_FOLDER` | 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. |
| `ONE_DRIVE_ONEDRIVE_LIST_ITEMS` | List OneDrive items | Retrieves all files and folders as `driveitem` resources from the root of a specified user's onedrive, automatically handling pagination. |
| `ONE_DRIVE_ONEDRIVE_UPLOAD_FILE` | Upload file | Uploads a file to a specified onedrive folder, automatically renaming on conflict and supporting large files via chunking. |
| `ONE_DRIVE_PREVIEW_DRIVE_ITEM` | Preview Drive Item | Generates or retrieves a short-lived embeddable url for a preview of a specific item. use when you need to display a temporary preview of a file. |
| `ONE_DRIVE_SEARCH_ITEMS` | Search Items | Searches for driveitems in onedrive that match the specified query. use this to find files or folders based on keywords. |
| `ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA` | Update Drive Item Metadata | Tool to update the metadata of a specific item (file or folder) in onedrive. use this to rename items, change descriptions, or move items to a new parent folder. |

## Supported Triggers

| Trigger slug | Name | Description |
|---|---|---|
| `ONE_DRIVE_BASE_TRIGGER` | Onedrivebasetrigger | Base trigger for OneDrive changes using Gmail-style state management. Subclasses override `filter_changes(...)` to extract only the relevant items. |
| `ONE_DRIVE_FILE_CREATED_TRIGGER` | OneDrive File Created Trigger | Triggers when a new file is created in OneDrive. Uses Gmail-style state management for reliable duplicate prevention. |
| `ONE_DRIVE_FILE_UPDATED` | File Updated | Trigger that fires when a OneDrive file's content or metadata changes. Returns file ID, last modified time, and modifier info. |
| `ONE_DRIVE_FOLDER_CREATED_TRIGGER` | OneDrive Folder Created Trigger | Triggers when a new folder is created in OneDrive. Uses Gmail-style state management for reliable duplicate prevention. |
| `ONE_DRIVE_ITEM_DELETED_TRIGGER` | OneDrive Item Deleted Trigger | Triggers when a file or folder is deleted in OneDrive. Uses Gmail-style state management for reliable duplicate prevention. |
| `ONE_DRIVE_ITEM_MOVED_OR_RENAMED_TRIGGER` | Item Moved or Renamed | Triggers when a file or folder is moved to a different path or renamed in OneDrive. Includes both old and new path/name data in the payload. |
| `ONE_DRIVE_ITEM_UPDATED_TRIGGER` | OneDrive Item Updated Trigger | Triggers when an existing file or folder is modified in OneDrive. Uses Gmail-style state management and only detects actual modifications, not new creations. |
| `ONE_DRIVE_NEW_VERSION_CREATED_TRIGGER` | New Version Created | Trigger that fires when a new version of a specified OneDrive file is created. |
| `ONE_DRIVE_SHARING_PERMISSION_CHANGED_TRIGGER` | Sharing Permission Added or Removed | Sharing Permission Added or Removed |

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, VS Code can access the One drive MCP server via Composio to run the app actions you authorize, directly from your coding workflow.

## Complete Code

None listed.

## Conclusion

### Way Forward
Now that One drive is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.
- Connect Calendar to turn threads into scheduled meetings automatically.
- Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
- Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
- Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.
- Connect HubSpot or Salesforce to log customer context, update records, and draft follow-ups.
Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

## How to build One drive MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/one_drive/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/one_drive/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/one_drive/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/one_drive/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/one_drive/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/one_drive/framework/codex)
- [Cursor](https://composio.dev/toolkits/one_drive/framework/cursor)
- [OpenCode](https://composio.dev/toolkits/one_drive/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/one_drive/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/one_drive/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/one_drive/framework/cli)
- [Google ADK](https://composio.dev/toolkits/one_drive/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/one_drive/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/one_drive/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/one_drive/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/one_drive/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/one_drive/framework/crew-ai)

## Related Toolkits

- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Google Docs](https://composio.dev/toolkits/googledocs) - Google Docs is a cloud-based word processor that enables document creation and real-time collaboration. Its seamless sharing and version history make team editing and content management a breeze.
- [Google Super](https://composio.dev/toolkits/googlesuper) - Google Super is an all-in-one suite combining Gmail, Drive, Calendar, Sheets, Analytics, and more. It gives you a unified platform to manage your digital life, boosting productivity and organization.
- [Affinda](https://composio.dev/toolkits/affinda) - Affinda is an AI-powered document processing platform that automates data extraction from resumes, invoices, and more. It streamlines document-heavy workflows by turning files into structured, actionable data.
- [Agility cms](https://composio.dev/toolkits/agility_cms) - Agility CMS is a headless content management system for building and managing digital experiences across platforms. It lets teams update content quickly and deliver omnichannel experiences with ease.
- [Algodocs](https://composio.dev/toolkits/algodocs) - Algodocs is an AI-powered platform that automates data extraction from business documents. It delivers fast, secure, and accurate processing without templates or manual training.
- [Api2pdf](https://composio.dev/toolkits/api2pdf) - Api2Pdf is a REST API for generating PDFs from HTML, URLs, and documents using powerful engines like wkhtmltopdf and Headless Chrome. It streamlines document conversion and automation for developers and businesses.
- [Aryn](https://composio.dev/toolkits/aryn) - Aryn is an AI-powered platform for parsing, extracting, and analyzing data from unstructured documents. Use it to automate document processing and unlock actionable insights from your files.
- [Boldsign](https://composio.dev/toolkits/boldsign) - Boldsign is a digital eSignature platform for sending, signing, and tracking documents online. Organizations use it to automate agreements and manage legally binding workflows efficiently.
- [Boloforms](https://composio.dev/toolkits/boloforms) - BoloForms is an eSignature platform built for small businesses, offering unlimited signatures, templates, and forms. It simplifies digital document signing and team collaboration at a predictable, fixed price.
- [Box](https://composio.dev/toolkits/box) - Box is a cloud content management and file sharing platform for businesses. It helps teams securely store, organize, and collaborate on files from anywhere.
- [Carbone](https://composio.dev/toolkits/carbone) - Carbone is a blazing-fast report generator that turns JSON data into PDFs, Word docs, spreadsheets, and more using flexible templates. It lets you automate document creation at scale with minimal code.
- [Castingwords](https://composio.dev/toolkits/castingwords) - CastingWords is a transcription service specializing in human-powered, accurate transcripts via a simple API. Get seamless audio-to-text conversion for interviews, meetings, podcasts, and more.
- [Cloudconvert](https://composio.dev/toolkits/cloudconvert) - CloudConvert is a powerful file conversion service supporting over 200 file formats. It streamlines converting, compressing, and managing documents, media, and more, all in one place.
- [Cloudlayer](https://composio.dev/toolkits/cloudlayer) - Cloudlayer is a document and asset generation service for creating PDFs and images via API or SDKs. It lets you automate high-quality doc creation, saving dev time and reducing manual work.
- [Cloudpress](https://composio.dev/toolkits/cloudpress) - Cloudpress is a content export tool for Google Docs and Notion. It automates publishing to your favorite Content Management Systems.
- [Contentful graphql](https://composio.dev/toolkits/contentful_graphql) - Contentful graphql is a content delivery API that lets you access Contentful data using GraphQL queries. It gives you efficient, flexible ways to fetch and manage structured content for any digital project.
- [Conversion tools](https://composio.dev/toolkits/conversion_tools) - Conversion Tools is an online service for converting documents between formats such as PDF, Word, Excel, XML, and CSV. It lets you automate complex document workflows with just a few clicks.
- [Convertapi](https://composio.dev/toolkits/convertapi) - ConvertAPI is a robust file conversion service for documents, images, and spreadsheets. It streamlines programmatic format changes and lets developers automate complex workflows with a single API.
- [Craftmypdf](https://composio.dev/toolkits/craftmypdf) - CraftMyPDF is a web-based service for designing and generating PDFs with templates and live data. It streamlines document creation by automating personalized PDFs at scale.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and One drive MCP?

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

### Can I use Tool Router MCP with VS Code?

Yes, you can. VS 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 One drive tools.

### Can I manage the permissions and scopes for One drive while using Tool Router?

Yes, absolutely. You can configure which One drive 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 One drive data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
