Token导航 LogoToken导航TokenDH.com
Telegram MCP logo
开发工具HTTP官方级别未说明来源级核验

Telegram MCP

MCP Server

MCP server to send notifications to Telegram

工具数

0

提示词数

0

GitHub Stars

4

资源数

0
LLM交互JavaScriptClaudeClaude DesktopClaudeCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

MobileVibe

提供方

MobileVibe

最后核验

2026/5/18 02:50

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npm install -g telegram-mcp

详细介绍

电报MCP服务器

一种模型上下文协议(MCP)服务器,使LLM能够通过Telegram发送通知并接收用户响应。

特性

  • 向Telegram聊天发送文本通知,并可自定义紧急程度
  • 等待并检索用户响应
  • 与Cline和其他MCP兼容的LLM应用程序集成

先决条件

  • Node.js 16或更高版本
  • Telegram机器人令牌(从以下来源获得 @植物学家)
  • 您的Telegram聊天ID

安装

来自npm(推荐)

npm install -g telegram-mcp

来自GitHub

git clone https://github.com/CHarrisTech/telegram-mcp.git
cd telegram-mcp
npm install
npm run build

配置

服务器需要两个环境变量:

  • TELEGRAM_BOT_TOKEN:您的Telegram机器人令牌
  • TELEGRAM_CHAT_ID:您的Telegram聊天ID

获取Telegram Bot令牌

  1. 开始聊天 @植物学家 在Telegram上
  2. 发送命令 /newbot
  3. 按照说明创建新的机器人
  4. BotFather将为您的新机器人提供一个令牌

查找您的聊天ID

  1. 与您的新机器人开始聊天
  2. 向机器人发送消息
  3. 访问 https://api.telegram.org/bot/getUpdates
  4. 寻找 chat 响应中的对象并注意 id 领域

用法

独立运行

# Set environment variables
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"

# Run the server
telegram-mcp

与Cline整合

将以下内容添加到Cline MCP设置文件中:

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "node",
      "args": ["path/to/telegram-mcp/build/index.js"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your_bot_token",
        "TELEGRAM_CHAT_ID": "your_chat_id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

与Claude Desktop集成

将以下内容添加到您的Claude Desktop配置文件中:

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "node",
      "args": ["path/to/telegram-mcp/build/index.js"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your_bot_token",
        "TELEGRAM_CHAT_ID": "your_chat_id"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

可用工具

send_通知

向配置的Telegram聊天发送通知消息。

参数:

  • message (必填):要发送给用户的消息
  • project (必填):法学硕士正在进行的项目名称
  • urgency (可选):紧急程度(“低”、“中”或“高”)

检查通知响应

检查用户是否已对之前发送的通知做出响应。

参数:

  • message_id (必填):用于检查响应的消息的ID
  • timeout_seconds (可选):放弃前等待响应的时间(默认值:30)

发展

# Clone the repository
git clone https://github.com/CHarrisTech/telegram-mcp.git
cd telegram-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Watch for changes during development
npm run watch

# Test with the MCP Inspector
npm run inspector

本地测试

存储库包括帮助您在本地测试服务器的脚本:

视窗

# Set environment variables
set TELEGRAM_BOT_TOKEN=your_bot_token
set TELEGRAM_CHAT_ID=your_chat_id

# Run the test script
test-server.bat

macOS/Linux

# Set environment variables
export TELEGRAM_BOT_TOKEN=your_bot_token
export TELEGRAM_CHAT_ID=your_chat_id

# Make the script executable (first time only)
chmod +x test-server.sh

# Run the test script
./test-server.sh

例子

examples 目录包含演示如何使用Telegram MCP服务器的示例代码:

  • programmatic-usage.js:演示如何在自己的Node.js应用程序中以编程方式使用服务器

举个例子:

# Set required environment variables
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"

# Run the example
node examples/programmatic-usage.js

许可证

麻省理工学院

目录标签

目录标签

LLM交互JavaScriptClaudedeveloper-tools通知服务本地部署Telegram集成用户响应

支持客户端

Claude DesktopClaudeCline

接入字段

传输方式(transport,传输协议)

HTTP

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

HTTPnone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP