mcp-telegram-agent
Telegram Bot API server that lets an AI agent send messages, files, polls and read replies
mcp-telegram-agent is an open-source MCP server for communication. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Telegram
- Runs
- Locally
- What it can do
- Can change data (4 tools)
- Version
- 0.2.0
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-telegram-agent -- uvx mcp-telegram-agentAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-telegram-agent": {
"command": "uvx",
"args": [
"mcp-telegram-agent"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-telegram-agent": {
"command": "uvx",
"args": [
"mcp-telegram-agent"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-telegram-agent": {
"command": "uvx",
"args": [
"mcp-telegram-agent"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-telegram-agent": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-telegram-agent"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-telegram-agent -- uvx mcp-telegram-agentOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-telegram-agent]
command = "uvx"
args = ["mcp-telegram-agent"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-telegram-agent": {
"command": "uvx",
"args": [
"mcp-telegram-agent"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Or run: gemini mcp add -s user mcp-telegram-agent uvx -- mcp-telegram-agent
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-telegram-agent": { "command": "uvx", "args": [ "mcp-telegram-agent" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About mcp-telegram-agent
Everything runs through a Telegram bot token, so no personal account login, SMS code or session file is involved. The server is a Python package started with uvx, and it also installs a shorter command alias, tg-agent. It works with MCP clients such as Cline and Claude Desktop.
Outgoing tools cover text with Markdown or HTML, local documents, photos, videos and albums of two to ten files, plus polls, quizzes, locations, contact cards and dice. Messages can carry inline keyboards with URLs or callback data, or custom reply keyboards, and can be edited or deleted later. Every tool takes an optional chat_id, with TELEGRAM_DEFAULT_CHAT_ID as the fallback.
Receiving is opt-in. get_updates and wait_for_reply can fetch or long-poll text replies, button clicks and poll answers, but only after you set allowlists of chat or user IDs. The first get_updates call consumes all pending updates unless mark_read is false. Telegram only keeps a button callback valid for a few seconds, so button clicks are answered automatically by default.
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 4 of 6 tools change data.
From the server's own tool labels and tool names; not verified by us.
- send_text_messageName suggests: changes
- Sends Markdown or HTML text with inline buttons or custom reply keyboards.
- send_local_documentName suggests: changes
- Sends any local file such as PDF, CSV, code, logs or archives.
- send_local_photoName suggests: changes
- Sends image files with captions and inline buttons.
- get_updatesName suggests: reads
- Fetches text replies, button clicks and poll answers from allowlisted chats.
- wait_for_replyName suggests: changes
- Long-polls for a user reply.
- answer_callback_queryName suggests: reads
- Acknowledges a button press.
What it does
- Bot token only
- One token from BotFather is the only credential, so no personal Telegram session is exposed.
- Rich message types
- Sends text, local documents, photos, videos, multi-file albums, polls, quizzes, locations, contacts and dice.
- Inline and reply keyboards
- Messages can include inline buttons with URLs or callback data, or custom reply keyboards.
- Message lifecycle
- Bot status such as typing or uploading can be shown, and sent messages can be edited or deleted.
- Reply reading
- get_updates and wait_for_reply return text messages, button clicks and poll answers from allowlisted chats and users.
- Any chat at runtime
- A chat_id on any call overrides the default, so one bot can write to users, groups and channels it belongs to.
Good for
- Send a finished report or log file from a coding agent to your phone
- Ask a human to approve a step with inline buttons and wait for the answer
- Post build or job status updates to a group or channel
- Run a quick poll or quiz in a chat from an agent workflow
- Deliver generated images, audio or video to a Telegram chat
Pricing
Open source
More servers for the same service
mcp-telegram-agent FAQ
What do I need to get started?
A bot token from @BotFather and a chat ID; the person must press Start on the bot before it can message them.
Are all environment variables required?
No. All four are optional, and a missing one only produces an error when a tool call needs it.
Can mcp-telegram-agent post to groups and channels?
Yes, if the bot is a member of the group, or an administrator of the channel.
Why does get_updates return a setup hint?
Interactive receive is disabled until TELEGRAM_ALLOWED_CHAT_IDS or TELEGRAM_ALLOWED_USER_IDS is set.
Does mcp-telegram-agent use my personal Telegram account?
No. It uses only the Bot API.
Is mcp-telegram-agent free?
Yes. mcp-telegram-agent is open source, so you can use and self-host it for free.
How do I add mcp-telegram-agent to Claude Code?
Run this command in your terminal: claude mcp add mcp-telegram-agent -- uvx mcp-telegram-agent
What are the best alternatives to mcp-telegram-agent?
The closest alternatives to mcp-telegram-agent are TrendRadar, TryPost, Discord MCP, Gmail MCP and Getmitra.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.
