Telegram Bot MCP Server

Telegram Bot MCP Server

telegram-bot-mcp-server•bysiavashdelkhosh81

A Model Context Protocol server for integrating the Telegram Bot API, offering messaging, media, and chat administration tools.

License: MIT License•Runtime: Awaiting documentation review•Category: communication social

WHAT IT DOES

  • •Sends text messages, automatically splitting content beyond 4096 characters while preserving word boundaries.
  • •Sends media such as photos, documents, videos, audio, voice messages, animations, and stickers by file_id or URL.
  • •Provides group administration tools including ban, unban, restrict, and promote members, plus chat settings and invite link management.
  • •Offers interactive content tools like polls, quizzes, dice, locations, and contacts.

BEST FOR

  • •AI assistants that need to send and manage Telegram messages on behalf of a bot.
  • •Automating Telegram group moderation such as muting, banning, and promoting members.
  • •Managing Telegram invite links with expiry and member limits.

ABOUT TELEGRAM-BOT-MCP-SERVER

Telegram Bot MCP Server is cataloged as an MCP server attributed to siavashdelkhosh81. A Model Context Protocol server for integrating the Telegram Bot API, offering messaging, media, and chat administration tools. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Telegram Bot MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How are long messages handled?

Messages exceeding 4096 characters are automatically split while preserving word boundaries and formatting.

What kind of media can the server send?

Photos, documents, videos, audio, voice messages, animations, and stickers, by file_id or URL.

Can the server manage group members?

Yes, it includes tools to ban, unban, restrict, and promote chat members, and to list administrators.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 7d6f441e9296 · 采集于 2026-11-13 10:25:54 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

🧠 Telegram Bot MCP Server

A powerful Model Context Protocol (MCP) server for seamless Telegram Bot API integration with intelligent message splitting, comprehensive error handling, and NPX support.

NPM Version License: MIT Node.js Version

✨ Key Features

  • 📝 45 Tools, Rich API Coverage: Messaging, media, polls, chat administration, invite links, and bot configuration
  • 🔄 Intelligent Message Splitting: Automatically handles Telegram's 4096 character limit while preserving word boundaries and formatting
  • 🖼️ Full Media Support: Photos, documents, videos, audio, voice messages, animations, and stickers by file_id or URL
  • 🎲 Interactive Content: Polls, quizzes, dice, locations, contacts, and chat actions (typing indicators)
  • ✏️ Message Lifecycle: Edit, delete, forward, copy, and pin messages
  • 👮 Group Administration: Ban/unban, restrict/mute, promote admins, and manage invite links
  • 🛡️ Comprehensive Error Handling: Detailed error reporting with context, error codes, and debugging information
  • 📦 NPX Support: Run directly with npx telegram-bot-mcp-server - no installation required
  • 🔧 Easy Integration: Simple MCP client configuration for AI assistants

🚀 Quick Start

# Run directly without installation
npx telegram-bot-mcp-server

Option 2: NPM Installation

# Install globally
npm install -g telegram-bot-mcp-server

# Or install locally
npm install telegram-bot-mcp-server

📋 Prerequisites

  1. Node.js 18+: Download here
  2. Telegram Bot Token: Get one from @BotFather

Getting Your Bot Token

  1. Open Telegram and search for @BotFather
  2. Start a conversation and run: /newbot
  3. Follow the prompts to name your bot
  4. Copy the API token provided

🔧 MCP Client Configuration

Add this configuration to your MCP client (Claude Desktop, etc.):

{
  "mcpServers": {
    "telegram_bot": {
      "command": "npx",
      "args": ["telegram-bot-mcp-server"],
      "env": {
        "TELEGRAM_BOT_API_TOKEN": "your_bot_token_here"
      }
    }
  }
}

Alternative Configurations

Using global installation:

{
  "mcpServers": {
    "telegram_bot": {
      "command": "telegram-bot-mcp-server",
      "env": {
        "TELEGRAM_BOT_API_TOKEN": "your_bot_token_here"
      }
    }
  }
}

Using local installation:

{
  "mcpServers": {
    "telegram_bot": {
      "command": "node",
      "args": ["./node_modules/.bin/telegram-bot-mcp-server"],
      "env": {
        "TELEGRAM_BOT_API_TOKEN": "your_bot_token_here"
      }
    }
  }
}

🛠️ Available Tools (45)

📨 Messaging

ToolDescriptionInputs
send-messageSend a text message. Messages over 4096 characters are automatically split while preserving word boundarieschatId, text
edit-message-textEdit the text of a message previously sent by the botchatId, messageId, text
delete-messageDelete a message from a chatchatId, messageId
forward-messageForward a message from one chat to another (keeps a link to the original)chatId, fromChatId, messageId
copy-messageCopy a message to another chat without a link to the originalchatId, fromChatId, messageId
send-chat-actionShow a status indicator like "typing…" or "sending photo…"chatId, action

🖼️ Media

ToolDescriptionInputs
send-photoSend a photo with an optional caption (long captions are split automatically)chatId, media, text?
send-documentSend a document/file (PDF, ZIP, etc., up to 50 MB)chatId, media, caption?
send-videoSend an MPEG4 videochatId, media, caption?
send-audioSend an audio file for the music player (.MP3/.M4A)chatId, media, caption?
send-voiceSend a playable voice message (.OGG/OPUS, .MP3, .M4A)chatId, media, caption?
send-animationSend an animation (GIF or soundless MPEG4)chatId, media, caption?
send-stickerSend a static, animated, or video stickerchatId, media
get-fileGet file info and a direct HTTPS download link for any file_idfileId

For all media tools, media accepts a Telegram file_id (recommended) or an HTTP URL.

🎲 Interactive Content

ToolDescriptionInputs
send-pollSend a native poll or quiz (anonymous mode, multiple answers, quiz mode with a correct answer)chatId, question, options, isAnonymous?, allowsMultipleAnswers?, type?, correctOptionId?
send-diceSend an animated random-value emoji (🎲 🎯 🏀 ⚽ 🎳 🎰)chatId, emoji?
send-locationSend a point on the mapchatId, latitude, longitude
send-contactSend a phone contactchatId, phoneNumber, firstName, lastName?

👥 Chat & Member Management

ToolDescriptionInputs
get-chatFetch full chat metadata and detailschatId
get-chat-memberGet detailed info about a chat memberchatId, userId
get-chat-member-countGet the total number of members in a chatchatId
get-chat-administratorsList all chat administrators with their rightschatId
kick-chat-memberBan a user from a group, supergroup, or channelchatId, userId
un-ban-chat-memberUnban a previously banned userchatId, userId
restrict-chat-memberMute or limit what a user can send in a supergroupchatId, userId, permission flags, untilDate?
promote-chat-memberPromote a user to administrator (or demote them)chatId, userId, admin right flags
get-user-profile-photosGet a user's profile picturesuserId, offset?, limit?
leave-chatMake the bot leave a group, supergroup, or channelchatId

🔧 Chat Settings

ToolDescriptionInputs
set-chat-titleChange the title of a group or channelchatId, title
set-chat-descriptionChange the description of a group or channelchatId, description
pin-chat-messagePin a message (optionally silently)chatId, messageId, disableNotification?
unpin-chat-messageUnpin a message (or the most recent pin)chatId, messageId?
unpin-all-chat-messagesUnpin all pinned messages at oncechatId
ToolDescriptionInputs
create-chat-invite-linkCreate an additional invite link (with optional name, expiry, member limit)chatId, name?, expireDate?, memberLimit?
revoke-chat-invite-linkRevoke an invite link created by the botchatId, inviteLink
export-chat-invite-linkGenerate a new primary invite link (revokes the old one)chatId

🤖 Bot Configuration

ToolDescriptionInputs
get-meTest the bot's auth token and get bot info—
set-my-name / get-my-nameConfigure and retrieve the bot's namename (0-64 chars)
set-my-description / get-my-descriptionConfigure and retrieve the bot's description (shown in empty chats)description (0-512 chars)
set-my-short-description / get-my-short-descriptionConfigure and retrieve the bot's short description (profile page)short_description (0-120 chars)
set-my-commands / get-my-commandsConfigure and retrieve the bot's command menucommands array of { command, description }

🆕 New Features

Rich Media Support

  • Documents, Video, Audio, Voice, Animations, Stickers: Send any kind of media by file_id or URL
  • File Downloads: Resolve any file_id to a direct HTTPS download link with get-file

Interactive Content

  • Polls & Quizzes: Native polls with anonymous mode, multiple answers, and quiz mode with a correct answer
  • Dice, Locations, Contacts: Fun animated emoji, map points, and phone contacts
  • Chat Actions: Show "typing…" and other status indicators while preparing a response

Full Message Lifecycle

  • Edit & Delete: Update or remove messages the bot has sent
  • Forward & Copy: Move content between chats, with or without attribution
  • Pin Management: Pin, unpin, and bulk-unpin messages

Group Administration

  • Moderation: Ban, unban, mute/restrict, and promote members
  • Chat Settings: Update titles and descriptions, list administrators
  • Invite Links: Create, revoke, and rotate invite links with expiry and member limits

Intelligent Message Splitting

  • Automatic Detection: Detects when messages exceed 4096 characters
  • Smart Splitting: Preserves word boundaries and formatting
  • Sequential Delivery: Sends parts in order with part indicators
  • Photo Captions: Handles long photo captions by splitting across messages

Enhanced Error Handling

  • Detailed Errors: Includes error codes, descriptions, and context
  • Telegram API Errors: Captures and formats Telegram-specific errors
  • Network Issues: Handles connection and timeout errors
  • Debug Information: Comprehensive logging for troubleshooting

NPX Support

  • Zero Installation: Run directly with npx telegram-bot-mcp-server
  • CLI Interface: Built-in help and version commands
  • Environment Validation: Checks for required bot token
  • Cross-Platform: Works on Windows, macOS, and Linux

🔍 Troubleshooting

Common Issues

"No bot token" Error

❌ Error: Missing Telegram Bot Token

Solution: Set the TELEGRAM_BOT_API_TOKEN environment variable:

export TELEGRAM_BOT_API_TOKEN="your_token_here"
npx telegram-bot-mcp-server

"Something went wrong" Errors (Legacy)

This has been replaced with detailed error messages. Update to the latest version for better error reporting.

NPX Command Not Found

Solution: Ensure Node.js 18+ is installed:

node --version  # Should be 18.0.0 or higher
npm --version   # Should be included with Node.js

Permission Errors

Solution: On Unix systems, you may need to use sudo for global installation:

sudo npm install -g telegram-bot-mcp-server

Debug Mode

Set NODE_ENV=development for additional debug information:

NODE_ENV=development npx telegram-bot-mcp-server

📚 Usage Examples

Basic Message Sending

// Through MCP client
await sendMessage({
  chatId: "@username",
  text: "Hello! This is a test message."
});

Long Message Handling

// Messages over 4096 characters are automatically split
await sendMessage({
  chatId: "123456789",
  text: "Very long message content..." // Will be split automatically
});

Photo with Long Caption

await sendPhoto({
  chatId: "123456789",
  media: "https://example.com/photo.jpg",
  text: "Very long caption..." // Will be split if needed
});

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes: git commit -am 'Add feature'
  6. Push to the branch: git push origin feature-name
  7. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

💬 Support

☕ Support the Project

If you find this project helpful, consider supporting the developer:

Buy Me A Coffee

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Telegram Bot MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/telegram-bot-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related communication social MCP Servers

Alternative and complementary servers in the same category

View all in communication social →

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

52
Communication

Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

Repository stats unavailable
Communication