Telegram Bot API integration via MCP
Project description
🚀 telegram-mcp-kit
MCP server that exposes the Telegram Bot API as tools for Claude Code (or any MCP client).
Table of Contents
- 🚀 Quick Start
- 🛠️ Installation
- 📦 Features
- 🤝 How to Contribute
- 💬 Community & Support
- 👥 Repo Contributors
- ⚖️ License
- 🌟 Star History
🚀 Quick Start
Get your bot token from @BotFather on Telegram. Once the server is configured, you can run /mcp inside Claude Code to verify it is connected.
🛠️ Installation
Get your bot token from @BotFather on Telegram first.
Option 1: From PyPI (recommended)
claude mcp add telegram-mcp-kit \
-e TELEGRAM_BOT_TOKEN=your-bot-token-here \
-e TELEGRAM_CHAT_ID=your-chat-id \
-- uvx telegram-mcp-kit
Manual MCP config
{
"mcpServers": {
"telegram-mcp-kit": {
"command": "uvx",
"args": ["telegram-mcp-kit"],
"env": {
"TELEGRAM_BOT_TOKEN": "your-bot-token-here",
"TELEGRAM_CHAT_ID": "your-chat-id"
}
}
}
}
Option 2: From GitHub
claude mcp add telegram-mcp-kit \
-e TELEGRAM_BOT_TOKEN=your-bot-token-here \
-e TELEGRAM_CHAT_ID=your-chat-id \
-- uvx --from "git+https://github.com/QuocTang/telegram-mcp-kit.git" telegram-mcp-kit
Manual MCP config
{
"mcpServers": {
"telegram-mcp-kit": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/QuocTang/telegram-mcp-kit.git",
"telegram-mcp-kit"
],
"env": {
"TELEGRAM_BOT_TOKEN": "your-bot-token-here",
"TELEGRAM_CHAT_ID": "your-chat-id"
}
}
}
}
Option 3: From source
git clone https://github.com/QuocTang/telegram-mcp-kit.git
cd telegram-mcp-kit
cp .env.example .env # add your TELEGRAM_BOT_TOKEN
uv sync
claude mcp add telegram-mcp-kit \
-- uv run --directory /absolute/path/to/telegram-mcp-kit telegram-mcp-kit
Manual MCP config
{
"mcpServers": {
"telegram-mcp-kit": {
"command": "uv",
"args": [
"run",
"--directory",
"/absolute/path/to/telegram-mcp-kit",
"telegram-mcp-kit"
]
}
}
}
With this option,
TELEGRAM_BOT_TOKENis read from the.envfile inside the project directory.
Environment variables
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Yes | Token from BotFather |
TELEGRAM_CHAT_ID |
No | Default chat ID (if set, chat_id can be omitted in tool calls) |
MCP_TRANSPORT |
No | stdio (default) or sse |
MCP_HOST |
No | Bind host (default 127.0.0.1) |
MCP_PORT |
No | Bind port (default 8000) |
HTTP_TIMEOUT |
No | Telegram API timeout in seconds (default 30) |
📦 Features
| 🚀 Feature | 📝 Description |
|---|---|
| 🛠️ 20+ Tools | Comprehensive coverage for messages, chat management, files/photos, and bot info. |
| 🔍 Auto-discovery | Simply add a Python file to the tools/ folder and it registers automatically. |
| 📡 Flexible Transport | Works seamlessly over stdio (for local clients) or SSE (remote/Docker). |
Tools List
Messages
| Tool | Description |
|---|---|
send_message |
Send a text message (Markdown/HTML) |
edit_message |
Edit an existing message |
delete_message |
Delete a message |
forward_message |
Forward a message between chats |
Updates
| Tool | Description |
|---|---|
get_updates |
Fetch recent messages/updates the bot received |
Chat management
| Tool | Description |
|---|---|
get_chat_info |
Get chat metadata (name, type, description) |
get_chat_member_count |
Count members |
get_chat_admins |
List administrators |
ban_member |
Ban a user |
unban_member |
Unban a user |
set_chat_title |
Change group/channel title |
set_chat_description |
Change group/channel description |
pin_message |
Pin a message |
unpin_message |
Unpin a message |
Files & photos
| Tool | Description |
|---|---|
send_photo |
Send a photo by URL or file_id |
send_photo_file |
Send a local photo file |
send_document |
Send a document by URL or file_id |
send_document_file |
Send a local file as document |
get_file_info |
Get file metadata + download link |
Bot
| Tool | Description |
|---|---|
get_bot_info |
Get bot name, username, etc. |
🤝 How to Contribute
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature.
- Submit a Pull Request.
See CONTRIBUTING.md for how to add new tools.
Development
uv sync # install all deps (including dev)
uv run pytest -v # run tests
uv run ruff check src/ tests/ # lint
💬 Community & Support
If this repository saves you time, please star the repository!
👥 Repo Contributors
Made with contrib.rocks.
⚖️ License
MIT License. See LICENSE for details.
🌟 Star History
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telegram_mcp_kit-0.2.3.tar.gz.
File metadata
- Download URL: telegram_mcp_kit-0.2.3.tar.gz
- Upload date:
- Size: 48.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7424dcc358e3e404b4d52326ab591b3739132f3b52afabfdda4dbaa494596f2e
|
|
| MD5 |
d391f6f78611d8dbe7a516757dc9e916
|
|
| BLAKE2b-256 |
d295dc9a22021e6cb05062d28427304159e704acc1196ddcb1a6b69a92c69ee0
|
Provenance
The following attestation bundles were made for telegram_mcp_kit-0.2.3.tar.gz:
Publisher:
publish.yml on QuocTang/telegram-mcp-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
telegram_mcp_kit-0.2.3.tar.gz -
Subject digest:
7424dcc358e3e404b4d52326ab591b3739132f3b52afabfdda4dbaa494596f2e - Sigstore transparency entry: 1408033686
- Sigstore integration time:
-
Permalink:
QuocTang/telegram-mcp-kit@cda8a96e90fac930e1e1a58aa51bc10310cfb412 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/QuocTang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cda8a96e90fac930e1e1a58aa51bc10310cfb412 -
Trigger Event:
push
-
Statement type:
File details
Details for the file telegram_mcp_kit-0.2.3-py3-none-any.whl.
File metadata
- Download URL: telegram_mcp_kit-0.2.3-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f86cefa2eb9fa7501b2a7b3bebad4869e178d68e23f52ce148aebd1e26ce0802
|
|
| MD5 |
ecff75e279ec26384128564b87acec35
|
|
| BLAKE2b-256 |
2cc6ba3e0ba157a2fc70f7f4b35de9505e2961da82de7da2a35a8e88c8ba3172
|
Provenance
The following attestation bundles were made for telegram_mcp_kit-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on QuocTang/telegram-mcp-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
telegram_mcp_kit-0.2.3-py3-none-any.whl -
Subject digest:
f86cefa2eb9fa7501b2a7b3bebad4869e178d68e23f52ce148aebd1e26ce0802 - Sigstore transparency entry: 1408033783
- Sigstore integration time:
-
Permalink:
QuocTang/telegram-mcp-kit@cda8a96e90fac930e1e1a58aa51bc10310cfb412 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/QuocTang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cda8a96e90fac930e1e1a58aa51bc10310cfb412 -
Trigger Event:
push
-
Statement type: