Features
- Exposes a single MCP tool,
mega/generate, over stdio. - Generates one or more MEGA.nz accounts using temporary email addresses.
- Returns machine-readable account data in
structuredContent. - Supports optional proxy routing through a CLI flag or environment variable.
- Enforces a small per-request account limit to keep calls predictable.
[!IMPORTANT] Use this project only for legitimate automation, testing, or research that you are authorized to perform. Third-party services may apply rate limits, account policies, or terms of service restrictions.
Installation
Install the published binary with Cargo:
cargo install meganz-account-generator-mcp
Or run it directly from a local checkout:
cargo run
The server communicates through MCP over stdio, so it is meant to be launched by an MCP client or driven with newline-delimited JSON-RPC messages.
Quick Start
MCP client config
Use the installed binary as a stdio MCP server:
{
"mcpServers": {
"meganz-account-generator": {
"command": "meganz-account-generator-mcp"
}
}
}
Then call the mega/generate tool from your MCP client.
Manual JSON-RPC flow
Start the server:
meganz-account-generator-mcp
Send these messages one line at a time:
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"manual-test","version":"1.0.0"},"capabilities":{}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"mega/generate","arguments":{"count":1,"password":"MySecurePassword123!"}}}
Example response:
{
"content": [
{
"type": "text",
"text": "Generated 1 account(s)."
}
],
"structuredContent": {
"accounts": [
{
"email": "[email protected]",
"password": "MySecurePassword123!",
"name": "Example Name"
}
]
},
"isError": false
}
Tool Reference
mega/generate
Generates MEGA.nz accounts using temporary email addresses.
Example:
{
"name": "mega/generate",
"arguments": {
"count": 3,
"password": "MySecurePassword123!"
}
}
The generated accounts are returned in structuredContent.accounts.
Configuration
Route MEGA requests through a proxy with either the CLI flag:
meganz-account-generator-mcp --proxy-url http://127.0.0.1:8080
Or the environment variable:
MEGA_PROXY_URL=http://127.0.0.1:8080 meganz-account-generator-mcp
For local development with Cargo:
MEGA_PROXY_URL=http://127.0.0.1:8080 cargo run
Development
cargo check
cargo run
Project layout:
src/main.rs CLI parsing and tracing setup
src/app.rs MCP server and tool registration
src/handlers/generate.rs Account generation handler
Use RUST_LOG=debug when you need more runtime detail from the server.