Claude Ops Telegram Server

io.github.auroracapital由 GitHub 帳號 auroracapital 發布v0.2.1更新於 Oct 24, 2026

Telegram personal-account MCP (MTProto user-auth). Read DMs, send messages, search across chats.

發布方自己的服務:Claude Platform Docs

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

本機 MCP 伺服器,以你的個人 Telegram 帳號登入,用來列出對話、讀取訊息、搜尋聊天並發送回覆。

可以做什麼
  • 列出最近的對話(私聊、群組、頻道)與未讀數
  • 取得指定聊天的訊息
  • 在所有對話中進行全文搜尋
  • 向某個聊天或使用者發送訊息
適用情境
適合讓助理代管你自己的 Telegram 收件匣:查看未讀私聊、取得訊息記錄、跨聊天搜尋並回覆。BotFather 機器人無法讀取兩位使用者之間的私聊,因此這類情境需要以使用者帳號登入。
執行需求
以 stdio 方式在本機執行,需要安裝 Node.js 與 npm 相依套件。需在 my.telegram.org 建立個人應用程式,並設定環境變數 TELEGRAM_API_ID、TELEGRAM_API_HASH、TELEGRAM_PHONE 與 TELEGRAM_SESSION。工作階段須先執行一次授權指令產生,過程中會要求輸入簡訊驗證碼與選用的兩步驟驗證密碼。需要能連線至 Telegram 官方 API 的網路。
安裝前請注意
伺服器以你的個人帳號身分驗證,可讀取並發送真實的私密訊息。TELEGRAM_SESSION 等同於密碼且綁定裝置,應存放在密鑰管理工具中、切勿提交至程式碼庫;若外洩可在 Telegram 的「裝置」設定中登出。發送訊息會寫入真實對話。Telegram 對每個帳號有速率限制。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

claude-ops Telegram MCP Server

User-auth Telegram MCP server for the /ops:ops-inbox skill. Authenticates as a personal Telegram account via MTProto (gram.js), not as a BotFather bot, so it can read and reply to real DM conversations.

Why user-auth, not bot?

Bots cannot read messages sent in private chats between two users — only messages sent directly to the bot. For the /ops:ops-inbox use case (managing the owner's personal inbox), we must authenticate as the user's account.

Setup

1. Get API credentials

Go to https://my.telegram.org/apps and create a personal application (not a bot). You'll get:

  • api_id (integer)
  • api_hash (32-char string)

2. Install dependencies

bash
cd claude-ops/telegram-servernpm install

3. First-run authentication (interactive)

bash
TELEGRAM_API_ID=12345 \TELEGRAM_API_HASH=abcdef... \TELEGRAM_PHONE=+15551234567 \node index.js --auth

The script will prompt for an SMS code and (if enabled) your 2FA password. On success it prints a TELEGRAM_SESSION string — save this securely (it's your session token).

4. Configure MCP server in Claude Code

Add to ~/.claude/settings.json:

json
{  "mcpServers": {    "telegram": {      "command": "node",      "args": ["/path/to/claude-ops/telegram-server/index.js"],      "env": {        "TELEGRAM_API_ID": "${TELEGRAM_API_ID}",        "TELEGRAM_API_HASH": "${TELEGRAM_API_HASH}",        "TELEGRAM_SESSION": "${TELEGRAM_SESSION}",        "TELEGRAM_PHONE": "${TELEGRAM_PHONE}"      }    }  }}

Export the env vars from a secret manager (Doppler, 1Password, direnv — never commit):

bash
export TELEGRAM_API_ID="..."export TELEGRAM_API_HASH="..."export TELEGRAM_SESSION="..."   # from step 3export TELEGRAM_PHONE="+1..."export TELEGRAM_ENABLED=true    # enables in ops-unread detection

Restart Claude Code to load the MCP server.

Tools

ToolDescription
list_dialogsList recent conversations (DMs, groups, channels) with unread counts
get_messagesFetch messages from a specific chat
send_messageSend a message to a chat or user
search_messagesFull-text search across all conversations

Security

  • Never commit TELEGRAM_SESSION — it's equivalent to your password
  • Session tokens are device-bound; if stolen, log out via Telegram app → Settings → Devices
  • All credentials come from environment variables; nothing is hardcoded in this repo
  • The server runs over stdio (local only); no network exposure beyond Telegram's official API

Troubleshooting

"Session is no longer valid": Re-run node index.js --auth to generate a fresh session.

"TELEGRAM_API_ID is required": The env vars aren't being passed to the MCP server. Check your ~/.claude/settings.json env block.

Rate limiting: Telegram enforces per-account limits. If you hit one, wait 15-30 minutes before retrying.

來源:claude-ops/telegram-server/README.md,提交 fea4d55

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

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

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

其他 Claude 整合