telegram-notifier-mcp
Enables sending Telegram notifications from an MCP client using a bot token and chat ID, with a single tool to send messages.
README
Telegram Notifier MCP Server
A Model Context Protocol (MCP) server that provides a tool to send notifications via Telegram. Built with TypeScript and Node.js.
Features
- Single Tool:
send_telegram_notification- Send messages to a configured Telegram chat - Simple Setup: Configure once with environment variables
- Error Handling: Clear error messages for configuration and API issues
- TypeScript: Fully typed for better development experience
Prerequisites
- Node.js: Version 18 or higher
- Telegram Bot Token: Create a bot via @BotFather on Telegram
- Chat ID: Get your chat ID (you can use @userinfobot)
Installation
# Install dependencies
npm install
# Build the TypeScript code
npm run build
Configuration
Environment Variables
Set the following environment variables:
export TELEGRAM_BOT_TOKEN="your_bot_token_here"
export TELEGRAM_CHAT_ID="your_chat_id_here"
You can also create a .env file in your project root:
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
MCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop, Cline):
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"telegram-notifier": {
"command": "node",
"args": ["/Users/yarden.porat/projects/yarden/telegram-notifier-mcp/dist/index.js"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token_here",
"TELEGRAM_CHAT_ID": "your_chat_id_here"
}
}
}
}
For Cline (VS Code extension):
Add to your Cline MCP settings:
{
"telegram-notifier": {
"command": "node",
"args": ["/Users/yarden.porat/projects/yarden/telegram-notifier-mcp/dist/index.js"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token_here",
"TELEGRAM_CHAT_ID": "your_chat_id_here"
}
}
}
Usage
Once configured, the MCP server provides a single tool:
send_telegram_notification
Parameters:
message(string, required): The message text to send to Telegram
Example:
Send a telegram notification with the message "Deployment completed successfully! 🚀"
The AI assistant will use the tool to send your message to the configured Telegram chat.
Development
Build
npm run build
Watch Mode
npm run watch
Testing
You can test the server manually by setting environment variables and running:
export TELEGRAM_BOT_TOKEN="your_bot_token_here"
export TELEGRAM_CHAT_ID="your_chat_id_here"
node dist/index.js
Or use the included shell script:
./send_telegrem_notification.sh "Test message"
Project Structure
telegram-notifier-mcp/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript (generated)
├── package.json # Node.js dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── README.md # This file
└── send_telegrem_notification.sh # Shell script for testing
How to Get Telegram Credentials
1. Create a Telegram Bot
- Open Telegram and search for @BotFather
- Send
/newbotcommand - Follow the instructions to name your bot
- Copy the bot token provided (format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
2. Get Your Chat ID
Option 1: Using @userinfobot
- Search for @userinfobot on Telegram
- Start a chat with it
- Your chat ID will be displayed
Option 2: Using your bot
- Start a chat with your newly created bot
- Send any message to it
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Look for
"chat":{"id":in the response
Troubleshooting
Bot not sending messages
- Ensure you've started a chat with your bot (send
/start) - Verify your bot token is correct
- Check that the chat ID is correct
MCP server not connecting
- Make sure the path to
dist/index.jsis absolute and correct - Verify Node.js is installed and accessible
- Check that the build completed successfully (
npm run build)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。