Telegram Web MCP Server
Allows AI agents to interact with Telegram Web, providing tools for searching chats, retrieving chat history, sending messages, and getting profile info.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegram Web MCP ServerSearch for 'Design Team' chat and show recent messages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 Telegram Web MCP Server
A powerful, token-efficient Model Context Protocol (MCP) server that lets AI agents interact with Telegram Web — without wasting tokens on DOM trees and screenshots.
🤔 The Problem
Existing approaches to Telegram automation for AI agents either:
Require Telegram Bot API tokens (limiting you to bot-only features)
Use heavy browser automation that wastes thousands of tokens parsing HTML DOMs and analyzing screenshots
Provide no persistent session, requiring re-authentication every time
Related MCP server: telegram-mcp
✅ The Solution
This MCP server provides a clean, text-based API layer over a persistent Playwright browser session. Your AI agent gets structured text responses instead of raw HTML — cutting token usage by 10-50x compared to generic browser automation.
✨ Features
Tool | Description |
| Find and open a chat by username |
| Retrieve recent chat names/titles and metadata |
| Get the most recent text messages |
| Retrieve user profiles and bios |
| Send messages to the active chat |
| Upload documents/files to a chat |
| Upload images/photos to a chat |
| Reply directly to a specific message |
Key Design Decisions
🔋 Token Efficient — Returns clean text, not complex HTML DOMs
💾 Persistent Session — Log in once, session is saved permanently
🤖 AI-Ready — Includes dedicated skill guides for Claude, Cursor, and Antigravity
🔒 Local-First — Runs on your machine, no data sent to third parties
📦 Installation
git clone https://github.com/Fayzullo637/mytelegrammini1-mcp.git
cd mytelegrammini1-mcp
npm install
npx playwright install chromium🚀 Usage
With Claude Desktop / Antigravity
Add to your MCP config:
{
"mcpServers": {
"telegram": {
"command": "npx",
"args": ["tsx", "src/index.ts"],
"cwd": "/path/to/mytelegrammini1-mcp"
}
}
}Then ask your AI: "Search for @username on Telegram and send them a message"
🛠️ Tech Stack
TypeScript — Type-safe server implementation
Playwright — Reliable browser automation with persistent contexts
MCP SDK — Standard Model Context Protocol interface
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License — see the LICENSE file for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, send, and organize Telegram messages and chats. Supports tools for listing chats, fetching messages, sending/reply, archiving, muting, and folder management.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with a user's Telegram account: list chats, read history, search, and send messages through Telegram's MTProto API.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to test Telegram bots by driving the official Telegram Web client in a real browser, allowing visual verification of bot responses, inline keyboards, and Mini Apps.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to operate a Telegram account through the same commands as the terminal client: messaging, chat management, voice transcription, calls, stickers, and privacy settings.1MIT