Skip to main content
Glama
Fayzullo637

Telegram Web MCP Server

by Fayzullo637

🚀 Telegram Web MCP Server

TypeScript Playwright MCP License: MIT

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

search_chats

Find and open a chat by username

get_recent_chats

Retrieve recent chat names/titles and metadata

get_chat_history

Get the most recent text messages

get_profile_info

Retrieve user profiles and bios

send_message

Send messages to the active chat

send_file

Upload documents/files to a chat

send_photo

Upload images/photos to a chat

reply_to_message

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to interact with a user's Telegram account: list chats, read history, search, and send messages through Telegram's MTProto API.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables 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.
    1
    MIT