Telegram Notifier MCP Server
Enables AI agents to send notifications and media (text, photos, documents, videos) via a Telegram bot.
README
Telegram Notifier MCP Server
A Model Context Protocol (MCP) server that enables AI agents to send messages via Telegram bot. Perfect for notifications, alerts, and real-time communication from your AI applications.
Features
- 📱 Send messages to Telegram channels/chats via bot
- 🎨 Support for multiple formatting modes (Markdown, MarkdownV2, HTML)
- 📷 Send photos/images (local files, HTTP URLs)
- 📁 Send documents/files with custom filenames
- 🎬 Send videos with caption support
- 🏷️ Caption support for all media with full formatting
- 🛡️ Robust error handling with detailed Telegram API responses
- 🏗️ Clean service architecture for maintainable code
Quick Start
1. Create a Telegram Bot
- Message @BotFather on Telegram
- Use
/newbotcommand and follow instructions - Save the bot token (looks like
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
2. Get Chat ID
For personal messages:
- Message your bot first
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find the
chat.idvalue
For channels:
- Add your bot to the channel as admin
- Send a message to the channel
- Visit the same URL and find the
chat.id(negative number for channels)
3. Install and Configure
# Install the package
npm install -g @harnyk/telegram-notifier-mcp
# Or clone and build locally
git clone <repository-url>
cd mcp-telegram-notifier
pnpm install
pnpm build
pnpm link
4. Add to Your MCP Client
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"telegram-notifier": {
"command": "telegram-notifier",
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token_here",
"TELEGRAM_CHAT_ID": "your_chat_id_here"
}
}
}
}
Or using npx:
{
"mcpServers": {
"telegram-notifier": {
"command": "npx",
"args": ["-y", "@harnyk/telegram-notifier-mcp"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token_here",
"TELEGRAM_CHAT_ID": "your_chat_id_here"
}
}
}
}
Available Tools
Once configured, your AI agent will have access to these MCP tools:
📝 send_markdown_message_as_telegram_bot
Send formatted text messages to Telegram
- messageText: Text content with Markdown/HTML formatting
- parseMode:
Markdown,MarkdownV2, orHTML(default: MarkdownV2)
📷 send_telegram_photo
Send photos/images to Telegram
- photo: Local file path or HTTP URL to image
- caption: Optional image caption with formatting
- parseMode: Caption formatting mode
📁 send_telegram_document
Send documents/files to Telegram
- document: Local file path or HTTP URL to document
- caption: Optional document caption with formatting
- filename: Custom filename override
- parseMode: Caption formatting mode
🎬 send_telegram_video
Send videos to Telegram
- video: Local file path or HTTP URL to video
- caption: Optional video caption with formatting
- filename: Custom filename override
- parseMode: Caption formatting mode
Use Cases
- 📊 Monitoring: Get alerts when system metrics exceed thresholds
- 🚀 Deployments: Notifications when CI/CD pipelines complete
- 📈 Analytics: Daily/weekly reports with charts and data files
- 🔍 Error Tracking: Instant notifications with error screenshots
- 📅 Scheduling: Reminders with attached documents
- 💬 Customer Support: Forward important messages with media
Development
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build for production
pnpm build
# Run linting
pnpm lint
# Run type checking
pnpm typecheck
Configuration Examples
Claude Desktop
{
"mcpServers": {
"telegram-notifier": {
"command": "telegram-notifier",
"env": {
"TELEGRAM_BOT_TOKEN": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz",
"TELEGRAM_CHAT_ID": "-1001234567890"
}
}
}
}
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if needed
- Run
pnpm lintandpnpm typecheck - Submit a pull request
License
WTFPL - Do What the Fuck You Want to Public License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.