Telegram Mcp

io.github.Shreyas-Profile由 GitHub 帳號 Shreyas-Profile 發布v0.4.0更新於 Oct 24, 2026

Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.

已驗證Streamable HTTP可網頁執行溝通與協作

概覽

AI 產生的概覽

託管的 Telegram 橋接服務,讓 MCP 代理讀取你傳給機器人的訊息並透過 Telegram 回覆。

可以做什麼
拉取自上次拉取以來的新進站 Telegram 訊息,讀取一次即消耗。由代理向你的 Telegram 機器人傳送文字訊息。列出雙向最近儲存的訊息,且不推進讀取游標。清除該帳號儲存的訊息歷史。help、recent、window、usage、clear 等 Telegram 斜線指令由平台直接回應,即使沒有代理在輪詢。
適用情境
適合想用手機上的 Telegram 與代理對話、並在同一聊天中獲得回覆,而不直接暴露代理的情境。適用於代理主動輪詢新訊息而非接收推送的架構。若只需單向通知則不必使用。
執行需求
使用 telegram.regiq.in 遠端端點,或以 Docker 與 Compose 自架。需要 Google 帳號登入、來自 BotFather 的 Telegram 機器人權杖,以及透過 Authorization Bearer 標頭傳送的 MCP API 金鑰。自架另需 Google OAuth 用戶端、供 webhook 使用的公開 HTTPS 網域,以及 NEXTAUTH_SECRET、GOOGLE_*、PUBLIC_BASE_URL 等環境設定。
安裝前請注意
託管服務會儲存你的 Telegram 訊息,並要求在儀表板貼上機器人權杖,以及以 Authorization 標頭傳送 MCP API 金鑰。clear_history 與 /clear 指令會永久清除已存歷史。訊息會經過第三方託管平台;自架可避免此點,但需自行管理密鑰。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Telegram Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.Shreyas-Profile%2Ftelegram-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "telegram": {
      "type": "http",
      "url": "https://telegram.regiq.in/api/mcp"
    }
  }
}

README

telegram-mcp

Built by Shreyas · Shipped by Globalion

Bidirectional Telegram ⇆ agent bridge. No LLM in our stack.

Your agent (Claude Desktop, Cursor, a custom script) is the brain. Our platform is the pipe: we take messages you send on Telegram, store them, and hand them to your agent when it polls. When your agent has something to say back, it pushes through us to your Telegram.

  • Bring your own agent. Any MCP client works.
  • No inference in the middle. We don't call an LLM. No vendor lock-in.
  • Bidirectional. get_new_messages pulls inbound, send_telegram_message pushes outbound.
  • Platform slash-commands. /help, /clear, /recent, /window, /usage all work even if your agent is offline.

Hosted at telegram.regiq.in or self-host with the Docker Compose below.

Use it (hosted)

  1. Visit https://telegram.regiq.in, sign in with Google.

  2. DM @BotFather → /newbot. Paste the token in your dashboard.

  3. On the dashboard: Generate MCP API key, copy it.

  4. Add to Claude Desktop's claude_desktop_config.json (or Cursor / any MCP client):

    json
    {  "mcpServers": {    "telegram": {      "url": "https://telegram.regiq.in/api/mcp",      "headers": {        "Authorization": "Bearer YOUR_KEY_HERE"      }    }  }}
  5. Send /start to your bot on Telegram.

Now your agent can call get_new_messages to see what you sent it, and send_telegram_message to reply.

Tools

ToolDirectionNotes
get_new_messages()user → agentReturns inbound messages since the last pull. Read-once.
send_telegram_message(text)agent → userDelivers text to the user's Telegram bot.
list_recent_messages(max=20)readLast N stored messages, both directions. No cursor advance.
clear_history()actionWipes stored history for the user.

Slash commands (platform-handled)

Handled by the platform directly — your agent isn't involved. So /help works even when nothing is polling.

CommandEffect
/startRegisters this Telegram chat with your account.
/helpLists commands.
/recent [N]Shows the last N stored messages.
/clearWipes history.
/window NSets the history window (default 20).
/usageStored message count.

Self-host

You'll need:

  • Docker + Compose
  • A Google OAuth client — Cloud Console. Scopes: openid, email, profile. Redirect: <PUBLIC_BASE_URL>/api/auth/callback/google
  • A public HTTPS domain for Telegram webhooks (Cloudflare Tunnel or ngrok http 3012 locally)

No LLM key required. Your agent brings its own model.

bash
git clone https://github.com/globalion/telegram-mcpcd telegram-mcpcp .env.example .env# fill NEXTAUTH_SECRET, GOOGLE_*, PUBLIC_BASE_URLdocker compose up -d# open http://localhost:3012

Architecture

  Telegram app                                Your MCP agent     ▲   │                                      ▲   │     │   │ text                          poll   │   │ push     │   ▼                                      │   ▼   ┌──────────────────────────────────────────────────┐   │  Our platform (Hetzner)                          │   │  - /api/telegram/webhook/<per-user-secret>       │   │    · slash-commands answered here                │   │    · plain text stored, no reply                 │   │  - /api/mcp   Bearer-auth JSON-RPC               │   │    · get_new_messages, send_telegram_message     │   │    · list_recent_messages, clear_history         │   │  - Postgres: User, ApiKey, TelegramLink, Message │   └──────────────────────────────────────────────────┘

Per-user webhook URL segment is a random secret so a leaked bot token can't be pointed at someone else's account. Google sign-in is identity + ban anchor only — per-message identity comes from the MCP API key + chatId.

License

MIT. See LICENSE.

來源:README.md,提交 ad391a0

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分