inbox-tap-mcp
by eye-fox
README.md
# inbox-tap-mcp ā satu MCP untuk semua OTP temporer š©š±
MCP server **standalone** yang memberi AI agent (opencode, Claude Code/Desktop, Cursor, Cline, dsb) inbox temporer gabungan **email + SMS** untuk verifikasi OTP/link saat registrasi akun di target:
- š© **Email temporer** ā buat akun, cek inbox, baca pesan, tunggu email + ekstrak OTP/link (via mail.tm API)
- š± **SMS temporer** ā list negara/nomor, cek inbox, tunggu SMS + ekstrak OTP/link (via freephonenum scrape)
- ā” **Unified OTP** ā `mcp_inbox_wait_otp(channel=email|sms)` satu pintu untuk kedua channel
- š”ļø **Aman by default** ā token mail.tm ter-redact di `audit.jsonl`; OTP/links tetap tampil di result (dibutuhkan agent)
- š¦ **Zero-deployment hell** ā 1 repo, **stdlib only** (tanpa `pip install`), backend di-vendor (`vendor_inbox.py`), tanpa dependensi `mailtap`/`smstap`
> 11 tools. 1 perintah install. `mailtap` + `smstap` tetap untuk manusia via CLI ā MCP ini jalan sendiri walau keduanya dihapus.
---
## Demo 30 detik
```bash
git clone https://github.com/eye-fox/inbox-tap-mcp.git
cd inbox-tap-mcp
./install.sh
# restart opencode / AI client Anda, lalu suruh agent:
# "list akun email, buat akun attacker bila belum ada, tunggu OTP"
python3 examples/quickstart.py # tanpa LLM: bukti end-to-end lewat stdio
```
## Cara kerja
```mermaid
flowchart LR
Agent["AI agent"] -- "MCP stdio<br/>JSON-RPC" --> Server["server.py"]
Server -- "import" --> Vendor["vendor_inbox.py<br/>stdlib only"]
Vendor -- "REST" --> MailTM["mail.tm API<br/>email temporer"]
Vendor -- "scrape" --> FPN["freephonenum.com<br/>SMS publik"]
Server --- Audit["audit.jsonl<br/>token redacted"]
```
Akun email disimpan di `~/.tempmail/accounts.json` (format kompatibel `mailtap`, kode baca/tulis mandiri). SMS stateless (tidak ada penyimpanan).
## Syarat
| Kebutuhan | Versi | Cek |
|---|---|---|
| Python | ā„ 3.9 | `python3 --version` |
| Koneksi internet | ā | `curl -sI https://api.mail.tm` |
| mailtap/smstap | tidak butuh | sengaja independen |
## Install
```bash
./install.sh
```
Script melakukan: cek python ā `chmod +x` ā init `audit.jsonl` ā **auto-register ke `~/.config/opencode/opencode.json`** ā smoke test `tools/list` (harus 11 tools).
Opsi:
```bash
./uninstall.sh # hapus entri MCP, repo + ~/.tempmail tidak dihapus
```
## Config manual (non-opencode)
**Claude Desktop / Cursor / Cline (`mcp.json` / `claude_desktop_config.json`):**
```json
{
"mcpServers": {
"inbox-tap-mcp": {
"command": "python3",
"args": ["/ABSOLUTE/PATH/inbox-tap-mcp/server.py"]
}
}
}
```
Template siap copy: [`mcp.json.example`](mcp.json.example). Untuk opencode mentah: [`opencode.json.snippet`](opencode.json.snippet).
## Struktur repo
```text
inbox-tap-mcp/
āāā install.sh # setup full: cek python + register opencode + smoke test
āāā uninstall.sh # cabut entri MCP
āāā server.py # MCP stdio server (11 tools, audit+redact)
āāā vendor_inbox.py # backend email mail.tm + SMS freephonenum (stdlib only) ā di-vendor
āāā requirements.txt # kosong (stdlib only, dokumentasi saja)
āāā SKILL.md # instruksi agent (copy ke skill-dir bila perlu)
āāā opencode.json.snippet # referensi config opencode
āāā mcp.json.example # referensi config generik MCP
āāā examples/quickstart.py # e2e tanpa LLM: email_list + sms_countries
āāā scripts/smoke_test.py # initialize + tools/list, exit 0 bila 11 tools
āāā LICENSE (MIT)
āāā .gitignore (melindungi audit.jsonl runtime)
```
> `audit.jsonl` adalah **runtime** ā tidak ikut ke git (lihat `.gitignore`). `~/.tempmail/accounts.json` milik user, juga tidak ikut ke git.
## Pakai di agent (pola baku)
1. `mcp_inbox_email_list {}` ā pastikan alias ada; belum ada? `mcp_inbox_email_create {"name":"attacker"}`
2. Isi form registrasi di target (via `browser-mcp` bila web) dengan email/nomor itu
3. `mcp_inbox_wait_otp {"channel":"email","target":"attacker","timeout":120}` ā dapat OTP (+links bila ada)
4. Isi OTP ā submit
5. Varian SMS: `mcp_inbox_sms_numbers {"country":"us"}` ā pilih nomor ā `mcp_inbox_wait_otp {"channel":"sms","target":"318-545-6266"}`
6. Eksplorasi manual: `mcp_inbox_email_inbox/read`, `mcp_inbox_sms_inbox/read`
Aturan detail + 11 tools: lihat [`SKILL.md`](SKILL.md).
### Batasan yang perlu tahu
- SMS bersifat **publik/shared** ā semua orang dengan nomor sama bisa lihat pesan. Jangan untuk akun sensitif (bank, password reset).
- Akun mail.tm valid **~7 hari**, setelah itu hangus.
- Provider SMS gratis sering berubah layout/rate-limit ā bila `sms_*` gagal massal, cek manual `freephonenum.com` dulu sebelum menyalahkan MCP.
## Keamanan
- `audit.jsonl`: key sensitif (`password/token/secret`) di-redact. Jangan commit file runtime.
- Jangan taruh kredensial asli di contoh manapun.
- Hanya pakai terhadap target yang Anda punya izin uji; nomor SMS publik bukan untuk akun sungguhan.
## Publish ke GitHub (checklist)
```bash
cd inbox-tap-mcp
# pastikan tidak ada secret bocor:
grep -ri "password\|token\|api.key\|bearer" --include="*.py" --include="*.md" --include="*.json" --include="*.sh" . | grep -v REDACT | grep -v CHANGEME | grep -v Testing123 || echo "bersih"
git init && git add . && git commit -m "inbox-tap-mcp standalone v1.0.0" && git branch -M main
gh repo create inbox-tap-mcp --public --source=. --push
```
## Troubleshooting
| Gejala | Obat |
|---|---|
| MCP tidak muncul di client | restart client; pastikan path `server.py` absolut; `python3 scripts/smoke_test.py` harus PASS |
| `email_wait` timeout terus | cek `email_inbox` manual ā mungkin email memang belum masuk / akun >7 hari hangus ā `email_create` baru |
| `sms_*` gagal / kosong | `freephonenum.com` mungkin berubah layout atau rate-limit ā buka manual di browser, coba nomor/negara lain |
| `Timeout ... tidak ada SMS baru` | nomor publik lambat ā naikkan `timeout`, atau ganti nomor via `sms_numbers` |
## Lisensi
MIT ā lihat [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues