Telegram MCP Agent
Enables AI assistants to operate as remote workers through Telegram, creating an interactive loop where the AI can receive commands, execute tasks, and report back continuously via a Telegram bot and group chat.
README
🤖 Telegram MCP Agent
Turn your AI into a Remote Worker.
Control Claude or Cursor directly from Telegram with a continuous, interactive loop.
✨ Features
- 🔄 Infinite Remote Loop: The AI doesn't just send a message and quit. It enters a "Telegram Mode" loop where it waits for your commands, executes them, and reports back—indefinitely.
- 🔘 Smart Interactive Buttons: Every message comes with context-aware buttons (e.g., "Run Tests", "Fix Bug") for quick 1-tap replies.
- 🗣️ Multi-Language Support: Speaks your language! If you write in Hebrew, it replies in Hebrew.
- 🎨 Rich Formatting: Sends beautiful Markdown messages with bold text, code blocks, and lists.
- 🔌 Universal Support: Optimized for Claude Desktop, Claude Code, and Cursor.
🚀 Quick Start
1. Prerequisites: Setting up Telegram 📱
Before installing, you need to set up your Telegram environment:
- Create a Bot:
- Open @BotFather in Telegram.
- Send
/newbotand follow the instructions to get your Bot Token.
- Create a Supergroup:
- Create a new Group.
- Enable Topics: Go to Group Settings > Chat History > Enable "Topics" (or "Forum"). This is critical!
- Add Bot as Admin:
- Add your new bot to the group.
- Promote it to Admin with full permissions (specifically "Manage Topics").
- Initialize:
- Send a dummy message in the "General" topic of the group (e.g., "Init").
- This ensures the group ID is accessible.
- Get Group ID:
- Forward a message from the group to @RawDataBot (or use another method) to find the Chat ID (usually starts with
-100).
- Forward a message from the group to @RawDataBot (or use another method) to find the Chat ID (usually starts with
2. Installation
We provide an automated installer that sets up everything for you.
python install.py
This script will:
- Install Python dependencies.
- Ask for your Telegram Bot Token and Group ID.
- Configure Claude Desktop and Claude Code automatically.
- Output the configuration needed for Cursor.
2. Activate "Telegram Mode"
To start the remote worker loop, just tell your AI agent:
"I'm leaving. Switch to Telegram." Or in Hebrew: "אני יוצא לקפה, תמשיך מטלגרם."
The AI will:
- Open a new topic in your Telegram Group.
- Send you a message: "I am ready. What should I do?"
- Wait for your reply (blocking execution).
3. Stop the Session
To exit the loop, simply click the "Done for now" (or "סיימנו לעכשיו") button in Telegram.
📂 Configuration Files
CLAUDE.md: Strict rules for Claude Code to enforce the loop and formatting..cursorrules: Auto-detection rules for Cursor and other agents.TELEGRAM_MODE.md: A system prompt you can paste manually if needed.
🛠️ Manual Configuration (Cursor)
To configure Cursor:
- Open Settings (
Ctrl+,orCmd+,). - Navigate to Features > MCP.
- Add a new MCP server with the following details:
{
"name": "telegram-agent",
"type": "stdio",
"command": "python",
"args": ["/absolute/path/to/telegram-mcp/server.py"]
}
(Note: Use the full absolute path to your python executable and the server.py file)
Built with ❤️ for the MCP Community.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.