← Back to directory
O

OneDrive CLI

Community
Command line interface and read-only MCP server for OneDrive
Category
Cloud Storage #9 of 15
Stars
★ 174 Very popular
Transport
stdio (local process)
Runtime
Node.js · Prebuilt binary
Credentials
API key / credential required
License
MIT
Last commit
Tools
7
56FMRS · C

onedrive-cli offers a cross-platform CLI for OneDrive Personal and a read-only MCP server, suitable for AI access to cloud files. It does not support OneDrive for Business, and it's a community project, not official. Users should handle tokens securely and prefer read-only tokens to reduce risk.

Strongest · Documentation 13/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
12/20
Maintenance
12/20
Documentation
13/20
Setup experience
11/20
Why each score
Reliability 8/20
Repository includes src directory and tests, but no CI workflow file or explicit test commands are present, making it uncertain whether the MCP handshake and tool behaviors are reproducible. Tools are declared read-only, but the unimplemented 'rm' may cause inconsistency between tool list and actual behavior.
Security and permissions 12/20
Token is stored in ~/.onedrive-cli-token without encryption, but the default read-only token (login -r) reduces risk. MCP server issues only GET requests and is explicitly read-only. However, no security policy or vulnerability reporting channel is provided, and token handling relies on user actions.
Maintenance 12/20
Project has MIT license, ongoing commits (inferred from stars and recent activity, but no specific dates). README has TODO and DONE lists showing active development. However, no release tags or dependency update logs are evident.
Documentation 13/20
README provides installation, usage, MCP configuration examples, and FAQ, but lacks detailed MCP tool parameters and error handling. No dedicated security or troubleshooting documentation.
Setup experience 11/20
Provides npm, nix, and source installation options, with clear MCP config example, but requires manual OAuth token acquisition and saving, involving multiple steps. No CI or test evidence to confirm setup reliability across platforms.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the network

Best for

  • Users who need AI access to personal OneDrive files
  • CLI enthusiasts
  • Scenarios requiring strictly read-only access

Not for

  • Write or modify scenarios
  • OneDrive for Business (not supported)
  • Enterprise-managed environments

Required permissions

  • Requires OAuth access token (read-only recommended)
  • Reads file contents, metadata, storage quota
  • Does not modify or delete any files

Risks and side effects

  • Token may be exposed, protect token file (~/.onedrive-cli-token)
  • MCP server only GET, but underlying token might have extra permissions; use read-only token
  • Upload not implemented, but other CLI commands can write; use read-only login for safety.

Setup

Before you start

Runtime:Node.js · Prebuilt binary

  1. Login to OneDrive: run onedrive login and follow the OAuth flow (recommend login -r for read-only token).
  2. Add the server configuration to your MCP client (e.g., Claude Desktop) via claude_desktop_config.json with mcpServers.
  3. The client will launch onedrive mcp automatically.
claude_desktop_config.json
{
  "mcpServers": {
    "onedrive": {
      "command": "onedrive",
      "args": [
        "mcp"
      ]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "onedrive": {
      "command": "onedrive",
      "args": [
        "mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add onedrive -- onedrive mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Run onedrive login first to store an access token, then register the server in your MCP client config. Once connected, the client's tool list should show list_onedrive_folder, search_onedrive_content, and the other 5 tools; asking the AI to list a folder confirms the connection works.

Troubleshooting

  1. Error 'Access token was not found; login first.': run `onedrive login` and complete OAuth.
  2. Token expires after 1 hour, re-login if needed.
  3. If MCP client fails to connect, ensure `onedrive` is in PATH and login was done.
  4. Verify JSON config file is valid.

Things to try

Once connected, you can ask your AI assistant things like:

  • List the contents of my OneDrive Public folder
  • Search my entire OneDrive for files containing a keyword
  • Read the contents of a text file in my OneDrive
  • Show my OneDrive storage usage and quota

Tools 7

list_onedrive_folder read-only
List direct children of a folder
search_onedrive_content read-only
Full-text search across the whole drive
find_onedrive_files read-only
Recursively find items by name glob
list_onedrive_albums read-only
List photo albums or items in one album
read_onedrive_file read-only
Read a file's contents as text
stat_onedrive_item read-only
Return full metadata for an item
onedrive_storage read-only
Report storage quota for the available drives

Use cases

Let AI assistants browse and search your OneDrive files
Read documents, check storage usage
List albums and photos
Find files recursively

Supported clients

Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

onedrive-cli is a cross-platform command line tool for managing OneDrive (Personal). It also provides a read-only MCP server (over stdio) that lets MCP clients like Claude browse and read your OneDrive. The MCP server only issues GET requests and cannot modify the drive.

Similar servers

Source revision 1cf20b447b88 Data synced 2026-10-12 Read the FMRS scoring method