ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Telegram MCP Server

โดย tolboyรุ่น 1.19.1i★ –iรันบนเครื่อง
ชื่อใน registryio.github.tolboy/telegram-mcp-tdlib

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Local-first TDLib Telegram MCP server with 126 tools, account isolation and production guardrails.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: แชตและอีเมล
  • ต้องใส่ค่าเหล่านี้: TDLIB_API_ID, TDLIB_API_HASH, TDLIB_PHONE_NUMBER, TDLIB_AUTH_CODE, TDLIB_2FA_PASSWORD

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: TDLIB_API_ID, TDLIB_API_HASH, TDLIB_PHONE_NUMBER, TDLIB_AUTH_CODE, TDLIB_2FA_PASSWORD, MCP_READ_ONLY, MCP_TOOL_PROFILE

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • Dockerติดตั้ง Docker ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "telegram-tdlib": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TDLIB_API_ID",
        "-e",
        "TDLIB_API_HASH",
        "-e",
        "TDLIB_PHONE_NUMBER",
        "-e",
        "TDLIB_AUTH_CODE",
        "-e",
        "TDLIB_2FA_PASSWORD",
        "-e",
        "MCP_READ_ONLY",
        "-e",
        "MCP_TOOL_PROFILE",
        "ghcr.io/tolboy/telegram-mcp-tdlib:1.19.1-stdio"
      ],
      "env": {
        "TDLIB_API_ID": "ใส่ค่าของคุณ",
        "TDLIB_API_HASH": "ใส่ค่าของคุณ",
        "TDLIB_PHONE_NUMBER": "ใส่ค่าของคุณ",
        "TDLIB_AUTH_CODE": "ใส่ค่าของคุณ",
        "TDLIB_2FA_PASSWORD": "ใส่ค่าของคุณ",
        "MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "MCP_TOOL_PROFILE": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add telegram-tdlib --env TDLIB_API_ID='ใส่ค่าของคุณ' --env TDLIB_API_HASH='ใส่ค่าของคุณ' --env TDLIB_PHONE_NUMBER='ใส่ค่าของคุณ' --env TDLIB_AUTH_CODE='ใส่ค่าของคุณ' --env TDLIB_2FA_PASSWORD='ใส่ค่าของคุณ' --env MCP_READ_ONLY='ใส่ค่าของคุณ' --env MCP_TOOL_PROFILE='ใส่ค่าของคุณ' -- docker run -i --rm -e TDLIB_API_ID -e TDLIB_API_HASH -e TDLIB_PHONE_NUMBER -e TDLIB_AUTH_CODE -e TDLIB_2FA_PASSWORD -e MCP_READ_ONLY -e MCP_TOOL_PROFILE ghcr.io/tolboy/telegram-mcp-tdlib:1.19.1-stdio

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "telegram-tdlib": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TDLIB_API_ID",
        "-e",
        "TDLIB_API_HASH",
        "-e",
        "TDLIB_PHONE_NUMBER",
        "-e",
        "TDLIB_AUTH_CODE",
        "-e",
        "TDLIB_2FA_PASSWORD",
        "-e",
        "MCP_READ_ONLY",
        "-e",
        "MCP_TOOL_PROFILE",
        "ghcr.io/tolboy/telegram-mcp-tdlib:1.19.1-stdio"
      ],
      "env": {
        "TDLIB_API_ID": "ใส่ค่าของคุณ",
        "TDLIB_API_HASH": "ใส่ค่าของคุณ",
        "TDLIB_PHONE_NUMBER": "ใส่ค่าของคุณ",
        "TDLIB_AUTH_CODE": "ใส่ค่าของคุณ",
        "TDLIB_2FA_PASSWORD": "ใส่ค่าของคุณ",
        "MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "MCP_TOOL_PROFILE": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "telegram-tdlib": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TDLIB_API_ID",
        "-e",
        "TDLIB_API_HASH",
        "-e",
        "TDLIB_PHONE_NUMBER",
        "-e",
        "TDLIB_AUTH_CODE",
        "-e",
        "TDLIB_2FA_PASSWORD",
        "-e",
        "MCP_READ_ONLY",
        "-e",
        "MCP_TOOL_PROFILE",
        "ghcr.io/tolboy/telegram-mcp-tdlib:1.19.1-stdio"
      ],
      "env": {
        "TDLIB_API_ID": "ใส่ค่าของคุณ",
        "TDLIB_API_HASH": "ใส่ค่าของคุณ",
        "TDLIB_PHONE_NUMBER": "ใส่ค่าของคุณ",
        "TDLIB_AUTH_CODE": "ใส่ค่าของคุณ",
        "TDLIB_2FA_PASSWORD": "ใส่ค่าของคุณ",
        "MCP_READ_ONLY": "ใส่ค่าของคุณ",
        "MCP_TOOL_PROFILE": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • TDLIB_API_ID จำเป็น env
    Telegram API ID from my.telegram.org
  • TDLIB_API_HASH ความลับ จำเป็น env
    Telegram API hash from my.telegram.org
  • TDLIB_PHONE_NUMBER ความลับ env
    Telegram phone number; omit after preparing a persisted session when using QR authentication
  • TDLIB_AUTH_CODE ความลับ env
    One-time Telegram login code for a fresh headless container
  • TDLIB_2FA_PASSWORD ความลับ env
    Telegram 2FA password when the account requires it
  • MCP_READ_ONLY env
    Keep true for safe first use
  • MCP_TOOL_PROFILE env
    Tool surface: reader, inbox, community-admin, research, or all

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub tolboy ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด แชตและอีเมลi

  • ดาวมากกว่า 0% ของอีก 1777 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 85% ของอีก 1777 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 1777 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Telegram MCP Server ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: TDLIB_API_ID, TDLIB_API_HASH, TDLIB_PHONE_NUMBER, TDLIB_AUTH_CODE, TDLIB_2FA_PASSWORD

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.19.1) เข้า registry 4 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Vexa, emailmd, MCP WhatsApp Cloud

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Vexa

โดย Vexa-ai

Meeting bot and transcripts for Google Meet, Teams and Zoom. Live or after, speakers labelled.

รันบนคลาวด์★ 2,949Apache-2.0อัปเดต 2 เดือนที่ผ่านมา
ติดตั้ง

emailmd

โดย anypost

Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.

บนเครื่องหรือคลาวด์★ 1,385MITอัปเดต 31 วันที่ผ่านมา
ติดตั้ง

MCP WhatsApp Cloud

โดย codespar

MCP server for WhatsApp Cloud API (Meta) — messages, media, and templates via Graph API

รันบนเครื่อง★ 277MITอัปเดต 5 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Telegram MCP Server

Telegram MCP for real accounts — safe by default, TDLib-powered, production-ready.

A local-first Model Context Protocol server that gives an AI agent real Telegram-account access without handing it the keys to your account. It starts read-only, hides write tools until you opt in, and runs over STDIO for desktop clients or Streamable HTTP at /mcp for managed deployments.

Why this one?
  • Safe by default — boots in read-only mode with a small inbox/reader profile; write and quota-consuming tools are *hidden from the model*, not merely blocked, until you turn them on.
  • Human approval that does not depend on your client — destructive tools ask a person first: through the MCP host where elicitation exists, otherwise on a single-use loopback page this server hosts. Either way the question leaves and the answer returns outside the model's turn, so an injected instruction can make the model *request* a ban, not approve one.
  • Sends an agent can retry — an idempotency_key turns a lost response into a stored receipt instead of a duplicate message; an unconfirmed send is reported as UNKNOWN, never silently resent.
  • Real user accounts, not just bots — built on TDLib (via tdlight-java), so an agent can read and act on your actual account, not only a Bot API subset.
  • Isolated multi-account — each account gets its own session, mandatory selection, and scoped API keys; reads never fan out across accounts.
  • Two transports — STDIO for Claude Desktop / Cursor / VS Code / Codex, Streamable HTTP for a managed service.
  • No JDK to install — runtime-inclusive release bundles for Windows, Linux x64/ARM64, and Apple-silicon macOS, with checksums, an SBOM, and signed container digests.

Screen recording of a live terminal session with server 1.19.0 and an authorized

TDLib account, November 2, 2026. The command-line MCP client reads only the public

@telegram channel and prints selected response fields.

MP4 · Still image · How it was recorded.

Safe first run

Runtime-inclusive releases need no JDK, Gradle, Git, Python, or Node.js. Use a test account for your first run if you can.

1. Install (macOS Apple silicon / Linux with Homebrew):

brew install --formula https://github.com/tolboy/telegram-mcp-tdlib/releases/latest/download/telegram-mcp.rb

Windows with Scoop:

scoop install https://github.com/tolboy/telegram-mcp-tdlib/releases/latest/download/telegram-mcp.json

2. Log in with a QR scan — the one-time code never touches your shell history:

telegram-mcp auth --method qr

3. Check the session is ready — this reads local state and starts no server:

telegram-mcp session doctor

Do not run serve --transport stdio yourself to try it out. With STDIO your AI client starts the server and owns its lifetime; a copy you launched in a terminal holds the TDLib session, and the client's own copy then exits with code 2 because it cannot lock td.binlog. Give the command to the client instead (below) and let it do the starting.

Then try a first prompt that cannot change anything:

“Summarize my last 20 conversations. Do not send or modify anything.”

In this mode write and quota-consuming tools are absent from the tool list entirely, so the model has nothing destructive to call. Switch to MCP_READ_ONLY=false only after you have reviewed the surface. When you do, set MCP_DESTRUCTIVE_APPROVAL=auto (or elicitation / loopback). The server refuses to start if writes are on and approval is left off, because "confirmed": true is an argument the model can set itself. auto asks through host elicitation where available, or through the server's loopback page otherwise. MCP_ALLOW_MODEL_CONFIRMED_WRITES=true is the explicit exception that restores the old combination.

Connect your client

Generate the entry instead of transcribing one — it fills in the key your client actually expects and pins the version it was generated from:

telegram-mcp config --client claude

--client claude-code|cursor|vscode|codex switches target — Codex gets TOML, VS Code gets the servers key it actually reads, Claude Code gets the explicit transport type. --writes enables write tools and the approval prompt that guards the destructive ones — pair it with a write-capable --profile inbox|community-admin|all, since the default reader surface hides write tools before read-only mode is consulted. --docker default emits a container entry with a pinned image, and --http default emits the shared-daemon entry for Claude Code, Cursor, VS Code, or Codex. Claude Desktop does not read remote servers from claude_desktop_config.json; add a network-reachable remote endpoint under Settings → Connectors instead. Claude remote connectors do not accept the generator's custom API-key header, so this server must be exposed over HTTPS with MCP_AUTH_MODE=oauth. The generator therefore rejects --client claude --http.

STDIO is the low-friction path for desktop clients. The generated entry looks like:

{

"mcpServers": { "telegram": { "command": "telegram-mcp", "args": ["serve", "--transport", "stdio"], "env": { "TDLIB_API_ID": "123456", "TDLIB_API_HASH_FILE": "/absolute/path/to/telegram-api-hash", "MCP_TOOL_PROFILE": "inbox", "MCP_READ_ONLY": "true" } } } }

  • Claude Desktop — add the block above to claude_desktop_config.json, then quit the app from the tray and start it again. Use Settings → Developer → Edit Config to open the file: it points at the right copy for your build. Editing %APPDATA%\Claude by hand works only for the installer build — the Microsoft Store build is packaged as MSIX and keeps its config in %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\ instead.
  • Cursor — add it to ~/.cursor/mcp.json (or Settings → MCP → Add).
  • VS Code — use .vscode/mcp.json; VS Code names the top-level key servers instead of mcpServers and requires an explicit "type": "stdio" or "type": "http".

To share one local process across clients, use telegram-mcp daemon start and telegram-mcp daemon attach --client cursor (or codex, vscode, claude-code). See managed local daemon for status, stop and onboarding.

For a managed HTTP deployment instead of STDIO:

docker run --rm -p 127.0.0.1:8080:8080 \

-e TDLIB_API_ID -e TDLIB_API_HASH -e MCP_API_KEY \ ghcr.io/tolboy/telegram-mcp-tdlib:latest

See CLI and STDIO, interactive authentication, and client compatibility for exact platform/client variants.

Recipes

For reusable agent instructions, install the free Telegram Inbox Assistant skill. Requires server 1.17.2 or later. Shared-daemon users of Claude Desktop can use the optional tools bridge, included in runtime packages with its Python dependency instructions. Its setup guide includes client configuration templates and explains the separately required local server and Telegram authorization. The skill summarizes and searches in read-only mode.

Copy-paste configurations and prompts for real tasks, each with the smallest tool surface that can do the job: summarize your inbox, find a lost message, research public groups, read-only community health check, and draft replies without sending — index in docs/recipes. Those recipes are also MCP prompts. Selecting one does not grant tools beyond the configured profile.

How it compares

Most Telegram MCP servers wrap the Bot API or a Telethon user session and expose every capability to the model at once. This project optimizes for connecting an agent to a real account you care about, safely:

DimensionThis serverTypical Telethon / Bot-API MCP servers
Account accessReal user account via TDLib (tdlight-java)Often bot-only, or a single Telethon user session
Default postureRead-only; write/quota tools hidden until enabledUsually all tools exposed from the start
Multi-accountIsolated sessions, mandatory selection, scoped keys, no cross-account read fan-outSingle account, or implicit fan-out
TransportsSTDIO and Streamable HTTP /mcpUsually STDIO only
GuardrailsConfirmation gating, audit log, anti-spam limits, chat allow-list, untrusted-content markingMinimal
DistributionSigned runtime bundles (no JDK), SBOM + provenance, GHCR imageSource install via pip/npx

A fuller architectural comparison (TDLib vs Telethon vs Bot API, and why "hidden, not blocked" matters) is in docs/COMPARISON.md. The detailed, dated benchmark against the leading public servers — including features deliberately declined (raw MTProto escape hatch, ownership transfer, bulk contact export) — is in PUBLIC_BENCHMARK_AND_ROADMAP.md.

Tool profiles

You don't expose 126 tools on day one. MCP_TOOL_PROFILE narrows the advertised surface *before a client ever sees it*, without weakening account scoping, read-only mode, confirmation, audit, or anti-spam:

ProfileSurface
readerAlways non-mutating — safe for a first look
inboxPersonal messages, drafts, media, contacts, privacy
community-adminModeration, group/channel, permissions, bot commands
researchBounded account/public discovery and reading
allThe full inventory (opt in deliberately)

See TOOL_PROFILES.md for the exact intent of each surface.

Features

  • 126 MCP tools — messages, polls, read receipts, scheduled sends, chats, folders, invite-link administration, contacts, media, drafts, privacy, bot commands, detailed group permissions, profile, search, and account routing.
  • TDLib via tdlight-java — real user accounts, not just the Bot API.
  • Isolated multi-account mode — independent sessions, mandatory account selection, and optional per-key account scopes with no cross-account read fan-out.
  • Safe by default — read-only tool surface, human approval for destructive actions (MCP_DESTRUCTIVE_APPROVAL, over the host or a loopback page), and task-focused profiles (reader/inbox/community-admin/research/all).
  • Recoverable sends — optional idempotency keys and durable receipts for text, replies, files, voice, stickers, forwards and scheduled messages; see delivery recovery.
  • Per-client permissions — a reviewed JSON file grants each client read, download, mutate, quota or policy actions on named accounts

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx