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
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.