Cline 通知服务器是专为 Cline 设计的 MCP 服务器,它支持借助 Telegram 发送通知并接收回复。当 Cline 需要提问时,会通过 Telegram 消息通知您,同时等待您的回复,极大提升交互效率。
Cline 通知服务器能让 Cline 与您通过 Telegram 高效交互。以下为您介绍使用前的安装和配置步骤。
使用以下命令安装 Cline 通知服务器:
npm install cline-notification-server
/newbot
并按照指示操作。123456789:ABCdefGHIjklMNOpqrsTUVwxyz
)。/start
给您的机器人。https://api.telegram.org/botBOT_TOKEN/getUpdates
chat
对象并记录其 id
字段,这就是您的聊天 ID。在 Cline 配置文件中添加服务器:
对于 VSCode 扩展(cline_mcp_settings.json
):
{
"mcpServers": {
"notification": {
"command": "npx",
"args": ["cline-notification-server"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token",
"TELEGRAM_CHAT_ID": "your_chat_id"
}
}
}
}
对于 Claude 桌面应用程序(claude_desktop_config.json
):
{
"mcpServers": {
"notification": {
"command": "npx",
"args": ["cline-notification-server"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token",
"TELEGRAM_CHAT_ID": "your_chat_id"
}
}
}
}
当 Cline 需要提问时:
属性 | 详情 |
---|---|
环境变量 | 详情 |
TELEGRAM_BOT_TOKEN |
您从 BotFather 获得的 Telegram 机器人令牌 |
TELEGRAM_CHAT_ID |
消息发送目标的聊天 ID |
当配置好服务器后,Cline 可以使用它进行提问:
// Cline使用通知工具的示例
const response = await use_mcp_tool({
server_name: "notification",
tool_name: "send_notification",
arguments: {
message: "我应该继续将代码部署到生产环境吗?",
project: " MyApp",
urgency: "high"
}
});
消息格式为:
如果您有任何改进建议,欢迎提出问题或提交拉取请求。
本项目采用 MIT 许可证。