Cover image
Try Now
2025-03-22

MCP -Server zum Senden von Benachrichtigungen an Telegramm

3 years

Works with Finder

1

Github Watches

3

Github Forks

2

Github Stars

Telegram MCP Server

A Model Context Protocol (MCP) server that enables LLMs to send notifications via Telegram and receive user responses.

Features

  • Send text notifications to a Telegram chat with customizable urgency levels
  • Wait for and retrieve user responses
  • Integrates with Cline and other MCP-compatible LLM applications

Prerequisites

  • Node.js 16 or higher
  • A Telegram bot token (obtained from @BotFather)
  • Your Telegram chat ID

Installation

From npm (recommended)

npm install -g telegram-mcp

From GitHub

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

Configuration

The server requires two environment variables:

  • TELEGRAM_BOT_TOKEN: Your Telegram bot token
  • TELEGRAM_CHAT_ID: Your Telegram chat ID

Getting a Telegram Bot Token

  1. Start a chat with @BotFather on Telegram
  2. Send the command /newbot
  3. Follow the instructions to create a new bot
  4. BotFather will provide you with a token for your new bot

Finding Your Chat ID

  1. Start a chat with your new bot
  2. Send a message to the bot
  3. Visit https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
  4. Look for the chat object in the response and note the id field

Usage

Running Standalone

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

# Run the server
telegram-mcp

Integrating with Cline

Add the following to your Cline MCP settings file:

{
  "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": []
    }
  }
}

Integrating with Claude Desktop

Add the following to your Claude Desktop config file:

{
  "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": []
    }
  }
}

Available Tools

send_notification

Sends a notification message to the configured Telegram chat.

Parameters:

  • message (required): The message to send to the user
  • project (required): The name of the project the LLM is working on
  • urgency (optional): The urgency level ("low", "medium", or "high")

check_notification_response

Checks if the user has responded to a previously sent notification.

Parameters:

  • message_id (required): The ID of the message to check for responses
  • timeout_seconds (optional): How long to wait for a response before giving up (default: 30)

Development

# 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

Testing Locally

The repository includes scripts to help you test the server locally:

Windows

# 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

The examples directory contains sample code demonstrating how to use the Telegram MCP server:

  • programmatic-usage.js: Shows how to use the server programmatically in your own Node.js applications

To run an example:

# 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

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

  • deemkeen
  • Steuern Sie Ihren MBOT2 mit einer Power Combo: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Message Connector Protocol )服务 , 提供了与钉钉企业应用交互的 api 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • Die Cursor & Windsurf -Community finden Regeln und MCPs

    Reviews

    1 (1)
    Avatar
    user_qBjWsbj1
    2025-04-16

    As a dedicated user of telegram-mcp, I'm impressed by its seamless integration and user-friendly interface. The functionalities offered by MobileVibe are top-notch, making managing multiple tasks a breeze. Highly recommend checking out their GitHub page for more insights and updates!