Telethon Plus
What it does
Self-hosted MCP server: Telegram userbot control (Telethon) via HTTP and MCP.
- Connects パソコンで動く
- Account or key No key needed
- Category チャット・メール
インストール
使っているAIアプリを選んで、設定をコピーしてください。
チェック 2/2 合格 · あなたのパソコンで動きます
まず:どの AI を使っていますか?
使っているアプリを選ぶと、下に手順が表示されます。
Claude につなげますが、先に準備が必要です
先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
パソコン版 Claude アプリの設定ファイルを開く
SettingsDeveloperEdit Config
この設定を貼り付けて保存
{ "mcpServers": { "telethon-plus": { "command": "docker", "args": [ "run", "-i", "--rm", "docker.io/psyb0t/telethon-plus:v0.7.4" ] } } }Claude を終了してもう一度開く
試してみる
Telethon Plus を使って、私に何ができるか教えて、1 つやってみせて✓ Claude が Telethon Plus を使っていると言うか、回答に Telethon Plus のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
ChatGPT はまだ Telethon Plus につなげません
Telethon Plus はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません
代わりにできること
A · Telethon Plus につなげるアプリを使う
- 先にパソコンへ Docker を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
- 先にパソコンへ Docker を入れてください(1 回だけ)
- 先にパソコンへ Docker を入れてください(1 回だけ)
- 先にパソコンへ Docker を入れてください(1 回だけ)
B · チャット・メール の中で ChatGPT につなげる別のサーバー
同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました
- Inbox Zero✓ ChatGPT
- draw.io✓ ChatGPT
- TradingMCP✓ ChatGPT
Claude Code につなげますが、先に準備が必要です
先にパソコンへ Docker を入れてください(1 回だけ)
ターミナルを開く
Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く
このコマンドを貼り付けて Enter
claude mcp add --scope user telethon-plus -- docker run -i --rm docker.io/psyb0t/telethon-plus:v0.7.4Claude Code で /mcp と入力
Telethon Plus が一覧にあり、接続済みと表示されれば OK です
試してみる
Telethon Plus を使って、私に何ができるか教えて、1 つやってみせて✓ Claude Code が Telethon Plus を使っていると言うか、回答に Telethon Plus のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Cursor につなげますが、先に準備が必要です
先にパソコンへ Docker を入れてください(1 回だけ)
Cursor の AI チャットを Agent モードで開く
試してみる
Telethon Plus を使って、私に何ができるか教えて、1 つやってみせて✓ Cursor が Telethon Plus を使っていると言うか、回答に Telethon Plus のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
VS Code につなげますが、先に準備が必要です
先にパソコンへ Docker を入れてください(1 回だけ)
VS Code の AI チャットを Agent モードで開く
試してみる
Telethon Plus を使って、私に何ができるか教えて、1 つやってみせて✓ VS Code が Telethon Plus を使っていると言うか、回答に Telethon Plus のツール名が出れば接続成功です
メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります
Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください
JSON 設定は下の「開発者向け」にあります
開発者向け:ターミナルのコマンドと JSON 設定
パソコンにインストール
Claude Code
claude mcp add --scope user telethon-plus -- docker run -i --rm docker.io/psyb0t/telethon-plus:v0.7.4Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"telethon-plus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/telethon-plus:v0.7.4"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"telethon-plus": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/telethon-plus:v0.7.4"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"telethon-plus": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/telethon-plus:v0.7.4"
]
}
}
}この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
ひと目でわかる
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月12日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント psyb0t で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:一昨日
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
話し合い
質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。
ユーザーレビュー
まだレビューはありません
チャット・メールのほかのサーバーとの比較i
- このカテゴリのほかの1975件のうち93%よりスターが多い
- このカテゴリのほかの1975件のうち89%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの1975件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Telethon Plusは安全ですか?
当てはまる基本チェック2項目のうち2項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は一昨日、最新バージョン(0.7.4)がレジストリに届いたのは一昨日です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにDockerも必要です。
代わりに使えるものは?
同じカテゴリには:Inbox Zero, draw.io, TradingMCP
同じカテゴリのほかの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
draw.io
Create draw.io diagrams in chat from Mermaid or XML, shown live and interactive. 10,000+ shapes.
TradingMCP
Market analysis for AI assistants: screeners, multi-timeframe analysis, backtests, in-chat charts.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
docker-telethon-plus
Your Telegram account, but it takes HTTP requests. Wraps Telethon — the real MTProto userbot client, not that neutered Bot API garbage — behind a JSON HTTP API and a Model Context Protocol endpoint.
Same tools, two doors. POST some JSON, or point your AI agent at /mcp and let it go nuts. Either way it's talking to Telegram as *you*, with full account access.
One login. One session string. Never type a code again.
Table of Contents
- How it works
- Quick start
- First-time login
- Configuration
- Tools
- HTTP API
- MCP
- Agent integrations
- Development
- Tests
- License
How it works
+-------------------+ +-----------------------+
| Any HTTP client | -----> | REST /api/... | --+ +-------------------+ +-----------------------+ | | +-----------+ Telegram +-------------------+ +-----------------------+ +-> | Telethon | <----> Servers | MCP-aware agent | -----> | /mcp (Streamable | --+ +-----------+ (MTProto) | (Claude, etc.) | | HTTP transport) | +-------------------+ +-----------------------+
One Telethon client. One async lock. Both surfaces share the same tool registry — no duplication, no weird state, no bullshit.
Quick start
services:
telethon-plus: image: psyb0t/telethon-plus ports:
- "8080:8080" environment: TELETHON_API_ID: "123456" TELETHON_API_HASH: "your-api-hash" TELETHON_SESSION: "1Aa...long-string-from-login-helper..." restart: unless-stopped
Get API_ID / API_HASH from https://my.telegram.org/apps. Get the session string from the login helper below.
First-time login
Telegram makes you prove you're a human once — phone number, SMS code, optionally 2FA. Do it once, never again.
cp .env.example .env
$EDITOR .env # put in TELETHON_API_ID and TELETHON_API_HASH
make login
make login builds the image, runs the interactive flow, and shoves TELETHON_SESSION straight into your .env. That's it. Run make run and you're live.
No repo? No problem:
docker run --rm -it \
-e TELETHON_API_ID=123456 \ -e TELETHON_API_HASH=your-api-hash \ psyb0t/telethon-plus login
Copy the session string it spits out, set it as TELETHON_SESSION, done.
The session string is full account access. Whoever has it is you. Don't commit it, don't paste it in Slack, don't tattoo it anywhere.
Configuration
All config via environment variables. Copy .env.example to get the full list with comments.
| Variable | Required | Default | Description |
|---|---|---|---|
TELETHON_API_ID | yes | — | API ID from my.telegram.org |
TELETHON_API_HASH | yes | — | API hash from my.telegram.org |
TELETHON_SESSION | yes | — | StringSession from the login helper |
TELETHON_HTTP_LISTEN_ADDRESS | no | 0.0.0.0:8080 | host:port to bind |
TELETHON_LOG_LEVEL | no | INFO | DEBUG, INFO, WARNING, ERROR |
TELETHON_REQUEST_TIMEOUT | no | 60 | Per-request timeout in seconds |
TELETHON_FLOOD_SLEEP_THRESHOLD | no | 60 | Auto-sleep through FLOOD_WAIT errors below this many seconds. Telegram will rate-limit you — this is the safety valve. |
TELETHON_DEVICE_MODEL | no | docker-telethon-plus | What Telegram thinks your device is |
TELETHON_SYSTEM_VERSION | no | 1.0 | Ditto for OS |
TELETHON_APP_VERSION | no | 1.0 | Ditto for app |
TELETHON_DOWNLOAD_DIR | no | /tmp/telethon-plus | Scratch space for send_file uploads |
TELETHON_AUTH_KEY | no | "" | When set, all endpoints require Authorization: Bearer . /healthz stays public. Empty = no auth. |
Throttling & cache (anti-flood)
Telegram bans accounts that hammer it. Defaults here are conservative — meant to keep you under the server-side limits without you having to think about it. Tune only if you know what you're doing.
| Variable | Default | What it does |
|---|---|---|
TELETHON_THROTTLE_ENABLED | true | Master switch for all rate-limiting below |
TELETHON_THROTTLE_GLOBAL_INTERVAL_MS | 50 | Min gap between any two outgoing requests |
TELETHON_THROTTLE_JITTER_MS | 200 | Random ±jitter added on top (kills metronome traffic patterns) |
TELETHON_THROTTLE_PER_CHAT_INTERVAL_MS | 1100 | Min gap between sends to the same chat (Telegram's "1/sec/chat" ceiling, with margin) |
TELETHON_THROTTLE_PER_CHAT_READ_INTERVAL_MS | 250 | Min gap between reads from the same chat. Stops single-channel scraping from monopolizing the read bucket. |
TELETHON_THROTTLE_ADAPTIVE | true | On each FLOOD_WAIT, multiply all waits ×2 for an hour. Resets after a quiet hour. |
TELETHON_BUCKET_RESOLVE_PER_MIN | 5 | Cap on resolveUsername — the main thing that gets accounts 22-hour-banned |
TELETHON_BUCKET_GET_FULL_PER_MIN | 10 | Cap on getFullChannel / getFullUser / get_participants |
TELETHON_BUCKET_JOIN_PER_HOUR | 5 | Cap on channel/group joins |
TELETHON_BUCKET_CREATE_PER_HOUR | 5 | Cap on channel/group creation |
TELETHON_BUCKET_SEND_PER_MIN | 20 | Cap on sends across all chats |
TELETHON_BUCKET_READ_PER_MIN | 600 | Cap on read ops. Counted per server-side API call, not per tool call: get_messages(limit=300) charges 3 slots (Telegram caps GetHistory at 100/page); get_dialogs(limit=500) similarly charges 5. |
TELETHON_CACHE_ENABLED | true | Persist resolved entities to disk |
TELETHON_CACHE_PATH | /cache/entities.json | Mount /cache as a host volume to keep this across rebuilds |
TELETHON_CACHE_TTL_SECONDS | 604800 | 7 days. Set 0 for no expiry. |
TELETHON_FLOOD_SLEEP_THRESHOLD | 60 | Telethon's reactive auto-sleep: if a FLOOD_WAIT is shorter than this many seconds, sleep through it. Above this, raise. Set very high (e.g. 86400) to never raise — but then a hostile FLOOD_WAIT will block your process for the full duration. |
How the layers stack:
- Entity cache short-circuits resolveUsername — first lookup of
@somechannelcalls Telegram; every subsequent lookup is free. Survives container restarts via the/cachevolume. - Per-method token buckets cap the dangerous methods. If you try to resolve 6 new usernames in one minute, the 6th sleeps until the oldest expires.
- Per-chat send interval throttles sends to each chat to ≤1/sec (with margin).
- Global gap + jitter humanizes the overall traffic shape.
- Adaptive backoff: a single FLOOD_WAIT halves your effective rate for an hour. Three in a row → ÷8. Auto-recovers after an idle hour.
For bulk scraping work (the scenario that caused 22-hour bans before): the cache + bucket_resolve_per_min=5 combination is what saves you. Resolving 200 new channels takes ~40 minutes instead of getting you banned in 5.
Tools
JSON in, JSON out. All inputs are pydantic-validated — send garbage, get a 400 back with exactly what's wrong.
Chat references (chat, from_chat, to_chat) accept whatever Telethon accepts:
| Format | Example |
|---|---|
| Username | @psyb0t |
| Phone number | +1234567890 |
| t.me link | https://t.me/psyb0t |
| Numeric ID | 123456789 |
| Supergroup/channel ID | -1001234567890 |
| Your own Saved Messages | me |
Numeric IDs only resolve for entities Telethon has already seen — i.e. cached in your session via a prior
@username/t.melookup, dialog list, or incoming message. MTProto needs anaccess_hash, not just an ID, and bare numbers don't carry one. Especially relevant for bots: pass@botusernamefirst (or callGET /api/dialogs/GET /api/entities?chat=@botonce) before referring to it by numeric ID. If you only have the bot's token and no username, hit Telegram's Bot APIgetMeto fetch the username, then use that.
Response shape
Every 2xx returns the resource directly. No {"result": ...} wrapper, no envelope. Lists are JSON arrays, singles are JSON objects.
Errors return {"detail": "..."} (FastAPI standard). Telegram RPC errors arrive as 502 with detail = {"telegram_error": "...", "message": "..."}.
Quick reference
| Endpoint | Required params | What it does |
|---|---|---|
GET /api/me | — | Account profile. |
GET /api/entities | chat | Resolve a username/ID/link to a profile. |
POST /api/entities/bulk | chats | Bulk resolve, honoring the resolve-username bucket. |
GET /api/dialogs | — | List dialogs. Optional: limit, archived, search (substring on title/@). |
GET /api/messages | chat | Read recent messages. Optional: limit, offset_id, search. |
GET /api/messages/{id} | chat | Fetch a single message. |
GET /api/messages/{id}/media | chat | Download attachment as raw bytes (binary stream). Returns Content-Type from Telegram + Content-Disposition: attachment; filename=.... Optional: max_bytes. MCP clients should use the download_media tool which returns base64. |
POST /api/messages | chat, `text` or `file_url` | Send a message. If file_url is present, fetches it and sends as media (with text as caption). Otherwise sends text. Optional: parse_mode, reply_to, silent, link_preview, schedule, force_document, max_bytes. |
POST /api/messages/forward | from_chat, to_chat, message_ids | Forward messages. |
POST /api/messages/read | chat | Mark as read. Optional max_id. |
PATCH /api/messages/{id} | chat, text | Edit. |
DELETE /api/messages | chat, message_ids | Bulk delete (body has the list). |
POST /api/messages/{id}/pin | chat | Pin. Optional silent, pm_oneside. |
POST /api/messages/{id}/unpin | chat | Unpin. |
POST /api/messages/{id}/reactions | chat, emoji | React. Optional big. |
DELETE /api/messages/{id}/reactions | chat | Remove your reaction. |
GET /api/participants | chat | List members. Optional: limit, search. |
POST /api/chats | title | Create supergroup or channel. |
DELETE /api/chats | chat | Delete supergroup/channel you own (body). |
POST /api/chats/join | chat | Join public channel/group. |
POST /api/chats/invite | invite | Join via private t.me/+hash. |
POST /api/chats/leave | chat | Leave. |
GET /api/chats/{chat}/linked | — | Resolve a channel's linked discussion group. |
POST /api/chats/{chat}/admin/ban | user | Ban a user. Optional until_seconds. |
POST /api/chats/{chat}/admin/unban | user | Lift a ban. |
POST /api/chats/{chat}/admin/kick | user | Kick (ban + immediate unban). |
POST /api/chats/{chat}/admin/promote | user | Grant admin rights + optional title. |
POST /api/chats/{chat}/admin/demote | user | Strip admin rights. |
POST /api/polls | chat, question, options | Create a poll. Optional quiz, correct_option, solution. |
POST /api/polls/{id}/vote | chat, options | Vote (0-based indices). |
GET /api/polls/{id}/results | chat | Current vote counts. |
GET /api/throttle/status | — | Live rate-limit + cache state. |
GET /api/account/health | — | Flood-risk tier. |
| `GET /metrics