Telegram-mcp-server

Telegram-mcp-server

A dual-mode MCP server enabling Claude to access Telegram channels and groups via API or web scraping.

25
Stars
3
Forks
0
Releases

Overview

A versatile MCP (Model Context Protocol) server that lets Claude interact with Telegram channels and groups. It supports two operation modes: API Mode, leveraging Telegram's MTProto protocol for direct content access (faster, with search within channels, and access to private channels you are a member of), and Web Scraping Mode, which uses Puppeteer to scrape publicly accessible content without API credentials. API Mode provides complete message metadata (views, forwards, reactions), persistent sessions, no browser automation, and unlimited post retrieval by default. Web Scraping Mode requires no API credentials, offers authentication for restricted content, and can extract visual media from posts. The server is designed to run on Node.js 18+ with optional Telegram API credentials for API mode, and can be integrated with Claude Desktop via a configuration snippet that defines the server and environment variables. It stores session data and cookies in platform-specific directories, includes notable security considerations (never commit .env, personal API credentials, etc.), and provides development commands for building, running in dev mode, and watching for changes. Overall, it enables flexible Telegram content access in Claude with both fast API access and browser-based scraping options.

Details

Owner
DLHellMe
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

API Mode: MTProto access

Direct access to Telegram content via MTProto, enabling faster retrieval (100x faster than scraping).

API Mode: Channel search

In-channel search functionality to locate posts by keywords.

API Mode: Private channel access

Access to private channels you are a member of.

API Mode: Rich metadata

Return complete message metadata including views, reactions, and forwards.

API Mode: Persistent sessions

Maintain authenticated sessions so you only log in once.

API Mode: No browser automation

No browser automation required when using API mode.

API Mode: Unlimited posts

Unlimited post retrieval by default in API mode.

Web Scraping Mode: No API credentials

Public content scraping without Telegram API credentials, using Puppeteer.

Audience

Claude usersAccess Telegram channels and groups within Claude, with search and retrieval capabilities.
DevelopersIntegrate Telegram content into Claude-enabled workflows via API or scraping.

Tags

TelegramMCPClaudeAPIMTProtoWeb ScrapingPuppeteerChannelsGroupsPrivate channelsSearchMetadataSessionsNode.jsChromium