npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@harnyk/telegram-notifier-mcp

v0.1.6

Published

A Model Context Protocol (MCP) server that enables AI agents to send messages, photos, documents, and videos via Telegram bot

Downloads

14

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

  1. Message @BotFather on Telegram
  2. Use /newbot command and follow instructions
  3. Save the bot token (looks like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)

2. Get Chat ID

For personal messages:

  1. Message your bot first
  2. Visit: https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
  3. Find the chat.id value

For channels:

  1. Add your bot to the channel as admin
  2. Send a message to the channel
  3. 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": "node",
      "args": ["/path/to/mcp-telegram-notifier/dist/server.js"],
      "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, or HTML (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": "node",
      "args": ["path/to/dist/server.js"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz",
        "TELEGRAM_CHAT_ID": "-1001234567890"
      }
    }
  }
}

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if needed
  5. Run pnpm lint and pnpm typecheck
  6. Submit a pull request

License

WTFPL - Do What the Fuck You Want to Public License