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 分