Skip to main content
Glama
sh0tn1k

telegram-ads

by sh0tn1k

telegram-ads

ads.telegram.org 用のエージェントプラグイン: 型付きツール、Playwright ログイン、読み取り専用ウォッチャー。

エージェントに git URL を渡します。自己インストールします。MCP サーバーをホストする必要はありません。

MCP はローカル

MCP エントリポイントは、エージェントが起動する stdio 子プロセス です:

agent  --stdin/stdout JSON-RPC-->  python -m hermes_telegram_ads.mcp

公開ポートも VPS デーモンも、維持する URL もありません。Chromium はエージェントと同じマシンで動作します。Playwright MCP と同じルールです。

Related MCP server: telegram-user-mcp

インストール

Hermes Agent

hermes plugins install https://github.com/sh0tn1k/telegram-ads.git --enable

その後、after-install.md に従ってください (venv pip、playwright install chromium、TELEGRAM_ADS_PHONE、ゲートウェイ再起動、telegram_ads_login_from_env + Telegram で Accept)。

読み取り専用ウォッチャーがチャットを起こせるように、watcher inject を許可します:

plugins:
  entries:
    telegram-ads:
      allow_gateway_injection: true

Claude Code

/plugin marketplace add https://github.com/sh0tn1k/telegram-ads.git
/plugin install telegram-ads@telegram-ads

環境に TELEGRAM_ADS_PHONE を設定します。最初の変更呼び出しは Claude Code 自身の権限プロンプトを使用します (Hermes の Once/Session/Always カードは Hermes にのみ存在します)。

その他の MCP エージェント (Cursor、…)

pip install -e '.[mcp]'
python -m playwright install chromium

エージェントをこのチェックアウトに向けてください:

{
  "mcpServers": {
    "telegram-ads": {
      "command": "python",
      "args": ["-m", "hermes_telegram_ads.mcp"]
    }
  }
}

初回ログイン (すべてのホスト)

  1. ホスト環境の TELEGRAM_ADS_PHONE (git には絶対に置かない)。

  2. telegram_ads_login_from_env を呼び出します。

  3. Telegram アプリで Accept をタップします。

  4. クッキーは永続的な Chromium プロファイルに残ります (TELEGRAM_ADS_HOME、Hermes が存在する場合は ~/.hermes/data/telegram_ads、それ以外は ~/.telegram-ads)。

安全性

  • 変更にはホストの承認が必要です (Hermes の Once/Session/Always/Deny、または MCP クライアントの権限 UI)。「yes」と入力して確認しないでください。

  • ウォッチャーは読み取り専用です。同じ Ads プロファイルで 2 つ目の Playwright を起動しないでください。

  • 2 つ目の Telegram getUpdates ポーラーを起動しないでください。このプラグインはホストボットを再利用します。

  • hermes serve / MCP HTTP を 0.0.0.0 にバインドしないでください。

このプラグインに含まれないもの

Telegram リサーチ (Telethon)、GrokBot アイデンティティ、チャンネルポートフォリオ、/sessions。これらはオペレーターホストに残ります。

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Typed MCP server for OpenAI Ads and ChatGPT Ads via the Advertiser API. Supports account, campaign, ad group, ad, creative, audience, insight, and conversion tools with readonly mode and guarded writes.
    12
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Integrates Telegram user account with MCP, exposing operations like reading and sending messages, managing chats, and more via stdio or SSE transport.
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that lets AI agents read and manage Telegram Ads campaigns, including listing accounts and ads, reading stats and budgets, and creating/updating ads, CPM, status, and budget by driving the real ads.telegram.org web UI through Playwright with a reused cookie-based login session.
    11
    1
    MIT