MCP Hub
Back to servers

mega

MEGA cloud storage CLI MCP server

Updated
Feb 14, 2026

Quick Install

npx -y mega-mcp-server

MEGA Cloud Storage MCP Server

MCP server for MEGA cloud storage integration with Claude Code. Provides comprehensive file management, synchronization, and sharing capabilities using MEGAcmd.

Features

  • 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

Available Tools (18 total)

Account & Navigation

ToolDescription
mega_whoamiGet current logged-in account info
mega_pwdPrint current working directory
mega_cdChange current directory
mega_dfShow storage space usage
mega_duShow disk usage of remote path

File Operations

ToolDescription
mega_lsList files and folders
mega_mkdirCreate a directory
mega_rmRemove files or folders
mega_mvMove or rename files/folders
mega_cpCopy files/folders
mega_catDisplay contents of a remote file
mega_treeShow directory tree structure
mega_findSearch for files/folders

Transfer

ToolDescription
mega_getDownload files to local filesystem
mega_putUpload files to MEGA cloud
mega_transfersShow current transfers
mega_syncSet up folder synchronization

Sharing

ToolDescription
mega_exportCreate a public link
mega_shareShare folder with another user
mega_importImport a public MEGA link

Setup

1. Prerequisites

Install MEGAcmd from https://mega.io/cmd

On macOS:

brew install --cask megacmd

Login to your MEGA account:

mega-login your@email.com password

2. Install Dependencies

cd ~/mcp-servers/mega-mcp
npm install
npm run build

3. Add to Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "mega": {
      "type": "stdio",
      "command": "node",
      "args": ["/Users/matthewkarsten/mcp-servers/mega-mcp/dist/index.js"]
    }
  }
}

Architecture

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

MEGA Features

  • 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

Usage Examples

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

Transfer Features

Upload

User: Upload ~/reports/ to MEGA

Claude: [Uses mega_put tool]
Uploading 15 files...
Completed: ~/reports/ -> /reports/

Download

User: Download /Documents/backup.zip

Claude: [Uses mega_get tool]
Downloaded: /Documents/backup.zip -> ~/Downloads/backup.zip

Sync

User: Set up sync between ~/Projects and /Projects

Claude: [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
  • MEGAcmd - MEGA command-line client

Security

  • 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

Author

Matthew Karsten

License

MIT

Reviews

No reviews yet

Sign in to write a review