iCloud Drive Docs

io.github.js713-lab由 GitHub 帳號 js713-lab 發布v0.1.0更新於 Oct 24, 2026

Read-only MCP server for listing, searching, downloading, and reading iCloud Drive documents.

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

唯讀的本機 MCP 伺服器,讓助理在 iCloud 雲端硬碟中列出、搜尋、下載文件並擷取文字,在非 Mac 系統上也能使用。

可以做什麼
列出 iCloud 雲端硬碟中的某個資料夾,空路徑代表根目錄或設定的資料夾前綴,並可透過 status 查看工作階段狀態、已設定的 Apple ID 與快取路徑(不會回傳密碼)。依檔名或路徑搜尋雲端硬碟,可依副檔名篩選,結果數量有上限。將雲端硬碟檔案下載到本機快取並回傳路徑而非檔案內容。對已下載或快取的 pdf、docx、xlsx、txt、csv 文件擷取文字,方便助理引用特定頁面。
適用情境
適合助理需要尋找並引用存放在 iCloud 雲端硬碟中的文件時,例如找到發票並引用第 3 頁,尤其在無法使用 macOS 本機雲端硬碟工具的 Linux 或 Windows 上。不適用於郵件、行事曆、聯絡人或備忘錄,也不支援上傳、重新命名或刪除。
執行需求
以 stdio 方式在本機執行,需 Python 3.10+,可透過 pip install icloud-docs-mcp 或 MCPB 套件安裝;僅限桌面端。需將 ICLOUD_USERNAME 設為 Apple ID,並在真實終端機中完成一次互動式登入(icloud-docs-mcp login),輸入密碼,可能還需 6 位數裝置驗證碼。選用變數:ICLOUD_PASSWORD、ICLOUD_SESSION_DIR、ICLOUD_DOWNLOAD_DIR、ICLOUD_ROOT。需要連線至 iCloud 的網路存取。
安裝前請注意
由於 Apple 未提供第三方 iCloud 雲端硬碟 API,使用非官方的 pyicloud 用戶端;Apple 變更端點時可能失效,使用也可能與 Apple 條款衝突。Cookiejar 檔案即登入憑證,切勿提交或分享;避免將 ICLOUD_PASSWORD 放入 MCP 環境變數。status 工具會回傳 Apple ID 與本機快取路徑。不要將伺服器暴露在網路上。下載操作會將檔案寫入本機快取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 iCloud Drive Docs,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

icloud-docs-mcp

[iCloud Drive Docs — read-only MCP. List, Search, Download, Read.]

Your agent can find a PDF in iCloud Drive and quote page 3.

Read-only Model Context Protocol server for iCloud Drive. Linux, Windows, or macOS — no Mac, no Spotlight, no ~/Library required.

Source: js713-lab/icloud4u-mcp. The installable package and CLI are named icloud-docs-mcp.

Mail / Calendar / Contacts MCPs already exist. Drive is still the weak spot in the Apple stack if you are not on a Mac. That is the wedge: cross-platform Drive without needing a Mac. It is a utility, not a category.

It lists a folder, searches by filename, downloads files, and extracts text from common documents. There is no default Apple ID, no bundled documents, and no company-specific search logic.

Apple does not publish a third-party iCloud Drive API. This server uses the unofficial pyicloud library. You do not own that pipe. Apple can change an endpoint and this tool is down until someone reverse-engineers it again. Do not promise reliability this repo does not control.

Example:

Find the invoice in iCloud Drive and quote page 3.

What it is not

  • Not Mail, Calendar, Contacts, or Notes
  • Not a macOS-local Drive MCP (those already use Spotlight / ~/Library)
  • Not a hosted / HTTP MCP (it runs locally over stdio)
  • Not a 2FA prompt inside the model session
  • Not upload, rename, or delete
  • Not a reliability SLA. The unofficial client will break.

Disclaimer

This is not an Apple product. Apple does not publish a third-party iCloud Drive API. The unofficial client can break when Apple changes endpoints, and using it may conflict with Apple's terms. Use it at your own risk, locally, on an account you control.

Do not expose this server on the network. Cookiejar files are login credentials: never commit them, never paste them into issues, and never check in .env. See SECURITY.md.

The status tool returns the configured Apple ID and local cache paths so a client can tell whether login succeeded. It never returns a password.

Install

Python 3.10+

From this repository:

bash
git clone https://github.com/js713-lab/icloud4u-mcp.gitcd icloud4u-mcppython3 -m venv .venvsource .venv/bin/activatepip install -e .

Install from GitHub:

bash
pip install git+https://github.com/js713-lab/icloud4u-mcp.git

Or, once the package is on PyPI:

bash
pip install icloud-docs-mcp

Copy .env.example to .env and set ICLOUD_USERNAME to your Apple ID. .env is gitignored.

bash
cp .env.example .env

Login (required once)

The MCP process will not wait for a 2FA code. Log in in a real terminal:

bash
export ICLOUD_USERNAME='[email protected]'icloud-docs-mcp login

You will be prompted for the password and, if Apple asks, a 6-digit device code. A trusted cookiejar is stored under:

$XDG_DATA_HOME/icloud-docs-mcp/<sanitized-username>/

(~/.local/share/icloud-docs-mcp/... if XDG_DATA_HOME is unset.)

If a tool returns NEED_LOGIN or NEED_2FA, run icloud-docs-mcp login again, then retry.

bash
icloud-docs-mcp status

Tools

ToolPurpose
statusSession health. Returns the Apple ID and cache paths, never a password.
list_folderOne directory. Empty path is Drive root (or ICLOUD_ROOT).
searchFilename/path query, optional ext, capped results.
downloadCopy Drive files to the local cache. Returns paths, not bytes.
read_textDownload if needed; extract text from pdf, docx, xlsx, txt, csv.

Search and read_text are capped so MCP clients with a small result limit are not flooded.

Environment

VariableRequiredMeaning
ICLOUD_USERNAMEyesApple ID. No default.
ICLOUD_PASSWORDnoLogin CLI prompts if unset. Avoid putting this in the MCP env.
ICLOUD_SESSION_DIRnoCookiejar directory override.
ICLOUD_DOWNLOAD_DIRnoLocal download cache.
ICLOUD_ROOTnoDrive folder prefix; all tools are scoped under it.

MCP clients

Default command (no args) speaks MCP on stdio:

bash
icloud-docs-mcp

Grok

toml
[mcp_servers.icloud_docs]command = "icloud-docs-mcp"env = { ICLOUD_USERNAME = "${ICLOUD_USERNAME}" }startup_timeout_sec = 45tool_timeout_sec = 180tool_timeouts = { search = 180, download = 300, read_text = 180 }

Claude Desktop / Cursor

json
{  "mcpServers": {    "icloud-docs": {      "command": "icloud-docs-mcp",      "env": {        "ICLOUD_USERNAME": "<your-apple-id>"      }    }  }}

Use an absolute path to the venv binary if the client does not inherit your PATH.

Grok can also load .mcp.json from this repo:

bash
grok plugin install js713-lab/icloud4u-mcp --trust

That only starts the server. You still need pip install icloud-docs-mcp (or pip install -e .) and icloud-docs-mcp login on the machine.

To publish a release to PyPI and the official MCP Registry, see PUBLISH.md.

Development

bash
pip install -e ".[dev]"pytest

Tests mock Apple. CI must never log into iCloud. See CONTRIBUTING.md.

License

MIT. Security reports: SECURITY.md.


Maintained by CodeCrafter · contact [email protected].

來源:README.md,提交 1fdc95a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分