icloud-docs-mcp
Read-only MCP server for iCloud Drive that lets agents list, search, download, and extract text from files without a Mac.
status— check Apple ID session trust and Drive reachability.list_folder— list one iCloud Drive folder (non-recursive); empty path uses configured root.search— search Drive filenames/paths, optional extension filter, capped results.download— download Drive files to local cache and return local paths.read_text— download if needed and extract text from PDF, DOCX, XLSX, TXT, CSV.
Provides read-only access to iCloud Drive, enabling folder listing, filename search, file downloads, and text extraction from common document formats.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@icloud-docs-mcp search my iCloud Drive for the filename 'taxes'."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
icloud-docs-mcp
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.
Related MCP server: icloud-drive-mcp
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:
git clone https://github.com/js713-lab/icloud4u-mcp.git
cd icloud4u-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Install from GitHub:
pip install git+https://github.com/js713-lab/icloud4u-mcp.gitOr, once the package is on PyPI:
pip install icloud-docs-mcpCopy .env.example to .env and set ICLOUD_USERNAME to your Apple ID. .env is gitignored.
cp .env.example .envLogin (required once)
The MCP process will not wait for a 2FA code. Log in in a real terminal:
export ICLOUD_USERNAME='you@example.com'
icloud-docs-mcp loginYou 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.
icloud-docs-mcp statusTools
Tool | Purpose |
| Session health. Returns the Apple ID and cache paths, never a password. |
| One directory. Empty path is Drive root (or |
| Filename/path query, optional |
| Copy Drive files to the local cache. Returns paths, not bytes. |
| Download 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
Variable | Required | Meaning |
| yes | Apple ID. No default. |
| no | Login CLI prompts if unset. Avoid putting this in the MCP env. |
| no | Cookiejar directory override. |
| no | Local download cache. |
| no | Drive folder prefix; all tools are scoped under it. |
MCP clients
Default command (no args) speaks MCP on stdio:
icloud-docs-mcpGrok
[mcp_servers.icloud_docs]
command = "icloud-docs-mcp"
env = { ICLOUD_USERNAME = "${ICLOUD_USERNAME}" }
startup_timeout_sec = 45
tool_timeout_sec = 180
tool_timeouts = { search = 180, download = 300, read_text = 180 }Claude Desktop / Cursor
{
"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:
grok plugin install js713-lab/icloud4u-mcp --trustThat 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
pip install -e ".[dev]"
pytestTests mock Apple. CI must never log into iCloud. See CONTRIBUTING.md.
License
MIT. Security reports: SECURITY.md.
Maintained by CodeCrafter · contact hong@codecrafter.dev.
Available Tools
5 toolsdownloadA
Download Drive files to the local cache directory. Returns local paths, not bytes.
Inputs: paths (required). Returns: object
list_folderA
List one iCloud Drive folder (not recursive). Empty path is the configured root.
Inputs: path. Returns: object
read_textA
Download a Drive file if needed and return extracted text (pdf, docx, xlsx, txt).
Inputs: path (required). Returns: object
searchC
Search Drive filenames and paths. Optional ext filter like pdf or .docx. Capped.
Inputs: ext, path, limit, query. Returns: object
statusA
Check whether the Apple ID session is trusted and iCloud Drive is reachable.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool maps to a distinct operation: session status, folder listing, filename search, file download, and text extraction. The only possible overlap is download/read_text, but their return types and stated purposes are clearly separated.
Most names follow a simple verb-first style, but status is a noun and search is a bare verb without an object. Still, there is no mixed casing or confusing verb variants, so the pattern remains readable and predictable.
Five tools is well-scoped for a targeted iCloud Drive document access server. There are no redundant or superfluous tools; each one contributes to the core workflow.
The core read-oriented workflow is covered: verify connectivity, navigate folders, search, download, and extract text. Missing write/management operations like upload or delete appear outside this server's stated purpose, though recursive listing or metadata access would be minor enhancements.
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Read and send iCloud Mail, manage iCloud Calendar. Needs an approved account at icloud.mcp.visin.ch.
Search, browse, and read your Dropbox files. Find documents by name or content, list folders, and…
Let your agent into iCloud Mail, calendar and contacts. It gets actions, never your password.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for iCloud Drive on macOS, enabling Claude to browse, read, search, tag, write, and trash files with safe defaults and automatic handling of iCloud placeholder files.29 npm1MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for managing iCloud Drive files via the local sync folder. Provides tools for listing, reading, writing, deleting, moving, searching, and getting metadata for files.MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to iCloud mail, calendars, and contacts over MCP through IMAP/SMTP, CalDAV, and CardDAV, with configurable read/write and deletion permissions.2MIT
- AlicenseAqualityBmaintenanceEnables agents to browse, read, write, upload, download, move, rename, trash and restore files in iCloud Drive by talking to iCloud directly, so it works whether or not files are synced locally. Reads prefer a hydrated local copy when one exists, while every write goes straight to iCloud so all devices see changes at once.14MIT