agent-telegram-mcp
A robust Model Context Protocol (MCP) server that enables AI agents to seamlessly interact with Telegram using a standard Bot Token. It provides a comprehensive suite of tools for bidirectional communication, including sending and receiving text messages, multimedia, documents, and managing chats.
Installation
Install using pip or uv:
pip install agent-telegram-mcp
or
uv tool install agent-telegram-mcp
Configuration
This MCP server requires a Telegram Bot Token. You can create a new bot and obtain your token by talking to the BotFather on Telegram.
To use this server with MCP-compatible clients (like Claude Desktop, Agent_head, etc.), add it to your server configuration and pass the token as an environment variable:
Example mcp_config.json
{
"mcpServers": {
"agent-telegram-mcp": {
"command": "agent-telegram-mcp",
"env": {
"TELEGRAM_BOT_TOKEN": "123456789:ABCdefGHIjklMNOpqrSTUvwxYZ"
}
}
}
}
Available Tools
The server exposes the following tools to the LLM agent:
✉️ Messaging
telegram_send_message: Send text messages (supports Markdown, HTML, silent messages, and replies).telegram_forward_message: Forward existing messages between chats.telegram_delete_message: Delete a message from a chat (requires bot admin permissions).telegram_pin_message: Pin a message in a group/channel.
🖼️ Media & Files
telegram_send_photo: Send images via a local file path, public HTTP URL, or Telegram file ID.telegram_send_video: Send video files.telegram_send_audio: Send audio tracks (renders as a Telegram music player).telegram_send_voice: Send voice notes (.oggfiles).telegram_send_document: Send arbitrary files (PDFs, ZIPs, code snippets, etc.).telegram_send_sticker: Send.webpstickers.telegram_send_location: Send a geographic map pin via latitude and longitude.
📥 Retrieval & Info
telegram_get_updates: Retrieve recent messages, commands, and callback queries sent to the bot (supports pagination withoffsetandlimit).telegram_get_chat_info: Fetch detailed information about a user, group, or channel.telegram_get_chat_member_count: Check how many users are in a chat.telegram_get_file_info: Retrieve metadata and the download path for a file hosted on Telegram servers.telegram_download_file: Download a file to a specific local path or return its contents as a Base64 string.telegram_get_bot_info: Fetch the current bot's profile information to verify the token connection.
Development & Testing
You can run the server directly via standard I/O (stdio) transport:
export TELEGRAM_BOT_TOKEN="your-token"
# On Windows: set TELEGRAM_BOT_TOKEN=your-token
agent-telegram-mcp
Metadata
Release files for agent-telegram-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_telegram_mcp-0.1.2.tar.gz | 52.7 kB | Without provenance | Details for agent_telegram_mcp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_telegram_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for agent_telegram_mcp-0.1.2-py3-none-any.whl |
Total release size: 60.9 kB
Release files / agent_telegram_mcp-0.1.2.tar.gz
| Download URL | agent_telegram_mcp-0.1.2.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
047aed195ca5d84f04416e43546b38333107ef7ccf3866b3ba5173f61ba5012b
|
|
BLAKE2b-256 checksum How to use checksums |
3b76c55fec726964501794e238901e87476ee418a8b701b53d71c8bad4d9ed35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agent_telegram_mcp-0.1.2-py3-none-any.whl
| Download URL | agent_telegram_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d4aaf5fa6f013e57b8e0e0c6181c74a5ebb41d8147372b8a45b186f0650d6df
|
|
BLAKE2b-256 checksum How to use checksums |
cd221ee6ed535690aea4361a017f9c2fda2ada41ea8d9faacc8a706fbe6b0fbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for agent-telegram-mcp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.