onedrive-cli MCP

A command-line client for personal OneDrive. Its mcp command gives an agent read-only access to the files on the drive.

  • 179 ★ on the repository
  • Last commit
  • MIT
MCP server

Extended access

Why this level

  • The token opens the personal drive, and the console commands `rm`, `mv`, `cp` and `chmod` change files and permissions. Give the agent a read-only token: `onedrive login -r`.
  • The token is stored in `~/.onedrive-cli-token` without encryption.
All reasons and checks

lionello/onedrive-cli

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/onedrive-cli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The token opens the personal drive, and the console commands `rm`, `mv`, `cp` and `chmod` change files and permissions. Give the agent a read-only token: `onedrive login -r`.
  • The token is stored in `~/.onedrive-cli-token` without encryption.

This is third-party code. Review the repository files before installing.

What it does

onedrive-cli manages personal OneDrive from the terminal like a filesystem: `ls`, `cat`, `cp`, `mv`, `rm`, `mkdir`, `find`, full-text `grep`, server-side `wget` from a URL, photo albums and sharing permissions. It installs as `onedrive` with an `onedrive-cli` alias. The `onedrive mcp` command starts a read-only MCP server over stdio. An agent gets seven tools: folder listing, full-text search, glob search by name, album listing, reading a file as text, item metadata and storage quota. The server sends only GET requests and changes nothing on the drive.

Who it is for. Personal OneDrive owners who want Claude to search and read documents on the drive, and admins automating file transfers with scripts.

Good fit when

  • Claude must find a contract in personal OneDrive by a phrase inside its text.
  • Notes from the drive must be read and summarized without opening a browser.
  • A large file by URL is uploaded to OneDrive without passing through the local machine, using `onedrive wget`.
  • A photo folder is moved by script and an album is built with `album create` and `album add`.
  • File sharing permissions are changed in bulk with `chmod`.

Not a fit when

  • Work OneDrive for Business and SharePoint: the client targets personal OneDrive and Microsoft Graph support is on the author roadmap.
  • Files larger than 100 MiB: that upload is still on the author task list.
  • Whole folders in one command: `cp` copies files and wildcards but not directories.

Example request

Search my OneDrive for documents mentioning the rental agreement and read the most recent one.

MCP

Transport
stdio
Authentication
OAuth

Limitations

The client targets personal OneDrive and a Business version is still planned. The token lasts one hour, after which `onedrive login` must run again, and it is stored in `~/.onedrive-cli-token` or under `$XDG_STATE_HOME`. A copy fails if a file with the same name already exists in the target folder, and `cp` does not copy whole folders. `chmod` understands only `-w` and `-rw`, granting write access is not supported yet. Uploads over 100 MiB are on the task list too. An album cannot be deleted through the API, only in the web interface.

How to disable. Remove the `onedrive` entry from the MCP client configuration and run `npm uninstall -g @lionello/onedrive-cli`. The token lives in `~/.onedrive-cli-token`: delete the file and revoke the app access in Microsoft account settings.

FAQ

How do I connect OneDrive to Claude through MCP?

Install the package, run `onedrive login -r` and add a server with `"command": "onedrive"` and `"args": ["mcp"]` to the client configuration. The `-r` flag issues a read-only token.

Can the MCP server change or delete files?

No. The server sends only GET requests. Other commands of the console client (`cp`, `mv`, `rm`) change the drive if the token was issued without `-r`.

What if the "Access token was not found" error appears?

Run `onedrive login`. The command opens the Microsoft sign-in page and stores the token. It lasts one hour, then sign in again.

Does the client work with OneDrive for Business?

No, only personal OneDrive is supported. Business support through Microsoft Graph is on the author's task list.

How do I upload a file to OneDrive from a URL?

Run `onedrive wget <url> <drive path>`. OneDrive fetches the file server-side, so it never passes through the local machine.

Discussion

No questions or reviews yet.

An MCP server that gives the agent access to mail, calendar, OneDrive files and Power Automate flows through Microsoft Graph

MCP serverBroad access455Repository stars

An MCP server that turns a plain request into CLI for Microsoft 365 command chains: SharePoint, Teams, Planner, Power Platform.

MCP serverBroad access135Repository stars
Russian stack

Yandex Disk MCP server: folders, metadata, copy, move, delete and upload or download links

MCP serverBroad access4Repository stars
Russian stack

A small read-focused MCP server for Yandex Disk: folder listings, file search, download links and public links

MCP serverExtended access

Yandex Disk MCP (Antiloop)

Yandex Disk MCP Server

Russian stack

Yandex Disk MCP server: files and folders, public links, upload from URL, trash and search, with Docker support

MCP serverBroad access5Repository stars
Russian stack

A small Python MCP server for Yandex Disk: browse, upload, download and create files, but never modify existing ones

MCP serverExtended access

README in short

Installation goes through npm or nix and sign-in happens once. Then come the command list, examples with `find` and `xargs` pipelines and an MCP server section. The end holds answers to common errors and the author task list linked to issues.

README badge

Report a problem