Skip to main content
Glama
VK Ads MCP

VK Ads MCP

VK Реклама MCP

npm CI Glama License: MIT

VK Реклама MCP connects an AI app to the VK Ads advertising account. You can ask which campaigns spend budget without results, compare ad groups and ads, prepare a new campaign, or change a bid. Unlike manually navigating the account sections, the assistant matches campaigns, statistics, balance, and statuses in one dialogue.

  • 18 tools. Campaigns, ad groups, ads, statistics, balance, API limits, regions, and a universal API request.

  • Live advertising. Bids, budgets, and spend are shown in the advertising account's currency — no micro-unit conversion.

  • Full hierarchy. Campaign (ad_plan) → ad group (ad_group) → ad (banner).

  • Analysis first. Lists, reports, balance, and statuses are read-only.

  • Changes go to the live account. Creating, updating, and status actions apply immediately; VK Ads has no sandbox.

Start with a safe request:

Show the campaigns of my VK Рекламы account and spend for the past week by ad groups.

Connect server · View scenarios · Open technical documentation


See it work in a minute

Related MCP server: vk-ads-mcp

Contents

Quick start

You need Node.js 20 or newer and a VK Ads access token. The server runs via npx, so you don't need to install the package separately.

  1. Get a token and add the server to your AI app — instructions for five apps below.

  2. Ask: "Show the campaigns of my VK Рекламы account and spend for the past week by ad groups."

Via the app interface:

  1. Open Settings → Plugins → MCP servers.

  2. Click Add server.

  3. Add the launch command npx -y mcp-vk-ads@latest and the environment variable VK_ADS_TOKEN with your token.

Via the command line:

codex mcp add vk-ads \
  --env VK_ADS_TOKEN=ваш_токен \
  -- npx -y mcp-vk-ads@latest

Check the connection:

codex mcp list

Official Codex guide

claude mcp add \
  --env VK_ADS_TOKEN=ваш_токен \
  --transport stdio \
  --scope user \
  vk-ads \
  -- npx -y mcp-vk-ads@latest

Check the server:

claude mcp list

Claude Code documentation

Open Settings → Developer → Edit Config and add the server to claude_desktop_config.json:

{
  "mcpServers": {
    "vk-ads": {
      "command": "npx",
      "args": ["-y", "mcp-vk-ads@latest"],
      "env": {
        "VK_ADS_TOKEN": "ваш_токен"
      }
    }
  }
}

If Edit Config is unavailable, edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows.

For all projects, create ~/.cursor/mcp.json; for the current project only — .cursor/mcp.json:

{
  "mcpServers": {
    "vk-ads": {
      "command": "npx",
      "args": ["-y", "mcp-vk-ads@latest"],
      "env": {
        "VK_ADS_TOKEN": "ваш_токен"
      }
    }
  }
}

Cursor documentation

Open the command palette and run MCP: Open User Configuration. Add to mcp.json:

{
  "servers": {
    "vk-ads": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-vk-ads@latest"],
      "env": {
        "VK_ADS_TOKEN": "${input:vk_ads_token}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "vk_ads_token",
      "description": "Access-токен VK Ads",
      "password": true
    }
  ]
}

Check the launch with the MCP: List Servers command.

VS Code documentation

What you can delegate

Understand spend and results

  • "Show spend, impressions, clicks, and CTR by campaigns for the last 7 days."

  • "Which ads spend the most and bring no results?"

  • "Compare ad groups within this campaign by spend and clicks."

Understand why ads aren't showing

  • "Show the status, delivery, and moderation of all ads in this group."

  • "Which campaigns are currently paused?"

  • "Find ads that didn't pass moderation."

Prepare changes to ads

  • "Create a text campaign with a daily budget of 5,000 rubles."

  • "Change the daily budget of this group to 1,500 rubles."

  • "Pause ad 12345."

Such commands change the live account. Before calling, make sure the assistant correctly identified the campaign, group, ad, and amount.

Find data for configuration

  • "Show the balance and currency of my account."

  • "How many API requests are left?"

  • "Find the region ID for Moscow for targeting."

How VK Рекламы objects work

Object

Role

Campaign (ad_plan)

Top level: name, budget, bid, and work period.

Ad group (ad_group)

Audience and placement settings, own budget and bid.

Ad (banner)

Texts, links, and creative inside the group.

Statistics

Report on campaigns, groups, or ads for a period.

An object has three different states. status can be changed: active, blocked, or deleted. delivery and moderation_status only explain why an object is shown or not; they cannot be changed directly.

What can change data

Action

What happens

Lists, statistics, balance, limits, and regions

Read-only.

Creating and updating campaigns, groups, and ads

Immediately creates or changes an object in the live advertising account.

Status action

Activates, pauses, or deletes an object in the live account.

raw_request

GET reads data; POST and DELETE change it and require confirmWrite=true.

Typed tools for creating, updating, and changing status have no internal confirmWrite parameter. How the AI app requests confirmation depends on its settings. After a network error or 5xx, don't blindly repeat creation: the operation may have already applied; first check the list of objects.

How to get a token

The token is issued by the VK Ads account:

  1. In ads.vk.com, open Settings → API Access and create an app. Save client_id and client_secret. If the section is unavailable, request API access from VK Ads support.

  2. Exchange them for an account access token:

    curl -X POST https://ads.vk.com/api/v2/oauth2/token.json \
      -d grant_type=client_credentials \
      -d client_id=ВАШ_CLIENT_ID \
      -d client_secret=ВАШ_CLIENT_SECRET
  3. Take access_token from the response and save it as VK_ADS_TOKEN.

The token grants access to the advertising account, including the ability to spend budget, and is stored in plain text in the MCP client configuration. Treat it like a password. If the API responds with invalid_token, issue and provide a new token.

For agencies working with client accounts, the authorization_code flow is needed — see the VK Ads API documentation.

Configuration

Variable

Purpose

VK_ADS_TOKEN

Required OAuth2 access token for VK Ads.

VK_ADS_LANG

API response language; default ru.

VK_ADS_TIMEOUT_MS

Timeout for one request; default 60,000 ms.

VK_ADS_MAX_RETRIES

Number of retries on temporary errors; default 3.

VK_ADS_API_BASE

Base API URL; default https://ads.vk.com/api.

Data, limits, and background operation

  • Pages and large accounts. One list page contains up to 250 objects. With autoPaginate, the server returns no more than 1,000 objects and marks an incomplete result with the _truncated field.

  • API limits. The get_throttling tool shows the current remaining limits. Check it before mass operations.

  • Request retries. Timeout for one request is 60 seconds. The server makes up to three retries: for any method on 429, and for reads also on network error, timeout, and 5xx. The delay respects Retry-After and does not exceed 30 seconds.

  • No background monitoring. The server runs when the AI app calls it. If the app supports scheduled tasks, you can set up periodic requests for statistics or statuses there.

  • Anonymous telemetry. By default, the server sends a random installation ID, event or tool name, server version, Node.js, OS, and AI client. It does not include the token, account data, tool arguments, your messages, or environment variable values. Disable it for Ask Ads MCP servers: ASKADS_TELEMETRY=0.

Technical documentation

Support

Found a bug or missing a scenario? Create an issue or write to Telegram.

Available Tools

23 tools
ad_group_actionДействие над группой объявленийA
Destructive

Меняет статус групп объявлений по id: activate (status=active), stop (status=blocked) или delete (status=deleted).

Inputs: ids (required), action (required).

ad_plan_actionДействие над кампаниейA
Destructive

Меняет статус кампаний по id: activate (status=active), stop (status=blocked) или delete (status=deleted). delete удаляет только саму кампанию: её группы и объявления остаются в прежнем статусе — их удаляют отдельно через ad_group_action и banner_action.

Inputs: ids (required), action (required).

auth_statusСтатус подключения к VK РекламеA
Read-onlyIdempotent

Показывает, подключена ли VK Реклама: есть ли токен, откуда он взят (переменная окружения VK_ADS_TOKEN или сохранённый вход), когда истекает, какой client_id и аккаунт за ним стоят и где лежит файл с сохранёнными данными. Ничего не отправляет в сеть, не показывает ни токен, ни client_secret. Вызовите это, если инструменты VK Рекламы отвечают, что подключение не настроено.

Inputs: no named parameters.

create_ad_groupСоздать группу объявленийA

Создаёт группу объявлений внутри кампании. Таргетинг задаётся в targetings (например, {"geo":{"regions":[188]},"age":{"age_list":[25,26]}}). Денежные поля — в валюте аккаунта. Остальные поля — через extra.

Inputs: name (required), adPlanId (required), extra, price, +8 more.

create_ad_planСоздать кампанию (ad_plan)A

Создаёт кампанию (ad_plan). Денежные поля — в валюте аккаунта. Сложные и редкие поля передаются через extra (подмешиваются в тело запроса как есть). Пустую кампанию VK не создаёт: в adGroups нужен массив новых групп объявлений, у каждой — name, package_id, targetings, а для autobiddingMode=max_goals ещё priced_goal {source_id: id счётчика, name: цель}. Следующие группы добавляет create_ad_group. Кампании на сайт нужна привязка extra.ad_object_type="url" + extra.ad_object_id (id URL-объекта; без неё любой package_id отвергается как invalid_package) — проще всего взять ad_object_id, package_id и priced_goal у существующей кампании и её групп (list_ad_plans / list_ad_groups с нужными fields). budgetLimit и budgetLimitDay одновременно передавать нельзя — только одно из двух. Чтобы ничего не запустилось, передать status="blocked" и в extra, и у каждой группы в adGroups.

Inputs: name (required), extra, dateEnd, adGroups, +6 more.

create_bannerСоздать объявление (banner)A

Создаёт объявление внутри группы объявлений (POST v2/ad_groups/{adGroupId}/banners.json; верхний v2/banners.json — только список). Креатив ссылается на загруженные медиа через content, тексты объявления — в textblocks, ссылки — в urls. Эти структуры отправляются как есть; точная форма для каждого формата объявления — в документации VK Рекламы.

Inputs: adGroupId (required), name, urls, extra, +2 more.

finish_loginЗавершить подключение VK РекламыA
Idempotent

Второй шаг подключения: обменивает client_id и client_secret из start_login на токен доступа (grant client_credentials), сохраняет всё в файл только для владельца (0600) и сразу проверяет живым запросом к VK Рекламе. После успеха остальные инструменты работают немедленно — перезапускать клиент не нужно. Токен живёт около суток и продлевается автоматически, поэтому повторно вызывать это не требуется: каждый вызов создаёт НОВЫЙ токен, а у VK не больше 5 активных токенов на пару client_id + пользователь. Ошибка invalid_client означает, что пара скопирована не полностью или относится к разным приложениям.

Inputs: clientId (required), clientSecret (required).

get_balanceБаланс аккаунтаA
Read-onlyIdempotent

Возвращает текущий баланс аккаунта VK Рекламы: доступные средства и валюту. Вызывает user.json с полем account, в котором лежит кошелёк (account.balance, account.currency). Показывает баланс того аккаунта, на который указывает токен (параметров нет). Важно: точное имя поля с балансом в v3/user.json на новой платформе ads.vk.com не подтверждено на живом кабинете (домен закрыт JS); схема следует объектной модели myTarget/VK Ads (v2/v3). Инструмент отдаёт СЫРОЙ ответ VK без изменений, поэтому вызывающая сторона может аккуратно прочитать account.balance независимо от точной формы ответа — проверить на первом живом аккаунте с доступом read_payments.

Inputs: no named parameters.

get_regionsСписок регионовA
Read-onlyIdempotent

Возвращает гео-регионы VK Рекламы (id, name, type), при необходимости отфильтрованные по подстроке названия. Id регионов нужны для гео-таргетинга группы объявлений.

Inputs: limit, query.

get_statisticsСтатистикаA
Read-onlyIdempotent

Возвращает статистику по кампаниям (ad_plans), группам объявлений (ad_groups) или объявлениям (banners). По умолчанию группировка summary — одна сводная строка (items[].total) на объект: с dateFrom/dateTo — за этот период, без дат — за всё время. day нужна ТОЛЬКО для динамики и вопросов про тренд: добавляет к каждому объекту rows по дням, даты обязательны. Недель и месяцев API не отдаёт — их собирают из day. Ранжирование на стороне сервера (sortBy, например base.spent, и order) и постраничная выдача (limit/offset) работают только в summary с датами — в остальных режимах VK их молча игнорирует, поэтому инструмент вернёт ошибку. Там VK и так отдаёт все объекты одним ответом, так что autoPaginate безвреден в любом режиме. total в ответе — сумма по объектам ЭТОЙ страницы (при фильтре по ids — по этим объектам), а не по всему кабинету. Метрики лежат в base (shows, clicks, spent, ...); spent — в валюте аккаунта.

Inputs: ids, limit, order, dateTo, +7 more.

get_throttlingЛимиты запросов к APIA
Read-onlyIdempotent

Возвращает текущие лимиты запросов VK Рекламы и их остаток (throttling.json) — чтобы не упереться в лимит.

Inputs: no named parameters.

get_user_infoИнформация об аккаунтеA
Read-onlyIdempotent

Возвращает информацию о текущем аккаунте VK Рекламы (user.json), включая additional_info.client_name. Позволяет убедиться, на какой аккаунт рекламодателя указывает токен. Токен гранта client_credentials агентского аккаунта видит объекты самого агентства, а не его клиентов: кабинет клиента открывает только токен гранта agency_client_credentials в VK_ADS_TOKEN.

Inputs: fields.

list_ad_groupsСписок групп объявленийA
Read-onlyIdempotent

Возвращает список групп объявлений с необязательной фильтрацией по id, родительской кампании и статусу. Денежные поля — в валюте аккаунта; в targetings лежит структура таргетинга по гео, демографии и интересам.

Inputs: ids, limit, fields, offset, +3 more.

list_ad_plansСписок кампаний (ad_plans)A
Read-onlyIdempotent

Возвращает список ad_plan (верхнеуровневый объект кампании в VK Рекламе) с необязательной фильтрацией по id и статусу. Денежные поля (budget_limit, budget_limit_day, max_price) — в валюте аккаунта.

Inputs: ids, limit, fields, offset, +2 more.

list_bannersСписок объявлений (banners)B
Read-onlyIdempotent

Возвращает список banner (объект объявления/креатива в VK Рекламе) с необязательной фильтрацией по id, родительской группе объявлений и статусу. moderation_status (pending/allowed/banned) и delivery объясняют, почему объявление показывается или не показывается.

Inputs: ids, limit, fields, offset, +3 more.

logoutОтключить VK РекламуA
Destructive

Удаляет сохранённые токен и данные приложения VK Рекламы с диска. Токен, заданный переменной окружения VK_ADS_TOKEN, не трогает — его нужно убирать из конфигурации клиента вручную. На стороне VK токен остаётся активным до истечения срока: отозвать его можно запросом POST v2/oauth2/token/delete.json, но он удаляет ВСЕ токены этого пользователя для данного client_id, поэтому здесь не вызывается.

Inputs: no named parameters.

raw_requestПроизвольный запрос к API VK РекламыA
Destructive

Универсальный запрос напрямую к любому эндпоинту API VK Рекламы (например, path "v2/ad_plans.json", method GET). Нужен для эндпоинтов, у которых нет отдельного инструмента. query уходит в строку запроса, body отправляется как JSON для POST. GET выполняется свободно; POST и DELETE — запись, для них нужен confirmWrite=true.

Inputs: path (required), body, query, method, +1 more.

start_loginНачать подключение VK РекламыA
Read-onlyIdempotent

Первый шаг подключения VK Рекламы без правки конфигурации и без перезапуска клиента. Ничего не отправляет в сеть — возвращает инструкцию, которую нужно показать пользователю целиком: где в кабинете создать приложение и откуда скопировать client_id и client_secret. Полученную пару передайте в finish_login. Предупредите, что client_secret — это пароль от рекламного кабинета: он сохранится на диске только для владельца и нужен, чтобы продлевать токен.

Inputs: no named parameters.

update_ad_groupИзменить группу объявленийA
Idempotent

Меняет у группы объявлений название, бюджеты, предельную ставку, даты или таргетинг. Денежные поля — в валюте аккаунта. Для смены статуса — ad_group_action.

Inputs: id (required), name, extra, dateEnd, +4 more.

update_ad_planИзменить кампанию (ad_plan)A
Idempotent

Меняет у кампании название, бюджеты, предельную ставку или даты. Денежные поля — в валюте аккаунта. Для смены статуса — ad_plan_action.

Inputs: id (required), name, extra, dateEnd, +3 more.

update_bannerИзменить объявление (banner)A
Idempotent

Меняет у объявления название, текстовые блоки или ссылки. Для смены статуса — banner_action. Структуры отправляются как есть.

Inputs: id (required), name, urls, extra, +1 more.

upload_imageЗагрузить изображениеA

Загружает изображение JPEG или PNG в медиатеку VK Рекламы (multipart POST v2/content/static.json) и возвращает его id и variants. Этот id передаётся в create_banner как content.<слот>={"id": }; какие слоты нужны, зависит от формата (package) группы. Размер картинки должен подходить слоту: например, image_600x600 принимает не шире 600 px, иначе create_banner получит bad_width. Байты передаются base64 без префикса data:, вместе с шириной и высотой картинки в пикселях. При сетевой ошибке или 5xx загрузка могла пройти — не повторять вслепую.

Inputs: width (required), height (required), imageBase64 (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools map cleanly to distinct resources and actions (auth lifecycle, account info, CRUD per campaign/group/banner, media, raw escape hatch). Minor overlap exists between auth_status and get_user_info (both expose token/account introspection) and between update_* and *_action tools, but descriptions explicitly clarify the split. An agent can reliably choose the right tool in practice.

    Naming Consistency4/5

    All names use snake_case, but the verb patterns vary: list/create/update_<resource>, <resource>_action for status changes, get_* for reads, and standalone auth lifecycle verbs (start_login, finish_login, logout). The resource-action split is deliberate and readable, but the set isn't a uniform verb_noun convention throughout.

    Tool Count4/5

    23 tools is on the heavy side of typical MCP servers, but the surface covers a genuinely large domain: auth lifecycle, account/balance/limits/regions, three hierarchical CRUD resources, media upload, and a raw API fallback. Each tool has a distinct role, though some account/support tools could arguably be consolidated.

    Completeness5/5

    The server covers full lifecycle operations for campaigns (ad_plans), ad groups, and banners (list/create/update/status actions), plus auth setup, balance, statistics, regions, throttling, media upload, and a raw_request escape hatch for anything unmapped. Minor omissions (e.g., banner content updates or single-object getters) are workable via list filters or raw_request.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      MCP server for VK Ads API enabling management of campaigns, ads, statistics, targeting, and budgets through natural language.
      8
      30 npm
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Read-only MCP server for analyzing VK Ads campaigns, listing ad structures, retrieving statistics, and generating optimization recommendations.
      8
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for Meta/Facebook Marketing API allowing you to view and manage ad accounts, campaigns, ad sets, ads, and creatives, as well as fetch insights and upload ad images.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      MCP server for VK Ads API (myTarget v2) that allows AI agents to manage advertising accounts: create and modify campaigns, ads, upload creatives, and fetch statistics.
      145 npm
      6
      Apache 2.0