Skip to main content

Announcing StackOne Defender: leading open-source prompt injection guard for your agent Read More

Microsoft OneDrive MCP Server
for AI Agents

Production-ready Microsoft OneDrive MCP server with 46 extensible actions — plus built-in authentication, security, and optimized execution.

Microsoft OneDrive logo
Microsoft OneDrive MCP Server
Built by StackOne StackOne

Coverage

46 Agent Actions

Create, read, update, and delete across Microsoft OneDrive — and extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your Microsoft OneDrive MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every Microsoft OneDrive tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every Microsoft OneDrive call.

Tools Discovery →

What is the Microsoft OneDrive MCP Server?

A Microsoft OneDrive MCP server lets AI agents read and write Microsoft OneDrive data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's Microsoft OneDrive MCP server ships with 46 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, and optimized agent context. Connect it from MCP clients like Claude Desktop, Cursor, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All Microsoft OneDrive MCP Tools and Actions

Every action from Microsoft OneDrive's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.

Unified Files

  • Upload Unified File

    Upload a new file to Microsoft OneDrive using the StackOne unified upload schema

  • List Unified Files

    List unified files in Microsoft OneDrive with StackOne unified filters

  • Get Unified File

    Get a unified file by ID from Microsoft OneDrive with metadata mapped to the StackOne unified schema

  • Download Unified File

    Download the content of a unified file from Microsoft OneDrive

Unified Folders

  • List Unified Folders

    List unified folders from the root of the authenticated user's OneDrive

  • Get Unified Folder

    Get a unified folder by ID from Microsoft OneDrive

Unified Drives

  • List Unified Drives

    List unified drives available to the authenticated user in Microsoft OneDrive

  • Get Unified Drive

    Get a unified drive by ID from Microsoft OneDrive

Drive Items

  • Copy Drive Item

    Create a copy of a driveItem including any children

  • Search Drive Items

    Search for items in a drive

  • Search Drive Items

    Search for items in a drive

  • Get Drive Item

    Retrieve metadata for a driveItem in a drive

  • Download Drive Item

    Download the contents of a driveItem

  • Update Drive Item

    Update the properties of a driveItem

  • Move Drive Item

    Move a driveItem to a new parent item

  • Delete Drive Item

    Delete a driveItem

Item Versions

  • List Item Versions

    Retrieve the versions of a file

  • Get Item Version

    Retrieve metadata for a specific version of a driveItem

  • Download Item Version

    Download the contents of a specific version

Item Permissions

  • List Item Permissions

    List permissions on a driveItem

  • Get Item Permission

    Get a specific permission on a driveItem

  • Update Item Permission

    Update a permission on a driveItem

  • Delete Item Permission

    Remove a permission from a driveItem

Users

  • Create User

    Create a new user account in the organization with the specified properties

  • List Users

    Retrieve a list of user objects. By default, returns a limited set of properties (businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, userPrincipalName). Use $select to specify alternative properties.

  • Get User

    Retrieve the properties and relationships of a specific user by their ID or userPrincipalName. By default, only a limited set of properties are returned (businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, userPrincipalName). Use the select parameter to return an alternative property set.

Other (20)

  • Create Folder

    Create a new folder in a drive

  • Upload File To Drive

    Upload a new file to a drive location

  • Create Sharing Link

    Create a sharing link for a driveItem

  • Send Sharing Invitation

    Send a sharing invitation to users

  • List Current User's Drives

    Retrieve the list of drive resources available for the authenticated user

  • List User's Drives

    Retrieve the list of drive resources available for a specific user

  • Get Drive

    Get metadata about a specific drive

  • Get Default Drive

    Get the user's default OneDrive

  • Get Drive Root Folder

    Get the root folder of a drive

  • List Drive Root Children

    List children of the root folder of a drive

  • List Followed Items

    List items the user is following

  • Get Special Folder

    Access a special folder by its canonical name

  • List Drive Item Children

    List children of a driveItem

  • Get Drive Item By Path

    Retrieve a driveItem by file system path

  • Get Drive Item Thumbnails

    List thumbnails for a driveItem

  • Follow Drive Item

    Follow a driveItem

  • Unfollow Drive Item

    Unfollow a driveItem

  • Restore Drive Item

    Restore a deleted driveItem from the recycle bin

  • Check In Drive Item

    Check in a checked out driveItem

  • Check Out Drive Item

    Check out a driveItem

Set Up Your Microsoft OneDrive MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to Microsoft OneDrive in under 10 lines of code.

MCP Clients

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

More Cloud Storage MCP Servers

Microsoft OneDrive MCP Server FAQ

Microsoft OneDrive MCP server vs direct API integration — what's the difference?
A Microsoft OneDrive MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling Microsoft OneDrive. A Microsoft OneDrive MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling Microsoft OneDrive at runtime. StackOne provides both.
How does Microsoft OneDrive authentication work for AI agents?
Microsoft OneDrive authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own Microsoft OneDrive account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are Microsoft OneDrive MCP tools vulnerable to prompt injection?
Yes — Microsoft OneDrive MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a Microsoft OneDrive agent and how do I avoid it?
Context bloat happens when Microsoft OneDrive tool schemas and API responses eat your Microsoft OneDrive agent's memory, preventing it from reasoning effectively. A single Microsoft OneDrive query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my Microsoft OneDrive agent can access?
Yes — you can limit which actions your Microsoft OneDrive agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my Microsoft OneDrive MCP server?
Yes — you can create custom agent actions for your Microsoft OneDrive MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research Microsoft OneDrive's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a Microsoft OneDrive MCP server?
Skip a Microsoft OneDrive MCP server if your integration is purely software-to-software — direct Microsoft OneDrive API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call Microsoft OneDrive actions at runtime.
What AI frameworks and AI clients does the StackOne Microsoft OneDrive MCP server support?
The StackOne Microsoft OneDrive MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.