Telegram Ads

v0.1.3
io.github.furkankoykiran/telegram-ads Checked 9 hours ago Published 10 days ago

MCP server for the official Telegram Ads API: ads, budgets, stats, audiences and pixels.

Values you need

VariableWhat it is
TELEGRAM_ADS_TOKENrequired secret Telegram Ads API token from https://ads.telegram.org/account/api
TG_ADS_MODEoptional read-only (default) or write. Write tools also require confirm: true. Default: read-only
TG_ADS_CODE_MODEoptional off, read-only (default) or write. Controls the tg_execute sandbox. Default: read-only
TG_ADS_ALLOWED_ACCOUNTSoptional Optional comma-separated allowlist for explicit account_id values.
TG_ADS_MAX_CPMoptional Optional per-call CPM cap in the account currency.
TG_ADS_MAX_AD_BUDGEToptional Optional per-call ad budget or transfer cap in the account currency.
TG_ADS_MAX_DAILY_BUDGEToptional Optional per-call daily budget limit in the account currency.
TG_ADS_AUDIT_LOGoptional Optional path to a JSONL audit log.
TG_ADS_TIMEOUT_MSoptional Per-request timeout in milliseconds. Default: 30000

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add telegram-ads -e 'TELEGRAM_ADS_TOKEN=<TELEGRAM_ADS_TOKEN>' -- npx -y telegram-ads-mcp@0.1.3
Add to claude_desktop_config.json
{
  "mcpServers": {
    "telegram-ads": {
      "args": [
        "-y",
        "telegram-ads-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_ADS_TOKEN": "<TELEGRAM_ADS_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "telegram-ads": {
      "args": [
        "-y",
        "telegram-ads-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_ADS_TOKEN": "<TELEGRAM_ADS_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "TELEGRAM_ADS_TOKEN",
      "id": "telegram-ads-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "telegram-ads": {
      "args": [
        "-y",
        "telegram-ads-mcp@0.1.3"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_ADS_TOKEN": "${input:telegram-ads-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.telegram-ads]
command = "npx"
args = ["-y", "telegram-ads-mcp@0.1.3"]
env = { "TELEGRAM_ADS_TOKEN" = "<TELEGRAM_ADS_TOKEN>" }

For AI agents

  1. Ask the user for: TELEGRAM_ADS_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: tg_get_account, tg_get_account_info, tg_account_budget, tg_list_ads, tg_get_ads, tg_create_ad, tg_update_ad, tg_ad_budget, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json