Privacy and data handling
What this service stores, for how long, who can access it, and how to remove it. See /security for the threat model.
Claude, ChatGPT, and other MCP users
When you connect MCTL to Claude, ChatGPT, or another MCP client, the following data flows apply:
- User-authorized account access: this service operates only on the Telegram account you explicitly connect. It is MCTL Assistant, an unofficial third-party connector using the Telegram API, and an independent project: it is not affiliated with, endorsed by, or operated by Telegram, Anthropic, or OpenAI.
- Through your MCP client: your prompts, MCP tool arguments (for example, peer identifiers or draft text), and tool results returned by this server pass through your MCP client. That traffic is also processed by the MCP client provider under its own privacy policy.
- Stored by this server for ordinary MCP calls: an encrypted MTProto session blob, your Telegram user ID and display name/username, and audit metadata (tool name, redacted peer reference, status). Message bodies returned by read tools are fetched for that request and are not copied into the audit log. Accounts onboarded through Local Bridge
activatehave no stored session blob here. - Stored when Communication Agent is enabled: relevant incoming Telegram events, agent-visible conversation messages, and proposed action payloads are durably stored so the queue, policy, approval, and recovery flow can operate. Sensitive body/payload fields are encrypted at rest with your derived key. Message/event bodies and terminal or inactive pre-send action content use the agent retention window below; executing action content remains until persisted-random-ID recovery reaches a terminal state.
- Revoke access:
disconnect_telegram_account(orPOST /api/account/disconnect, or disconnect at/telegram/connect/manageafter signing in with Telegram) erases the stored session, asks Telegram to end it, and keeps your client's OAuth connection, so reconnecting Telegram does not require re-adding the connector. If Telegram cannot be reached at that moment, the device can stay listed: close it in Telegram under Settings, then Devices.delete_telegram_account(orDELETE /api/account) does the same to the session and also revokes every OAuth client's refresh tokens, every worker token issued for your Telegram ID, and every Local Bridge device. Removing the app/connector from your client settings revokes its tokens only if that client calls/oauth/revoke; we cannot see the removal otherwise. These calls need a connection grantedaccount:manage. Access tokens already issued expire within their lifetime (at most 1 hour in production).
AI use of your messages
Your chats contain messages written by other people, who have not agreed to anything with this service. Telegram's terms forbid using Telegram data to train AI models without consent, so the rules here are narrow:
- Inference for your own requests only. Message content is read only to answer a request you make through your own AI assistant, and is returned to that assistant and nowhere else.
- No training by this service. This service never uses message content, or anything derived from it, to train, fine-tune, or evaluate any AI model, and never sells or shares it for that purpose.
- Turn off training in your AI client. Your MCP client provider handles the tool results it receives under its own policy. Before connecting, switch off any setting that lets the provider use your conversations to improve its models.
- Broadcast channel posts come with Telegram's sponsored messages. When your assistant reads posts from a broadcast channel, this service also fetches the official sponsored messages Telegram serves for that channel, returns them to your assistant separately from the posts, labeled as advertising, and tells Telegram they were shown, as Telegram's API terms require. They are not stored, and their text is not logged.
- Kept no longer than the feature needs. Ordinary MCP calls fetch messages for that request and do not store them. Only Communication Agent stores message content, encrypted, for the retention window in the table below.
Data inventory
| Where | Contents | Why | Retention |
|---|---|---|---|
users table |
Telegram user ID, display name, and username | Resolves your identity for per-user storage isolation | Account deletion clears the display name, username, and last-seen time and removes related user-scoped rows by database cascade where configured. The Telegram user ID, access tier, and the time of the delete are kept, so a later sign-in is matched to the same row and an authorization code issued before the delete cannot be redeemed after it. |
client_notification_prefs table |
One row per category you explicitly decided (product_updates, maintenance, security), with the state, the time you decided, and which surface you used. No row is written for a default you never changed. |
Records consent per category, so operational notices are never counted as marketing consent | Removed by account deletion. A preference grants no Telegram or MCP access. |
client_bot_reachability table |
Whether the login bot may currently start a chat with you (unknown, reachable, blocked, cannot_initiate), when that was observed and from which delivery, /start, or sign-in permission. No message content and no Telegram API response body. |
Learned only from the outcome of a message actually sent to you, your /start, or a sign-in permission Telegram reports; no message is ever sent merely to test reachability | Removed by account deletion |
telegram_accounts table |
AES-256-GCM ciphertext of your MTProto session blob using a per-user derived key, plus account metadata and feature/send flags | Required to make Telegram API calls on your behalf | Until disconnect or deletion, which erase it and ask Telegram to end the session. A newer sign-in also erases the session it replaced and asks Telegram to end it. A session revoked for a TTL or because Telegram rejected the key is only erased. |
incoming_events and conversation_messages |
Communication Agent event metadata and third-party Telegram message bodies. Message bodies are AES-256-GCM encrypted before storage. | Durable ingestion, deduplication, queue recovery, conversation context, and owner takeover handling | Encrypted bodies/context: AGENT_RETENTION_DAYS, default 30 days. Event metadata remains as a deduplication tombstone until account deletion. Setting retention to 0 keeps content indefinitely. |
agent_actions |
Proposed reply/action payloads, policy decision and reasons, approval state, and execution metadata. Sensitive payload text is encrypted at rest. | Server-side policy enforcement, human approval, and exactly-once-oriented execution bookkeeping | Encrypted draft/send content and approval capabilities: AGENT_RETENTION_DAYS, default 30 days. Old inactive pre-send actions are denied before content is cleared; executing actions retain recovery data until terminal. Lifecycle metadata remains until account deletion. |
audit_logs table |
Tool/action name, redacted peer reference, status, and a redacted error string. No message body, phone number, bearer token, or session bytes. | Operational visibility, abuse detection, and user-visible audit history | Default 90 days via AUDIT_RETENTION_DAYS; 0 keeps rows indefinitely. Account deletion does not remove these rows: they stay until that window ends. They are not encrypted. |
| Process memory | Plaintext Telegram messages, decrypted agent content, tool arguments, and tool results while a request, listener update, policy evaluation, or queue job is being processed | Required to fulfill the request or agent workflow | Released after processing; the running process/operator can access it while present |
| Process stdout (Loki) | Structured JSON log lines from slog, with message/body/payload and credential keys redacted |
Operator debugging | Per the platform's Loki retention (typically 14–30 days) |
job_leads |
Job leads the Communication Agent records from your conversations: company, role, recruiter name and Telegram ID, compensation, status, and other details. Encrypted with your per-user key, except the status. | Tracking the leads the agent handles for you | 90 days after the lead was last updated, or until account deletion if that comes first (AGENT_LEAD_RETENTION_DAYS). |
oauth_refresh_tokens |
A hash of each refresh token, the client's ID, name and redirect address, your Telegram ID and username, the granted scope, and issue, expiry and revocation times | Keeps your MCP client connected | Revoked by account deletion. The row is removed after the token expires. |
local_bridge_devices |
Device ID and label, registration and last-seen times, and revocation details | Local Bridge device management | Revoked by account deletion, and the row is kept as a revoked record |
worker_token_revocations |
Your Telegram ID, token ID, revocation time and reason | Makes sure a revoked worker token stays refused | Kept after account deletion |
user_acquisition |
The sign-up record described under Sign-up attribution | Learning how people find the service | Removed by account deletion |
| Database backups | Copies of the database, including the tables above | Disaster recovery | 14 days. Data deleted from the database can stay in a backup until then. |
This table covers the main stores, not every internal table.
What is NOT stored in logs or audit history
- Plaintext Telegram message bodies or proposed reply payloads in
audit_logsor process stdout - Your phone number after interactive login
- Your Telegram cloud password / 2FA digits
- Raw MTProto session bytes (hosted mode stores only AES-GCM ciphertext)
- The contents of
Authorization: Bearerheaders - Your IP address in the service database (the platform ingress may keep normal L4/L7 access logs)
When Communication Agent is enabled, message content is stored in encrypted agent tables as described above. The previous “message text is never written to disk” guarantee applies only to ordinary read-tool responses and audit/logging paths, not to the durable agent workflow.
Website analytics
To learn how many people visit tg.mctl.ai and where they come from, the public content pages (home, docs, demo, security, privacy, terms, platforms, assistants, Local Bridge docs, and product updates) load Umami, an open-source analytics tool that we host ourselves at stats.mctl.ai. No analytics data is sent to a third party. Umami itself sets no cookies (this service sets one separate sign-up attribution cookie, described below). For each page view it records the page address (including campaign parameters such as utm_source), the referring site, browser, operating system, device type, screen size, language, and country, region, and city derived from your IP address. Your IP address and user agent are used to compute an anonymous visitor identifier; the IP address itself is not stored.
The sign-in, consent, connect, and account-management pages under /oauth, /telegram/connect, and /local-bridge/activate do not load Umami, and no Telegram data, tool call, token, or account identifier is ever sent to it. Page-view records are deleted automatically 2 years after they were recorded.
Sign-up attribution
When you create your account, the connect screen asks “How did you hear about us?”. The answer is optional, and you pick it from a fixed list. One record is stored with your answer, if you gave one, the type of AI client you connected from (for example Claude or ChatGPT), and the time. The service sets no cookie for this and stores no IP address, user agent, or other fingerprint for it. The record is deleted when you delete your account.
The record of an account created earlier may also hold the campaign parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term), referring host name and landing page path that a first-party cookie, mctl_acq, carried at sign-up. That cookie is no longer set.
Communication Agent controls
- The listener is active only for profiles explicitly marked as listener-enabled.
- Only explicit
/mctl ...commands from Saved Messages are retained as control commands; ordinary personal notes are ignored. - Disabling the listener removes the runtime account and immediately stops its pinned Telegram client.
- A human reply marks the conversation as
taken_over, preventing autonomous continuation under the server-side policy. This is sticky and only reversible via an explicit/mctl continue <conversation id>command from the owner. observemode requires approval for replies;guardedmode remains subject to server-side policy, limits, blocked senders, disclosure checks, and the global kill switch. Agent replies carry an AI disclosure line unless the account owner explicitly turns it off.
Self-service controls
You can remove account access and inspect what was recorded without operator involvement. Disconnect and delete require a connection granted account:manage; read-only connections, worker tokens, and Local Bridge device credentials are refused with 403, and the refusal is recorded in your audit log. On tg.mctl.ai, you can still disconnect from the manage page after signing in with Telegram.
POST /api/account/disconnect # end Telegram session; OAuth grant kept DELETE /api/account # delete account/session row and user-scoped data; revoke OAuth refresh tokens, worker tokens, and Local Bridge devices GET /api/account # connection status + feature/send flags GET /api/account/audit # newest-first audit rows (limit, before) GET /api/account/audit/verify # recompute the audit hash chain
Notification preferences are part of the same self-service surface:
GET /api/account/notifications # resolved preference per category PUT /api/account/notifications # change one or more categories
They can also be changed in the browser at /telegram/connect/manage after signing in with Telegram, which submits a plain HTML form and needs no JavaScript. Reading or changing them through the API, and turning one on in the browser, requires a connection granted account:manage; after signing in with Telegram you can always turn notifications off there. Product updates stay off until you turn them on; maintenance and security are classified as operational notices and are never treated as marketing consent.
Equivalent MCP tools include disconnect_telegram_account, delete_telegram_account, get_my_audit_log, get_my_notification_preferences, and set_my_notification_preferences. All of them except get_my_audit_log require account:manage and are listed only to connections granted it. Disconnect/delete also tear down the in-memory MTProto client so a concurrent request cannot continue using a revoked session.
Who can access your data
- You, through authenticated MCP tools and account endpoints.
- Your MCP client provider, for prompts, tool arguments, and tool results that pass through that client.
- The deployment operator, who has infrastructure and database access. Sensitive database columns are encrypted, but an operator who also controls the running service and encryption key can decrypt them.
- Anyone who compromises the running pod could read sessions and message content in memory or use the service's decryption capabilities. Hosted mode is not zero-knowledge.
Third parties
- Telegram (transport and identity) — the connected account uses Telegram MTProto, and sign-in uses Telegram OIDC.
- Your MCP client provider — for example, Anthropic or OpenAI — processes the conversation and tool traffic you send through that product.
- Hetzner (hosting) — the service and its database run on Hetzner Cloud servers.
- Cloudflare (network and backups) — traffic to tg.mctl.ai passes through Cloudflare, which can read it while forwarding it. Database backups are stored in Cloudflare R2.
- Google Fonts — public content pages load web fonts from Google, so your browser sends your IP address to Google when you open them.
- Anthropic (AI model) — when Communication Agent is enabled, the Claude model that runs it receives the Telegram messages and context it works on, in readable form. Our test environment uses Nebius, reached through Cloudflare AI Gateway, instead.
- Nebius (AI model, through Cloudflare AI Gateway) — when you use the personal assistant bot and accept its data-flow consent (
pa-data-flow/v1), the messages you write to it, the text you forward, reply to or quote there, and the results it reads from services you connect are sent through Cloudflare AI Gateway to Nebius, the AI model provider that generates its answers, in readable form. Both process it under their API terms. A conversation is kept on our servers for at most 24 hours;/forgetdeletes it sooner and/consent withdrawstops the assistant. - No advertising or third-party analytics is injected by this service. Public content pages count visits with Umami, which we host ourselves (see Website analytics). OAuth/session-management pages use strict CSP and load no analytics; public content pages load the mctl design stylesheet and web fonts for presentation.
Contact
This service is operated by Dmitrii Mashkov.
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.