MCTL
For agent platforms

Connect your users to Telegram

This page is for agent platforms and MCP gateways that connect many users to https://tg-preview.mctl.ai/mcp. It covers how a client is admitted, what it may do, the limits it runs under, and how access ends. The limits and the CIMD status below are read from this deployment's running configuration.

Who this is for

A platform that lets its own users bring a Telegram account into an AI agent: one OAuth client on your side, one Telegram sign-in per user, each user's access confined to their own account. Individual users connecting Claude or ChatGPT need none of this page; the landing page and /docs cover them.

Admitting your client

A platform's host is approved by the operator once. After that, every one of its users connects without further setup on either side. There are two ways in:

Client ID Metadata Document (preferred)

A minimal document for private_key_jwt, served at its own client_id URL:

{
  "client_id": "https://platform.example/oauth/client-metadata.json",
  "client_name": "Example Platform",
  "redirect_uris": ["https://platform.example/oauth/callback"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "private_key_jwt",
  "token_endpoint_auth_signing_alg": "ES256",
  "jwks_uri": "https://platform.example/oauth/jwks.json"
}

For a public client, set token_endpoint_auth_method to none and leave out the last two fields.

On this deployment: CIMD is accepted for approved hosts. Discovery advertises it (client_id_metadata_document_supported).

Dynamic Client Registration

Try it before approval

Host approval is not needed to evaluate the service. Dynamic Client Registration accepts a loopback redirect such as http://127.0.0.1:8765/callback on any port, so an engineer can register a client from a local machine and sign in with their own Telegram account. New accounts on this deployment start without tool access: ask [email protected] to enable the account you will test with. Redirects on your own domain, and any CIMD client_id, need the host approved.

To have a host approved, write to [email protected] with:

Hosts and clients today

Status words follow the compatibility matrix. An admitted host is not a verified client.

Not on the list? Send the details below to [email protected].

Endpoints and discovery

PurposeEndpoint
MCP (Streamable HTTP)https://tg-preview.mctl.ai/mcp
Protected resource metadata (RFC 9728)https://tg-preview.mctl.ai/.well-known/oauth-protected-resource
Authorization server metadata (RFC 8414)https://tg-preview.mctl.ai/.well-known/oauth-authorization-server
Authorize, token, revoke (RFC 7009), register/oauth/authorize, /oauth/token, /oauth/revoke, /oauth/register

Authorization code with PKCE S256 only. Users sign in with Telegram's own OpenID Connect provider; your platform never sees a phone number or a login code.

Scopes and consent

ScopeGrants
telegram:dialogs:readList chats (list_dialogs)
telegram:messages:readRead, search and fetch media (get_messages, get_unread_messages, search_messages, prepare_get_media, get_media)
telegram:messages:sendSend messages and media, edit, delete, forward and react, and the two-step draft_reply/send_reply on core-reply connections, all subject to the user's own consent below
telegram:messages:pinPin messages, through a confirmation step
account:manageThe user's own account: send consent, notifications, Local Bridge devices, disconnecting and deleting the account

Restricted tool profiles

On request, the operator can bind your client to a server-side tool profile. Profiles only restrict tools within the granted scopes and are enforced on every tool call (not just in tools/list):

A binding matches your CIMD client_id or a redirect URI; ask at [email protected]. Details: docs/design/core-profiles.md.

Limits on this deployment

LimitValue
Tool calls per user30 per minute
Sends to one recipient200 per hour
Cleanup in one chat (delete, unreact, unpin)200 per hour
Access token lifetime1 hour
Refresh token lifetime30 days, rotated on every use; reusing a rotated token revokes the whole family
Media download11 MiB per file
Media upload (send_media)20 MiB per file
Inline media in one read call (fetch_media=true)8 MiB in total
Read page size50 items by default, up to 200 (search: 20, up to 100)

Limits are per Telegram user, not per platform, so one busy user does not slow down the rest. Telegram's own flood limits apply on top and surface as errors with a retry delay.

The tool surface is a contract

Reliability

Objective (28-day window)Target
Tool call availability99.5%
OAuth token endpoint availability99.9%
Read tool latencyp95 under 2 s, p99 under 5 s
Send latencyp95 under 4 s

These are internal objectives with burn-rate alerting, not a contractual SLA. A canary checks OAuth discovery and a read-only tool call every 10 minutes. The service runs as a single replica, so a deploy is a short interruption. Retry token requests and read tools with backoff when the connection drops or the server is briefly unavailable; Telegram flood limits arrive as tool errors with their own retry delay (see below). Do not blindly retry a send whose outcome you did not see: send_message, send_media and forward_messages are not idempotent, so re-read the chat first. send_reply is the exception: its confirmation token sends at most once, so repeating it with the same token cannot send twice.

To be published: a public status page and the terms of a service-level agreement for platforms.

Errors your client will see

docs/troubleshooting.md lists the error families clients actually hit, with the fix for each: expired access tokens, a revoked Telegram session (AUTH_KEY_UNREGISTERED), Telegram flood limits, redirect URI refusals and transient Telegram failures.

Revocation and offboarding

Bring your own session: Local Bridge

For users or companies that will not leave a Telegram session on a hosted server, Local Bridge keeps it on the user's machine. The user installs mctl-telegram-local, signs in to Telegram locally and activates the device in a browser; your platform keeps the same endpoint and the same OAuth client. The server then relays MCP calls to that machine and sees the payloads in transit, so it is not end-to-end encryption. Local Bridge is in beta: the daemon must be running, and editing, deleting, forwarding, searching, reactions and the draft_reply/send_reply pair are not yet available in this mode.

Who runs this service

MCTL Assistant is an unofficial third-party connector using the Telegram API, and an independent open-source project, not affiliated with Telegram, Anthropic or OpenAI. The source is at github.com/mctlhq/mctl-telegram.

To be published: the operating legal entity, its jurisdiction and governing law, data location, and the list of subprocessors.

Contact