DT

dlhellme/telegram-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

31 stars 4 forks 品質 65 トレンド 11MIT

Claude デスクトップ用の強力な Telegram MCP により、Telegram コンテンツをスクレイピングおよび解析できます.

概要

Claude が Telegram チャネルやグループとやり取りできる強力な MCP (Model Context Protocol) サーバー。 このサーバーは、WebスクレイピングとダイレクトAPIアクセスの両方をTelegramコンテンツに提供します。 - Webスクレイピングよりも - TelegramのMTProtoプロトコルを介して直接アクセス - チャネル内の検索機能 - 会員であるプライベートチャネルへのアクセス - 完全なメッセージメタデータ(ビュー、反応、転送) - 持続的なセッション - 一度認証 - ブラウザの自動化は必要ありません - デフォルトで - APIの資格情報は必要ありません - Puppeteerでブラウザベースのスクレイピング - 制限されたコンテンツの認証サポート - ビジュアルメディア抽出 - 迅速かつ匿名アクセスに適しています - Node.js 18.0.0 以上 - Chrome/Chromium (Webスクレイピングモード用) - Telegram API の認証情報 (API モード用) - 詳細はこちら 4。 .env を編集し、設定を追加します。 - API モードの場合: あなたの TELEGRAM API ID と TELEGRAM API HASH - ウェブスクレイピングの場合: デフォルト設定は、ボックスから動作します 1. [https://my.telegram.に移動

概要(AI 翻訳)

Claude が Telegram チャネルやグループとやり取りできる強力な MCP (Model Context Protocol) サーバー。 このサーバーは、WebスクレイピングとダイレクトAPIアクセスの両方をTelegramコンテンツに提供します。

OST の特徴

バージョン 0.3.0 - デュアルモード操作

###APIモード(推奨) ⚡ -Webスクレイピングよりも100x高速

  • TelegramのMTProtoプロトコルによる直接アクセス
  • チャネル内の検索機能
  • 会員専用チャネルへのアクセス
  • 完全なメッセージメタデータ(ビュー、反応、転送)
  • 持続的なセッション - 一度認証
  • ブラウザの自動化は必要ありません -** デフォルトで制限されていない投稿の検索**

#####Webスクレイピングモード ポータブル

  • APIの資格情報は必要ありません
  • Puppeteerでブラウザベースのスクレイピング
  • 制限されたコンテンツの認証サポート
  • ビジュアルメディア抽出
  • 速く、無声アクセスのために適した

受託者

  • Node.js 18.0.0以上
  • クロム/クロム(Webスクレイピングモード用)
  • Telegram API の認証情報 (API モードの場合) - こちら

️️ インストール

  1. このリポジトリをクローンする:

  2. 依存関係を取付けて下さい:

  3. 環境ファイルのコピー:

  4. [.env を編集し、設定を追加します

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Telegram MCP Server

A powerful MCP (Model Context Protocol) server that enables Claude to interact with Telegram channels and groups. This server provides both web scraping and direct API access to Telegram content.

🚀 Features

Version 0.3.0 - Dual Mode Operation

  • 100x faster than web scraping
  • Direct access via Telegram’s MTProto protocol
  • Search functionality within channels
  • Access to private channels you’re a member of
  • Complete message metadata (views, reactions, forwards)
  • Persistent sessions - authenticate once
  • No browser automation needed
  • Unlimited post retrieval by default

Web Scraping Mode 🌐

  • No API credentials required
  • Browser-based scraping with Puppeteer
  • Authentication support for restricted content
  • Visual media extraction
  • Suitable for quick, anonymous access

📋 Prerequisites

  • Node.js 18.0.0 or higher
  • Chrome/Chromium (for web scraping mode)
  • Telegram API credentials (for API mode) - Get them here

🛠️ Installation

  1. Clone this repository:
git clone https://github.com/DLHellMe/telegram-mcp-server.git
cd telegram-mcp-server
  1. Install dependencies:
npm install
  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env and add your configuration:

    • For API mode: Add your TELEGRAM_API_ID and TELEGRAM_API_HASH
    • For web scraping: Default settings work out of the box
  2. Build the project:

npm run build

🔧 Configuration

Getting Telegram API Credentials

  1. Go to https://my.telegram.org
  2. Log in with your phone number
  3. Click “API development tools”
  4. Create a new application
  5. Copy your api_id and api_hash to the .env file

Claude Desktop Configuration

Add this to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "telegram-scraper": {
      "command": "node",
      "args": ["/absolute/path/to/telegram-mcp-server/dist/index.js"],
      "env": {
        "TELEGRAM_API_ID": "your_api_id",
        "TELEGRAM_API_HASH": "your_api_hash"
      }
    }
  }
}

📖 Usage

After configuration, restart Claude Desktop. The Telegram tools will be available in Claude.

API Mode Tools

  1. telegram_api_login - Authenticate with Telegram (first time only)

    Use telegram_api_login to connect to Telegram
    
  2. api_scrape_channel - Scrape channel posts (unlimited by default)

    Use api_scrape_channel with url="https://t.me/channelname"
    

    Or with a limit:

    Use api_scrape_channel with url="https://t.me/channelname" and max_posts=50
    
  3. api_search_channel - Search within a channel

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "telegram-scraper": { "command": "node", "args": ["/absolute/path/to/telegram-mcp-server/dist/index.js"], "env": { "TELEGRAM_API_ID": "your_api_id", "TELEGRAM_API_HASH": "your_api_hash" } } } }