What this service stores, for how long, who can access it, and how to remove it. See /security for the threat model.
When you install mctl-telegram as a ChatGPT App, the following data flows apply:
disconnect_telegram_account or delete_telegram_account via MCP, use the HTTP endpoints below, or remove the app from ChatGPT settings.| Where | Contents | Why | Retention |
|---|---|---|---|
users table |
Telegram user id (subject from your sign-in), Telegram display name and username | Resolves your identity for per-user storage isolation | Until you call delete_telegram_account — cascades to remove your row |
telegram_accounts table |
AES-256-GCM ciphertext of your MTProto session blob (per-user HKDF-derived key), plus non-sensitive display name / Telegram username if Telegram returned them | Required to make Telegram API calls on your behalf | Until you call disconnect (marked revoked) or delete (row removed) |
audit_logs table |
Tool name, redacted peer reference (truncated/hashed), status, and a redacted error string. No message text, no phone numbers, no session bytes. | Operational visibility, abuse detection, and to power the get_my_audit_log tool |
Retained for 90 days, then removed by the audit-log sweeper (window configurable via AUDIT_RETENTION_DAYS; set to 0 to keep indefinitely). |
| Process memory | Plaintext MTProto messages for the duration of one tool call (the server must decrypt them to talk to Telegram) | Required to fulfil the request | Freed when the goroutine returns; never written to disk |
| Process stdout (Loki) | Structured JSON log lines from slog, with sensitive keys redacted by the audit handler |
Operator debugging | Per the platform's Loki retention (typically 14–30 days) |
Authorization: Bearer headersYou can remove your data and inspect what was recorded at any time without operator involvement:
POST /api/account/disconnect # mark session revoked (keeps row, no Telegram access) DELETE /api/account # remove the encrypted session blob and row entirely GET /api/account # connection status + per-account send_enabled flag GET /api/account/audit # newest-first audit rows (limit, before) GET /api/account/audit/verify # recompute the hash chain and prove audit was not tampered with
Equivalent MCP tools: disconnect_telegram_account, delete_telegram_account, get_my_audit_log. Disconnect and delete tear down the in-memory MTProto client atomically with the DB write so a concurrent request cannot piggyback on the doomed session.
ENCRYPTION_KEY they cannot decrypt it.General support: [email protected]. Privacy inquiries: [email protected]. For security or vulnerability reports, see /security. Code is open source at github.com/mctlhq/mctl-telegram; audit it yourself.