Telethon Plus logo

Telethon Plus

Self-hosted Telegram userbot access over JSON HTTP and MCP, using Telethon with session-based account authentication.

Install Telethon Plus

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
http://your-host:8080/mcp/

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

Telethon Plus MCP server exposes a Telegram user account through Telethon, JSON HTTP endpoints, and a Streamable HTTP MCP endpoint. It uses Telegram’s MTProto protocol and shares one asynchronous client and tool registry across both access methods. Configure Telegram API credentials and a session string, then use it for account-level messaging, entity resolution, dialogs, files, and chat operations. Reach for it when an agent or HTTP client needs to act as a user account rather than through Telegram’s Bot API.

Use cases

  • Send Telegram messages or files from an MCP-aware agent
  • Read messages and dialogs through JSON HTTP
  • Resolve usernames before addressing Telegram entities
  • Join chats or create groups and channels
  • Automate Telegram account actions with a self-hosted service

Key features

  • Streamable HTTP MCP endpoint
  • JSON HTTP API
  • Telethon MTProto user account access
  • Session-string authentication
  • Request validation with Pydantic
  • Throttling, adaptive backoff, and entity caching

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 77d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
Last commit19d agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Telethon Plus works

What Telethon Plus does

The Telethon Plus MCP server connects Telegram user accounts to MCP-aware agents and ordinary HTTP clients. It wraps Telethon, a Telegram MTProto client, and exposes the account through two interfaces: a JSON HTTP API under /api/... and a Streamable HTTP MCP endpoint at /mcp.

Both interfaces use the same Telethon client and registered operations. This keeps authentication and runtime state in one place rather than maintaining separate Telegram connections. Requests and responses use JSON; inputs are validated with Pydantic, and validation failures return HTTP 400 responses.

How it works

Telegram access requires an API ID, API hash, and Telethon session string. The session represents an already authenticated account, so the service can continue using the account without requesting a login code on every start. A one-time login command handles phone verification, an SMS code, and optional two-factor authentication, then produces the session string.

An MCP-capable agent sends requests to /mcp, while scripts and other clients can call the REST-style endpoints directly. Chat references may use usernames, phone numbers, t.me links, numeric IDs, supergroup or channel IDs, or me for Saved Messages.

Setup and configuration

The supplied Docker image listens on port 8080 by default. A minimal deployment sets TELETHON_API_ID, TELETHON_API_HASH, and TELETHON_SESSION, then publishes the container port. The login helper can be run interactively before starting the service.

Optional settings control the listen address, log level, request timeout, device metadata, file-upload scratch directory, and bearer-key authentication. Set TELETHON_AUTH_KEY to require Authorization: Bearer <key> on endpoints; /healthz remains public.

The service also provides throttling, adaptive backoff, and an entity cache. The cache can be persisted by mounting /cache, and its expiry can be configured with environment variables. These controls are relevant when an agent performs repeated reads, username resolution, joins, sends, or other rate-limited operations.

Tools and capabilities

The Telethon Plus MCP server provides the same operation set through MCP and HTTP. Documented operations include reading messages and dialogs, resolving usernames and other entities, retrieving full channel or user information, listing participants, sending files, joining chats, and creating channels or groups. Telegram responses are returned directly for successful requests rather than inside a result envelope.

Chat and account actions run with the permissions of the configured Telegram user. Telegram RPC failures are surfaced as HTTP 502 responses containing the Telegram error and message.

Limitations and notes

The session string grants full access to the associated Telegram account and must be protected like a credential. Do not commit it to source control or expose it in logs or chat.

A numeric Telegram ID is not always sufficient: Telethon also needs the entity’s access hash. Numeric references work for entities already known to the session through an earlier lookup, dialog listing, or incoming message. Resolve a username or link first when necessary.

Telegram may rate-limit or ban accounts that generate excessive traffic. The included throttling and cache defaults reduce that risk, but they do not remove Telegram’s limits. The service is intended for a user account using MTProto, not a Telegram Bot API token.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Telethon Plus

Telethon Plus is an MCP server that connects an AI agent or HTTP client to a Telegram account through Telethon and MTProto. Its shared tool surface supports account-level Telegram operations, including sending files, reading messages and dialogs, resolving entities, and joining or creating chats through MCP or JSON HTTP.

Run it with the provided Docker image and set TELETHON_API_ID, TELETHON_API_HASH, and TELETHON_SESSION. Publish port 8080, or change the listen address with configuration. For a new session, run the image’s interactive login command, complete Telegram verification, and store the generated session string.

Set TELETHON_API_ID and TELETHON_API_HASH to values obtained from my.telegram.org/apps, then set TELETHON_SESSION to a session string generated by the login helper. These three variables are required for the service to use a Telegram account.

Yes. Telethon Plus exposes JSON HTTP endpoints under /api/... and a Streamable HTTP MCP endpoint at /mcp. Both surfaces share the same Telethon client and tool registry, so HTTP clients and MCP agents use the same account state.

Set TELETHON_AUTH_KEY to require a bearer token on service endpoints. Clients must send Authorization: Bearer <key>; /healthz remains public. Protect the Telegram session string as a full-account credential and avoid storing it in source control or logs.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTelethon Plus AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/telethon-plus?style=directory)](https://allmcps.com/mcp/telethon-plus)
HTML Embed
<a href="https://allmcps.com/mcp/telethon-plus"><img src="https://allmcps.com/api/badge/telethon-plus?style=directory" alt="Telethon Plus on AllMCPs" /></a>