wd-mycloud-mcp
Provides tools for browsing, reading, writing, moving, copying, deleting, and searching files on Western Digital MyCloud Home devices, supporting local network (SMB) and remote access via REST API and SFTP.
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., "@wd-mycloud-mcp list files in the Public share"
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.
wd-mycloud-mcp
An MCP (Model Context Protocol) server that exposes Western Digital MyCloud Home file operations to AI assistants (Claude Desktop, etc.) — works both on local network and over the internet.
Features
Browse, read, write, move, copy, delete files on WD MyCloud
Three connection modes with automatic fallback:
SMB (local network) — fastest, direct mount
REST API (remote) — auto-login via WD cloud account, no browser needed
SFTP — fallback when SSH is available
Auto-mounts SMB share on first use (macOS)
Token auto-refresh — stays logged in without manual intervention
Path traversal protection on all operations
File search by name query
Related MCP server: MCP Google Drive Server
Requirements
macOS (uses
mount_smbfsfor SMB mode)Python 3.11+
uv (recommended) or pip
WD MyCloud Home device
Installation
git clone https://github.com/dy-le/wd-mycloud-mcp.git
cd wd-mycloud-mcp
# Install with uv
uv sync
# Or with pip
pip install -e .Configuration
Environment variables
Variable | Default | Description |
|
| Hostname or IP of device (use IP, not |
|
| SMB share name |
|
| SMB username |
| (empty) | SMB password |
|
| Local SMB mount point |
| (empty) | WD account email (for remote access) |
| (empty) | WD account password (for remote access) |
Tip: Use the device's IP address for
WD_MYCLOUD_HOSTinstead of the.localhostname to avoid mDNS resolution issues.
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"wd-mycloud": {
"command": "/path/to/.venv/bin/wd-mycloud-mcp",
"env": {
"WD_MYCLOUD_HOST": "192.168.1.100",
"WD_MYCLOUD_SHARE": "YourShare",
"WD_MYCLOUD_USER": "youruser",
"WD_MYCLOUD_PASSWORD": "yourpass",
"WD_MYCLOUD_MOUNT": "/Users/you/.wd-mycloud/mnt",
"WD_MYCLOUD_CLOUD_EMAIL": "you@email.com",
"WD_MYCLOUD_CLOUD_PASSWORD": "yourcloudpass"
}
}
}
}Remote access (away from home)
When not on the local network, the server automatically authenticates with the WD cloud service using WD_MYCLOUD_CLOUD_EMAIL and WD_MYCLOUD_CLOUD_PASSWORD. Tokens are cached at ~/.wd-mycloud/token.json and refreshed automatically before expiry.
If direct login is unavailable, you can install the included Chrome extension (chrome-extension/) to capture a token manually by visiting home.mycloud.com.
Available Tools
Tool | Description |
| List files and directories |
| Read a text file |
| Create or overwrite a text file |
| Delete a file |
| Delete a directory |
| Create a directory |
| Move or rename |
| Copy a file |
| Search by filename |
| Get file/directory metadata |
| Show current mode and auth status |
| Force re-authentication |
Release notes
v1.1.0
Remote API mode: auto-login with WD cloud email/password, no Chrome extension required
Token refresh: access tokens are refreshed automatically using stored refresh token
Correct WD API endpoints sourced from open-source reference implementations:
File listing:
GET /sdk/v2/filesSearch/parents?ids={parentId}(ids=rootfor root)File download:
GET /sdk/v3/files/{id}/content(v3 endpoint)Delete:
DELETE /sdk/v2/files/{id}Move/rename:
PATCH /sdk/v2/files/{id}Create folder:
POST /sdk/v2/files(multipart/related)Write file:
POST /sdk/v2/files/resumable(resumable upload)
ID-based navigation with in-memory path→ID cache
Auth0 config auto-discovered from
https://config.mycloud.com/config/v1/configFixed SMB: URL-encode credentials with special characters (e.g.
@in password)Fixed mount point: use user-owned path instead of
/Volumes/to avoid permission errors
v1.0.0
Initial release: SMB-only local network access
Acknowledgements
This project references and was informed by the following open-source works:
mnencia/mchfuse (Go) — correct Auth0 login flow (
password-realmgrant type), token refresh, file API paths (/v2/,/v3/), multipart/related upload format, and PATCH for move/renamesbencoding/WD-Bridge (Node.js) —
filesSearch/parents?ids=parameter,ids=rootfor root listing, service URL discoverysbencoding/wdfs (C++) — device proxy URL discovery via
device/v1/user/{sub}, remote access architectureeverappz/MyCloudHomeSDKObjc (Objective-C) — complete API surface reference including resumable upload, token fields (
id_token,access_token,refresh_token), and file metadata schema
License
Apache 2.0
Available Tools
12 toolsconnection_statusA
Show current connection mode and authentication status.
Inputs: no named parameters.
copyA
Copy a file by reading and re-uploading (WD API has no server-side copy).
Args: source: Relative source path. destination: Relative destination path.
Inputs: source (required), destination (required). Returns: result
create_directoryA
Create a directory on WD MyCloud.
Args: path: Relative path for the new directory.
Inputs: path (required). Returns: result
delete_directoryA
Delete a directory on WD MyCloud.
Args: path: Relative path to the directory. recursive: If True, delete directory and all contents.
Inputs: path (required), recursive. Returns: result
delete_fileA
Delete a file on WD MyCloud.
Args: path: Relative path to the file.
Inputs: path (required). Returns: result
get_infoA
Get metadata about a file or directory on WD MyCloud.
Args: path: Relative path from the share root.
Inputs: path (required).
list_directoryA
List files and directories at the given path on WD MyCloud.
Args: path: Relative path from the share root. Defaults to root.
Inputs: path. Returns: result
loginA
Force re-authentication with WD cloud (use if you get auth errors).
Inputs: no named parameters. Returns: result
moveA
Move or rename a file or directory on WD MyCloud.
Args: source: Relative source path. destination: Relative destination path.
Inputs: source (required), destination (required). Returns: result
read_fileA
Read the text content of a file on WD MyCloud.
Args: path: Relative path to the file from the share root.
Inputs: path (required). Returns: result
search_filesA
Search for files by name on WD MyCloud.
Args: query: Search term (filename or partial name) path: Relative directory to search in. Defaults to share root.
Inputs: query (required), path. Returns: result
write_fileA
Write text content to a file on WD MyCloud (creates or overwrites).
Args: path: Relative path to the file. content: Text content to write.
Inputs: path (required), content (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct operation (metadata, listing, reading, writing, deleting, moving, copying, searching, connection management). No two tools overlap in purpose; file vs directory deletion are clearly separated.
Most tools follow a consistent verb_noun pattern (list_directory, read_file, write_file, delete_file, create_directory, search_files), but a few use bare verbs (move, copy, login) or noun phrases (connection_status), creating minor inconsistency.
12 tools is well-scoped for a cloud NAS file server, covering file, directory, and connection management without redundancy or bloat.
Core file/directory operations are covered (list, read, write, delete, create, move, copy, search, metadata), but directory copy is unsupported (copy only works for files), which is a minor gap.
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Browse and manage files in your Moxt AI workspace from any MCP client.
Find, read and reorganize files across Google Drive, OneDrive, SharePoint and Dropbox, with undo.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage Synology NAS devices with file operations (create, delete, move, search) and Download Station control through secure authentication and session management.133 PyPI250MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Google Drive, supporting file operations like list, search, read, create, update, delete, share, and manage permissions.7688 npm4MIT
- AlicenseNot gradedqualityCmaintenanceProvides file system access and operations, enabling AI assistants to read, write, list, search, and manage files and directories through a standardized interface.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage files on Synology NAS via the File Station API, supporting operations like browsing, searching, uploading/downloading, creating, renaming, copying, moving, deleting, compressing, and extracting.MIT