Skip to main content

mcp-telegram-agent

A lightweight, zero-login-risk Model Context Protocol (MCP) server empowering AI agents with Telegram Bot capabilities. Built with Python (SDK-compatible with both mcp 1.x FastMCP and 2.x MCPServer), designed to work seamlessly out-of-the-box with uvx and modern AI coding agents like VS Code Cline and Claude Desktop.

Also includes the ultra-short command alias tg-agent.

繁體中文說明文件


Highlights

  • Pure Bot API Architecture: Zero login session risk, no SMS codes or sensitive credential files needed.
  • Dual CLI Entry Points: Call via standard mcp-telegram-agent or the compact tg-agent alias.
  • Full Keyboard Support: Effortlessly construct dynamic Inline Keyboards (with URLs or callback data) and custom Reply Keyboards.
  • Rich Media & Local Files: Deliver logs, reports, source code, images, audio, voice notes, videos, and multi-image albums (2–10 files).
  • Interactive Tooling: Launch quizzes, single/multiple-choice polls, GPS coordinates, digital contact cards, and animated dice.
  • Message Lifecycle: Broadcast bot statuses (typing, uploading) and edit or delete messages on the fly.
  • Instant uvx Execution: Run directly with no virtual environments or manual package installs.

Quick Start

1. Prerequisites

  • Telegram Bot Token: Obtain one from @BotFather.
  • Chat ID: Get your unique numerical Chat ID by sending any message to @userinfobot.

2. Configuration for AI Clients

Add the configuration below to your MCP settings file (e.g., cline_mcp_settings.json or claude_desktop_config.json):

{
  "mcpServers": {
    "telegram": {
      "command": "uvx",
      "args": ["mcp-telegram-agent"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "YOUR_TELEGRAM_BOT_TOKEN",
        "TELEGRAM_DEFAULT_CHAT_ID": "YOUR_CHAT_ID"
      }
    }
  }
}

Available Tools

  • send_text_message: Send Markdown/HTML text with inline buttons or custom reply keyboards.
  • send_local_document: Send any local file (PDF, CSV, code, logs, archives).
  • send_local_photo: Send image files with captions and inline buttons.
  • send_local_video: Send video files as native players.
  • send_local_audio_or_voice: Send music tracks or native voice audio notes.
  • send_media_album: Deliver 2 to 10 photos or videos as a grouped carousel.
  • send_poll: Create interactive single/multiple choice polls or scored quizzes.
  • send_location: Broadcast map location points via coordinates.
  • send_contact: Share phone contact cards.
  • send_dice: Send animated dice, basketball, football, or slot machines.
  • send_chat_action: Display temporary bot statuses (typing, uploading).
  • edit_message_text: Dynamically update previously sent text and keyboards.
  • delete_message: Clean up or remove specific messages.

License

This project is licensed under the MIT License.

Metadata

Release files for mcp-telegram-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-telegram-agent 0.1.0
File Size Uploaded Provenance Actions
mcp_telegram_agent-0.1.0.tar.gz 89.7 kB Without provenance Details for mcp_telegram_agent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-telegram-agent 0.1.0
File Interpreter ABI Platform Actions
mcp_telegram_agent-0.1.0-py3-none-any.whl Python 3 none any Details for mcp_telegram_agent-0.1.0-py3-none-any.whl

Total release size: 98.8 kB

Release files / mcp_telegram_agent-0.1.0.tar.gz

Download URL mcp_telegram_agent-0.1.0.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b3913605bdef00adc64c17873378f8d86ba19daf61638849388e73408dd937b1
BLAKE2b-256 checksum
How to use checksums
e9f2ceec891419b50faf98a6dc90d85a23b8e1d047e750fb29420260a91940df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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 / mcp_telegram_agent-0.1.0-py3-none-any.whl

Download URL mcp_telegram_agent-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8422c659b9995233512bd65e146c804479fd2f6b5cdeafbb1bd34c6c80c4d9b9
BLAKE2b-256 checksum
How to use checksums
fac5d528cfa9533501a8f8c9c5faadebb8eee2cead69269c26eedd88f3eed89d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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 mcp-telegram-agent 0.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page