{"id":49418330,"url":"https://github.com/groupthink-dev/onedrive-blade-mcp","last_synced_at":"2026-04-29T04:12:18.968Z","repository":{"id":352838288,"uuid":"1196947782","full_name":"Groupthink-dev/onedrive-blade-mcp","owner":"Groupthink-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-21T09:56:09.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T11:40:25.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Groupthink-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-31T07:29:51.000Z","updated_at":"2026-04-21T09:56:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Groupthink-dev/onedrive-blade-mcp","commit_stats":null,"previous_names":["groupthink-dev/onedrive-blade-mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Groupthink-dev/onedrive-blade-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fonedrive-blade-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fonedrive-blade-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fonedrive-blade-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fonedrive-blade-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Groupthink-dev","download_url":"https://codeload.github.com/Groupthink-dev/onedrive-blade-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fonedrive-blade-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"online","status_checked_at":"2026-04-29T02:00:06.602Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-29T04:12:15.864Z","updated_at":"2026-04-29T04:12:18.962Z","avatar_url":"https://github.com/Groupthink-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# onedrive-blade-mcp\n\nA token-efficient [MCP](https://modelcontextprotocol.io) server for OneDrive and SharePoint file operations via Microsoft Graph API.\n\n18 tools covering browse, read, search, upload, share, versioning, delta sync, and SharePoint — with pipe-delimited output, write-gating, and dual auth.\n\n## Why this over generic file MCPs?\n\n| | **onedrive-blade-mcp** | Generic file / Graph MCPs |\n|---|---|---|\n| **Output** | Pipe-delimited, null omission | Raw JSON blobs (10-50x more tokens) |\n| **Delta sync** | `drive_delta` tracks file changes incrementally | Full re-listing every time |\n| **SharePoint** | Browse sites, libraries, and files natively | OneDrive-only or not supported |\n| **Safety** | Write-gated by default, delete requires `confirm=true` | Varies |\n| **Auth** | Dual: device code (interactive) + client credentials (headless/CI) | Single flow |\n| **Versioning** | `drive_versions` for full file history | Not exposed |\n| **Thumbnails** | `drive_thumbnail` for image previews | Not available |\n\nDelta sync is the killer feature for AI workflows — track what changed in a folder without re-listing thousands of files.\n\n## Features\n\n- **18 tools** — browse, read, search, upload, share, version history, delta sync, SharePoint\n- **Token-efficient output** — pipe-delimited, field-selected, null fields omitted\n- **Write-gated by default** — reads are free, writes require `ONEDRIVE_WRITE_ENABLED=true`\n- **Delta sync** — incremental file change tracking with delta tokens\n- **SharePoint integration** — sites, document libraries, and files\n- **Dual authentication** — device code for interactive, client credentials for headless\n- **Sharing management** — create links, check permissions, control scope\n- **FastMCP 2.0** — stdio and HTTP transports\n\n## Quick Start\n\n```bash\n# Install\ngit clone https://github.com/groupthink-dev/onedrive-blade-mcp.git\ncd onedrive-blade-mcp\nuv sync\n\n# Configure\nexport ONEDRIVE_TENANT_ID=\"your-tenant-id\"\nexport ONEDRIVE_CLIENT_ID=\"your-client-id\"\nexport ONEDRIVE_AUTH_MODE=\"device_code\"\n\n# Run (stdio)\nuv run onedrive-blade-mcp\n```\n\n## Tools (18)\n\n### Meta\n\n| Tool | Description |\n|------|-------------|\n| `drive_info` | Storage info — drive type, quota usage, owner |\n\n### Read (8)\n\n| Tool | Description |\n|------|-------------|\n| `drive_list` | Browse folder contents (path or ID) |\n| `drive_read` | Read file content — text for text files, base64 summary for binary |\n| `drive_metadata` | Detailed metadata — name, size, dates, creator, MIME, sharing |\n| `drive_search` | Search files by name or content (Microsoft Search) |\n| `drive_download` | Pre-authenticated short-lived download URL |\n| `drive_versions` | Version history with dates, authors, sizes |\n| `drive_delta` | Incremental change tracking with delta tokens |\n| `drive_thumbnail` | Thumbnail URLs (small/medium/large) for images and documents |\n\n### SharePoint (3)\n\n| Tool | Description |\n|------|-------------|\n| `drive_sites` | List or search SharePoint sites |\n| `drive_site_libraries` | Document libraries for a SharePoint site |\n| `drive_site_list` | Files in a SharePoint document library |\n\n### Write (4, gated)\n\n| Tool | Description |\n|------|-------------|\n| `drive_upload` | Upload a file (up to 4MB, base64 content) |\n| `drive_create_folder` | Create a new folder |\n| `drive_move` | Move and/or rename a file or folder |\n| `drive_delete` | Delete to recycle bin (requires `confirm=true`) |\n\n### Sharing (2)\n\n| Tool | Description |\n|------|-------------|\n| `drive_share` | Create sharing links (view/edit/embed, org/anonymous scope) |\n| `drive_permissions` | View who has access and existing sharing links |\n\n## Delta Sync\n\nTrack file changes without re-listing entire directories:\n\n```\n# First call — returns current state + delta_link\ndrive_delta(folder_path=\"/Documents\")\n\n# Subsequent calls — returns only changes since last call\ndrive_delta(delta_link=\"aHR0cHM6Ly9ncmFwaC5taW...\")\n```\n\nReturns created, modified, and deleted items with a fresh delta_link for the next call.\n\n## Authentication\n\n### Device Code (interactive)\n\n```bash\nexport ONEDRIVE_AUTH_MODE=\"device_code\"\nexport ONEDRIVE_TENANT_ID=\"your-tenant-id\"\nexport ONEDRIVE_CLIENT_ID=\"your-client-id\"\n```\n\n### Client Credentials (headless)\n\n```bash\nexport ONEDRIVE_AUTH_MODE=\"client_credentials\"\nexport ONEDRIVE_TENANT_ID=\"your-tenant-id\"\nexport ONEDRIVE_CLIENT_ID=\"your-client-id\"\nexport ONEDRIVE_CLIENT_SECRET=\"your-client-secret\"\n```\n\n## Security Model\n\n| Layer | Behaviour |\n|-------|-----------|\n| **Write gate** | All mutations disabled by default (`ONEDRIVE_WRITE_ENABLED=true`) |\n| **Delete safety** | `drive_delete` requires `confirm=true` (moves to recycle bin) |\n| **Credential scrubbing** | Tokens never appear in tool output or error messages |\n| **Bearer auth** | Optional `ONEDRIVE_MCP_API_TOKEN` for HTTP transport |\n\n## Claude Desktop Config\n\n```json\n{\n  \"mcpServers\": {\n    \"onedrive\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"/path/to/onedrive-blade-mcp\", \"onedrive-blade-mcp\"],\n      \"env\": {\n        \"ONEDRIVE_TENANT_ID\": \"your-tenant-id\",\n        \"ONEDRIVE_CLIENT_ID\": \"your-client-id\",\n        \"ONEDRIVE_AUTH_MODE\": \"device_code\"\n      }\n    }\n  }\n}\n```\n\n## Claude Code\n\n```bash\nclaude mcp add onedrive -- uv run --directory /path/to/onedrive-blade-mcp onedrive-blade-mcp\n```\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `ONEDRIVE_TENANT_ID` | Yes | — | Azure AD tenant ID |\n| `ONEDRIVE_CLIENT_ID` | Yes | — | App registration client ID |\n| `ONEDRIVE_CLIENT_SECRET` | For client_credentials | — | App registration client secret |\n| `ONEDRIVE_AUTH_MODE` | No | `device_code` | `device_code` or `client_credentials` |\n| `ONEDRIVE_WRITE_ENABLED` | No | `false` | Enable write/delete tools |\n| `ONEDRIVE_MCP_TRANSPORT` | No | `stdio` | `stdio` or `http` |\n| `ONEDRIVE_MCP_HOST` | No | `127.0.0.1` | HTTP bind address |\n| `ONEDRIVE_MCP_PORT` | No | `8002` | HTTP port |\n| `ONEDRIVE_MCP_API_TOKEN` | No | — | Bearer token for HTTP auth |\n\n## Architecture\n\n```\nsrc/onedrive_blade_mcp/\n├── server.py       — FastMCP 2.0 server, 18 @mcp.tool decorators\n├── client.py       — Graph API client with dual auth, write gate, delta sync\n├── formatters.py   — Token-efficient output (pipe-delimited, null omission)\n├── models.py       — Config, constants\n└── auth.py         — Device code + client credentials, bearer middleware\n```\n\nBuilt with [FastMCP 2.0](https://github.com/jlowin/fastmcp) and [httpx](https://github.com/encode/httpx).\n\n## Development\n\n```bash\nuv sync               # Install dependencies\nuv run onedrive-blade-mcp   # Run locally (stdio)\nuv run ruff check .    # Lint\nuv run pytest tests/   # Tests (mocked, no OneDrive needed)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fonedrive-blade-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroupthink-dev%2Fonedrive-blade-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fonedrive-blade-mcp/lists"}