MCP server for MEGA cloud storage CLI
npm install @purplesquirrel/mega-mcp-server
  




MCP server for MEGA cloud storage integration with Claude Code. Provides comprehensive file management, synchronization, and sharing capabilities using MEGAcmd.
- File Management - List, copy, move, delete files and folders
- Upload/Download - Transfer files between local and cloud
- Sharing - Create public links and share with other users
- Sync - Set up folder synchronization
- Storage Info - View usage and quotas
mega_whoami | Get current logged-in account info |mega_pwd | Print current working directory |mega_cd | Change current directory |mega_df | Show storage space usage |mega_du | Show disk usage of remote path |mega_ls | List files and folders |mega_mkdir | Create a directory |mega_rm | Remove files or folders |mega_mv | Move or rename files/folders |mega_cp | Copy files/folders |mega_cat | Display contents of a remote file |mega_tree | Show directory tree structure |mega_find | Search for files/folders |mega_get | Download files to local filesystem |mega_put | Upload files to MEGA cloud |mega_transfers | Show current transfers |mega_sync | Set up folder synchronization |mega_export | Create a public link |mega_share | Share folder with another user |mega_import | Import a public MEGA link |Install MEGAcmd from https://mega.io/cmd
On macOS:
``bash`
brew install --cask megacmd
Login to your MEGA account:
`bash`
mega-login your@email.com password
`bash`
cd ~/mcp-servers/mega-mcp
npm install
npm run build
Add to ~/.claude.json:
`json`
{
"mcpServers": {
"mega": {
"type": "stdio",
"command": "node",
"args": ["/Users/matthewkarsten/mcp-servers/mega-mcp/dist/index.js"]
}
}
}
``
Claude Code (Opus 4.5)
│
└──▶ MEGA MCP Server
│
└──▶ MEGAcmd CLI
│
└──▶ MEGA Cloud Storage
│
├── 20 GB Free Storage
├── End-to-End Encryption
├── File Versioning
└── Sharing & Sync
- End-to-End Encryption - All files encrypted client-side
- 20 GB Free Storage - Free tier included
- File Versioning - Automatic version history
- Cross-Platform Sync - Desktop and mobile apps
- Public Links - Share files with anyone
- Folder Sharing - Collaborate with other MEGA users
`
User: Show my MEGA storage usage
Claude: [Uses mega_df tool]
Result:
Account: purplesquirrelmedia@icloud.com
Used: 2.3 GB of 20 GB (11.5%)
Available: 17.7 GB
User: List files in my Documents folder
Claude: [Uses mega_ls tool with path=/Documents]
Result:
- project-files/
- presentations/
- backup.zip (156 MB)
- notes.txt (2.3 KB)
User: Create a public link for backup.zip
Claude: [Uses mega_export tool]
Result: https://mega.nz/file/xxxxx#yyyyy
`
User: Upload ~/reports/ to MEGAClaude: [Uses mega_put tool]
Uploading 15 files...
Completed: ~/reports/ -> /reports/
`$3
`
User: Download /Documents/backup.zipClaude: [Uses mega_get tool]
Downloaded: /Documents/backup.zip -> ~/Downloads/backup.zip
`$3
`
User: Set up sync between ~/Projects and /ProjectsClaude: [Uses mega_sync tool]
Sync established: ~/Projects <-> /Projects
`Files
`
mega-mcp/
├── src/
│ └── index.ts # MCP server implementation
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md
`Dependencies
-
@modelcontextprotocol/sdk` - MCP SDK- All data encrypted with your account key
- Zero-knowledge encryption (MEGA can't read your files)
- Two-factor authentication supported
- Session-based authentication via MEGAcmd
Matthew Karsten
MIT
If this MCP server is useful to you, consider supporting its development:


Enterprise support available - Contact us for SLAs, custom development, and priority support.