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 集成