Skip to main content
Glama
Claude Code Telegram Notifier MCP Server

Claude Code Telegram Notifier MCP Server

by hsynj

Claude Code Telegram Notifier MCP Server šŸ¤–šŸ“²

License: MIT TypeScript Model Context Protocol

A Model Context Protocol (MCP) server that connects Claude Code and Claude Desktop to Telegram. Receive real-time push notifications on your phone or desktop whenever Claude starts long tasks, hits key milestones, encounters blockers, or finishes work — perfect for when you are away from your keyboard (AFK).


✨ Features

  • šŸ”” Proactive Notifications: Claude notifies you automatically about task status without manual intervention.

  • 🚦 Status Types:

    • info ā„¹ļø: Task started, background work initiated.

    • success āœ…: Milestone reached, task completed.

    • warning āš ļø: Non-critical issue, retry, or blocker.

    • action_required 🚨: Human intervention needed (approval, missing API key, confirmation).

  • šŸ›”ļø Resilient Delivery: Automatic fallback to plain text if Markdown entity parsing fails due to unescaped code or paths.

  • āš™ļø Dual Configuration: Supports both .env file and MCP configuration env block.

  • šŸ”Œ Universal Compatibility: Works with Claude Code CLI and Claude Desktop app.


Related MCP server: telegram-mcp-notify

šŸ“‹ Prerequisites

  1. Node.js (v18 or higher) & npm

  2. Telegram Bot Token:

    • Open Telegram and message @BotFather.

    • Send /newbot and follow the instructions to create your bot.

    • Copy the API token provided.

  3. Telegram User ID:


šŸš€ Installation & Setup

1. Clone & Build

git clone git@github.com:hsynj/ClaudeCode-Telegram-MCPTool.git
cd ClaudeCode-Telegram-MCPTool
npm install
npm run build

2. Configure Environment

Copy the example environment file and fill in your credentials:

cp .env.example .env

Edit .env:

BOT_TOKEN=123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
ADMIN_ID=987654321

Note: You can also specify these variables directly in your Claude configuration files.


šŸ› ļø Configuration with Claude

Option A: Claude Code CLI

Add the server to Claude Code using claude mcp add:

claude mcp add telegram-notifier node /ABSOLUTE_PATH_TO/ClaudeCode-Telegram-MCPTool/dist/index.js -e BOT_TOKEN=YOUR_BOT_TOKEN -e ADMIN_ID=YOUR_ADMIN_ID

Or manually configure your MCP settings file (e.g. ~/.claude/mcp.json or project-level .claude/settings.json):

{
  "mcpServers": {
    "telegram-notifier": {
      "command": "node",
      "args": [
        "/ABSOLUTE_PATH_TO/ClaudeCode-Telegram-MCPTool/dist/index.js"
      ],
      "env": {
        "BOT_TOKEN": "YOUR_BOT_TOKEN",
        "ADMIN_ID": "YOUR_ADMIN_ID"
      }
    }
  }
}

Option B: Claude Desktop App

Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "telegram-notifier": {
      "command": "node",
      "args": [
        "/ABSOLUTE_PATH_TO/ClaudeCode-Telegram-MCPTool/dist/index.js"
      ],
      "env": {
        "BOT_TOKEN": "YOUR_BOT_TOKEN",
        "ADMIN_ID": "YOUR_ADMIN_ID"
      }
    }
  }
}

🧠 Automating Proactive Notifications in Claude Code

To make Claude proactively notify you while working, add a rule to ~/.claude/rules/telegram-notifier.md:

# Telegram Notifier Rule

You MUST proactively use the `send_telegram_update` MCP tool to notify the user in the following situations, without the user explicitly asking:

1. **When starting a multi-step or long-running task:** Let the user know you have started working. Use `status: "info"`.
2. **When reaching significant milestones:** If you've completed a major part of a larger task (e.g. "Finished setting up the database, now moving to API routes"). Use `status: "success"`.
3. **When you encounter a blocker or need human intervention:** If a test fails repeatedly, an API key is missing, or you are stuck and need advice. Use `status: "warning"` or `action_required`.
4. **When you need approval:** If you are about to run a destructive command, modify a critical file, or do something that requires explicit permission. Use `status: "action_required"`.
5. **When the task is completely finished:** Let the user know the work is done and they can review it. Use `status: "success"`.

Assume the user is AFK and relies on Telegram notifications to track progress.

šŸ”§ MCP Tool Specification

send_telegram_update

Sends a formatted notification to your Telegram chat.

Parameter

Type

Required

Description

project

string

Yes

Name of the project or repository being worked on.

message

string

Yes

Detailed status log, explanation, or required action.

status

string

Yes

One of info, success, warning, action_required.

title

string

No

Short headline (defaults to "Update").

Message Format Example:

āœ… Milestone Completed
šŸ“‚ Project: my-web-app

Database migrations applied and all 24 unit tests passed.

Status: success

šŸ‘Øā€šŸ’» Development

# Run in development mode with ts-node
npm run dev

# Compile TypeScript
npm run build

# Start compiled server
npm start

šŸ“„ License

This project is licensed under the MIT License.

Available Tools

1 tool
send_telegram_updateA

Send a vital update, progress log, or status notification to the user's Telegram. Use this when starting a long task, when reaching significant milestones, or when you encounter a blocker/need the user to return to the computer to approve an action.

Inputs: status (required), message (required), project (required), title.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only a single tool, there is no possibility of confusion or misselection between tools. The tool's purpose is self-evident and unambiguous.

    Naming Consistency5/5

    The lone name send_telegram_update follows a clear verb_noun snake_case convention. With one tool there is no inconsistency to speak of.

    Tool Count3/5

    A single tool is borderline thin for a server, though the notifier's scope is narrow. One send operation arguably covers the entire purpose, but it leaves little room for nuance.

    Completeness4/5

    Sending a notification is the only real operation for a notifier, so the surface covers the domain's core action. Minor gaps exist (e.g. no distinct channels for errors vs. progress), but the stated use cases are handled.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude Code to pause and ask questions via Slack, and allows running Claude from Slack with project-aware context, supporting a full-process feature development workflow.
      36
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI coding agents to send structured Telegram notifications for events like questions, plan_ready, final, attention_needed, and error.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding assistants to ask for human clarification and share thoughts in real-time, creating natural, engaging coding conversations.
      13 npm
      3
      MIT