# Microsoft OneDrive AI Agent Connect

> Microsoft OneDrive MCP gives your AI agent direct access to your cloud files. It uses the Microsoft Graph API to let your agent navigate folders, find specific documents via keyword search, upload new files, and generate secure share links. Whether you use personal OneDrive or OneDrive for Business, your agent can now manage your files just like you do.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_iwdzKB2IPdRVCo41vIHLzaviujHLxb2VVqodbzop/ai-agent-connect
- **Tags:** cloud-files, file-sharing, onedrive, microsoft-365, drive-organization

## Description

You can now give your AI agent a working file cabinet. Instead of manually uploading documents to a chat, you can point your agent at your OneDrive drive and let it do the heavy lifting. It can walk through your folder structures, pull metadata like file size or last modified dates, and find exactly what you need using keyword searches. If you need to organize a project, your agent can build out folder structures and drop new files into them using base64 content. It can even handle the social side of file management by creating read-only or resolve permissions for others. This turns your AI client from a simple text generator into a capable operator that can manage your digital workspace.

## Tools

### create_folder
This tool builds new directories in your OneDrive. It's useful for setting up project structures before you upload files.

### download_file
This tool grabs a direct download link for a specific file. If a file is protected or too large, the agent will report the error instead of retrying.

### get_file
This tool retrieves metadata for a specific file or folder. Use it to check things like file size or the last time someone modified a document.

### list_files
This tool lets your agent browse the contents of a OneDrive directory. It returns files and folders one page at a time.

### recent_files
This tool pulls a list of your most recently active items. It's the fastest way to find what you were just working on.

### search_files
This tool searches your entire OneDrive drive using keywords. It looks through both file names and the actual content of the files.

### share_file
This tool creates shareable links for files or folders. You can set permissions to read-only or use resolve permissions for OneDrive users.

### upload_file
This tool sends file data from your agent to a specific path in OneDrive. It works with files up to about 100 MB.

## Prompt Examples

**Prompt:** 
```
What files did I touch this week? Give me the five most recently modified documents.
```

**Response:** 
```
Here are your five most recent: Q3-Forecast.xlsx (Mon 18:42), Client-Redline.docx (Mon 09:10), deck-v7.pptx (Sun 21:03), invoices-08.csv (Fri 16:20), notes.txt (Fri 11:05). Want me to open or share any of them?
```

**Prompt:** 
```
Create a 'Client Acme / 2026' folder structure and upload the contract PDF I just generated.
```

**Response:** 
```
Folders 'Client Acme' and 'Client Acme/2026' are in place, and Acme-Contract-v2.pdf (412 KB) is now in that folder. I can drop a read-only share link in the thread if you want.
```

**Prompt:** 
```
Find every file that mentions 'renewal' in its name and share a read link with our account manager.
```

**Response:** 
```
Three matches: Renewal-Plan-2026.xlsx, client-renewal-notes.docx, and renewal-emails-export.csv. Share links created (read role) — links added to this thread. Note: the CSV is 1.2 MB, fine for a link, but I would not inline it.
```

## Capabilities

### File Navigation
Your agent walks through folder hierarchies to find specific files.

### Content Discovery
The agent searches through file names and text content to locate documents.

### Automated Organization
Your agent creates new folder structures to keep files organized.

### Secure Distribution
The agent generates shareable links with specific permissions for your team.

### Data Ingestion
Your agent uploads files directly to your cloud drive from the chat interface.

## Use Cases

### Project Setup
Tell your agent to create a specific folder structure for a new client and prepare it for incoming files.

### Document Retrieval
Ask your agent to find a specific contract or report using only a keyword or a description of what it contains.

### Deliverable Handoff
Have your agent upload a generated document and immediately create a read-only link to send to a stakeholder.

### Activity Auditing
Quickly identify what you were working on by asking for a list of your most recently modified files.

## Benefits

- Eliminates manual file uploads by letting the agent write directly to your drive.
- Reduces search time by allowing natural language queries against your entire file history.
- Simplifies file sharing by generating permission-controlled links within the chat.
- Automates folder management to keep your cloud storage organized without manual clicks.

## How It Works

Connecting your OneDrive to your AI client is a straightforward process managed by Vinkius.

1. Register an Entra application with the necessary Microsoft Graph permissions.
2. Subscribe to the Microsoft OneDrive MCP on Vinkius.
3. Connect your OneDrive account via the OAuth 2.0 prompt.
4. Point your AI client at your drive to start managing files.

## Frequently Asked Questions

**Can I use this with a personal OneDrive account?**
Yes, this MCP works with both personal OneDrive accounts and OneDrive for Business.

**How large can the files be when uploading through the agent?**
The upload tool is designed for files under approximately 100 MB.

**Does the agent have full control over my files?**
The agent uses the permissions you grant during the OAuth setup, allowing it to read, write, and manage files as requested.

**Can the agent search inside the content of my documents?**
Yes, the search tool matches queries against both the file names and the actual content within the files.

**What happens if I try to create a folder that already exists?**
The tool treats an 'item-already-exists' error as a success and continues with the operation.

**Does it work with both personal OneDrive and OneDrive for Business?**
Yes. The Graph /me/drive resource resolves to whichever drive belongs to the connected account — personal Microsoft accounts and work or school (Business) tenants both work through the same OAuth flow.

**Can the agent read the actual contents of a document?**
It retrieves metadata and a short-lived direct download URL. For text analysis, hand that URL to a document-parsing tool or download step in your pipeline — the drive server itself does not proxy file bytes.

**What happens if I share a file with anonymous links blocked in my tenant?**
The permission call fails with a tenant policy error and the tool surfaces it verbatim. Try the resolve role or have an admin adjust the external sharing policy; the agent will not loop on retries.
