telegram-mcp

telegram-mcp

0

This project is an MCP server that allows AI assistants to send Telegram messages. It connects seamlessly with tools like Claude Desktop and is user-configurable.

Telegram MCP Server

This project implements a Model Context Protocol (MCP) server that enables sending Telegram messages through AI assistants like Claude Desktop.

What is MCP?

The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop, connect to external tools and data sources. It gives a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.

Setup

  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

The server requires two environment variables to be set:

  • TELEGRAM_TOKEN: Your Telegram Bot API token
  • CHAT_ID: The ID of the Telegram chat where messages will be sent

These can be configured in your .cursor/mcp.json file:

{
  "mcpServers": {
    "telegram": {
      "command": "node",
      "args": ["./dist/mcp-server.js"],
      "env": {
        "TELEGRAM_TOKEN": "your-telegram-bot-token",
        "CHAT_ID": "your-chat-id"
      }
    }
  }
}

Available Tools

send_telegram_message

Sends a message to the configured Telegram chat.

Parameters:

  • message (string): The message text to send

License

MIT