Telegram Ads
v0.1.3MCP server for the official Telegram Ads API: ads, budgets, stats, audiences and pixels.
Values you need
| Variable | What it is | |
|---|---|---|
TELEGRAM_ADS_TOKEN | required secret | Telegram Ads API token from https://ads.telegram.org/account/api |
TG_ADS_MODE | optional | read-only (default) or write. Write tools also require confirm: true. Default: read-only |
TG_ADS_CODE_MODE | optional | off, read-only (default) or write. Controls the tg_execute sandbox. Default: read-only |
TG_ADS_ALLOWED_ACCOUNTS | optional | Optional comma-separated allowlist for explicit account_id values. |
TG_ADS_MAX_CPM | optional | Optional per-call CPM cap in the account currency. |
TG_ADS_MAX_AD_BUDGET | optional | Optional per-call ad budget or transfer cap in the account currency. |
TG_ADS_MAX_DAILY_BUDGET | optional | Optional per-call daily budget limit in the account currency. |
TG_ADS_AUDIT_LOG | optional | Optional path to a JSONL audit log. |
TG_ADS_TIMEOUT_MS | optional | 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.3Add 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
- Ask the user for: TELEGRAM_ADS_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- 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, ….
- 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