Skip to main content
Glama
Telegram Web MCP Server

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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      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