storage
Microsoft OneDrive MCP, CLI, and Lua Integration for AI Agents
Microsoft OneDrive integration docs for AI agents: MCP gateway setup, Microsoft OneDrive CLI commands, Lua API reference, credentials, and function schemas.
6 functions 5 read 1 write Bearer token auth
Microsoft OneDrive for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
one_drive- route_slug
one-drive- package
one-drive- auth_strategy
bearer_tokenBearer token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Microsoft OneDrive CLIHeadless setup and direct function calls. Microsoft OneDrive MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Microsoft OneDrive MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Microsoft OneDrive.
Claude Code Microsoft OneDrive MCP setup for Claude Code. Cursor Microsoft OneDrive MCP setup for Cursor. Codex Microsoft OneDrive MCP setup for Codex. OpenAI Agents Microsoft OneDrive MCP setup for OpenAI Agents SDK. Claude Agent SDK Microsoft OneDrive MCP setup for Claude Agent SDK. Vercel AI SDK Microsoft OneDrive MCP setup for Vercel AI SDK. LangChain Microsoft OneDrive MCP setup for LangChain. LangGraph Microsoft OneDrive MCP setup for LangGraph. CrewAI Microsoft OneDrive MCP setup for CrewAI. MCP clients Microsoft OneDrive MCP setup for Generic MCP Clients.
Microsoft OneDrive CLI Matrix
Use these pages for direct Microsoft OneDrive CLI workflows in scripts, CI, cron, and agent wrappers.
CI Microsoft OneDrive CLI for CI. Cron Jobs Microsoft OneDrive CLI for cron jobs. Shell Scripts Microsoft OneDrive CLI for shell scripts. Headless Automation Microsoft OneDrive CLI for headless automation. Coding Agents Microsoft OneDrive CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
one_drive.onedrive_list_files | Read read | 2 | List files and folders in the root of the user's OneDrive. Returns item names, IDs, sizes, and metadata. Use the item ID with onedrive_get_file or onedrive_download_file for details or content. |
one_drive.onedrive_get_file | Read read | 1 | Get detailed metadata for a specific file or folder in OneDrive by its item ID. Returns name, size, dates, MIME type, and download URL. |
one_drive.onedrive_upload_file | Write write | 3 | Upload a file to OneDrive. Specify the destination path and file content. Creates the file if it does not exist, or replaces it if it does. Supports files up to 4 MB via the simple upload API. |
one_drive.onedrive_download_file | Read read | 1 | Download a file's content from OneDrive by its drive item ID. Returns the raw file content. Use onedrive_list_files or onedrive_get_file to find the item ID. |
one_drive.onedrive_list_shared | Read read | 2 | List files and folders that have been shared with the current user. Returns item names, IDs, sizes, and metadata for shared content. |
one_drive.onedrive_get_current_user | Read read | 0 | Get the profile of the currently authenticated Microsoft user. Returns display name, email, job title, and other profile details. |