yandex-direct-mcp

io.github.theYahiaPublished by GitHub account theYahiav3.0.2Updated Oct 24, 2026

MCP server for Yandex Direct — PPC campaigns, ads, keywords, statistics (Russia)

VerifiedSTDIODesktop onlyData & AnalyticsBusiness & Commerce

Overview

AI-generated overview

Local MCP server for Yandex Direct that lets an assistant manage Russian PPC campaigns, ad groups, ads, keywords, bids and statistics.

What you can do
List, inspect, create and update campaigns, including budget and status changes such as suspend, resume or archive. List, create and delete ad groups and set their negative keywords. List, create and update text ads, and suspend, resume, archive, moderate or delete them. List and add keywords, set bids in rubles, manage keyword status and set campaign negative keywords. Retrieve period statistics (impressions, clicks, spend, CTR, CPC), account balance and region codes.
When to use it
Useful when you run Yandex Direct advertising in Russia and want an assistant to draft or adjust campaigns, ads, keywords and bids, or pull performance statistics and balance without opening the web interface.
Requirements
Runs locally via npx (Node.js). Requires a Yandex Direct OAuth token in YANDEX_DIRECT_TOKEN; the token's app must be registered in Yandex OAuth and API access requested in Direct. Optional YANDEX_DIRECT_SANDBOX=1 for the sandbox and YANDEX_DIRECT_LOGIN for agency tokens. Network access to Yandex Direct.
Before you install
Tools such as create_campaign, create_text_ad, add_keywords and set_keyword_bids change the live advertising account and can spend real money; budgets and bids are entered in rubles. Test with YANDEX_DIRECT_SANDBOX=1 first. The OAuth token in YANDEX_DIRECT_TOKEN grants account access and should be kept secret. Some tools delete or archive ads, groups and keywords.

Installation

In SourceWeft

  1. Open yandex-direct-mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@theyahia/yandex-direct-mcp

MCP-сервер для API Яндекс.Директ — управление контекстной рекламой из любого MCP-клиента (Claude, Cursor и др.): кампании, группы, объявления, ключевые слова, ставки, минус-фразы, статистика, баланс. 20 инструментов.

[npm] [License: MIT]

Деньги — в рублях (бюджеты, ставки на вводе и выводе); сервер сам конвертирует в микроединицы API. Поддержаны песочница для безопасного теста и агентский режим (Client-Login).

Установка

Claude Desktop

json
{  "mcpServers": {    "yandex-direct": {      "command": "npx",      "args": ["-y", "@theyahia/yandex-direct-mcp"],      "env": {        "YANDEX_DIRECT_TOKEN": "ваш_токен"      }    }  }}

Claude Code

bash
claude mcp add yandex-direct -e YANDEX_DIRECT_TOKEN=ваш_токен -- npx -y @theyahia/yandex-direct-mcp

Конфигурация (переменные окружения)

ПеременнаяОбязательнаНазначение
YANDEX_DIRECT_TOKENдаOAuth-токен Яндекс.Директ
YANDEX_DIRECT_SANDBOXнет1 — работа в песочнице (изолированные данные, без трат). Тот же токен, отличается только URL
YANDEX_DIRECT_LOGINнетЛогин клиента для агентских токенов (заголовок Client-Login). Обязателен, если токен агентский

Как получить токен

OAuth-токен выпускается для приложения, зарегистрированного в Яндекс OAuth, с доступом к API Директа. Подробности — регистрация приложения и получение токена. Доступ к API нужно запросить в интерфейсе Директа.

⚠️ Внимание: реальные траты

Инструменты create_campaign, create_text_ad, add_keywords, set_keyword_bids и др. меняют боевой рекламный аккаунт и могут расходовать деньги. Для отладки сценариев включайте песочницу (YANDEX_DIRECT_SANDBOX=1).

Инструменты (20)

Кампании

ИнструментОписание
list_campaignsСписок кампаний (фильтр по статусу/типу, пагинация)
get_campaignДетальная информация о кампании по ID
create_campaignСоздать кампанию (бюджет в рублях, выбор стратегии)
update_campaignОбновить название/бюджет и/или статус (SUSPEND/RESUME/ARCHIVE/UNARCHIVE)

Группы объявлений

ИнструментОписание
list_ad_groupsГруппы объявлений выбранных кампаний
create_ad_groupСоздать группу с таргетингом по регионам
delete_ad_groupsУдалить группы по ID
set_ad_group_negative_keywordsЗадать минус-фразы группы

Объявления

ИнструментОписание
list_adsОбъявления в группах
create_text_adСоздать текстовое объявление (≤56/≤30/≤81)
update_text_adОбновить заголовок/текст/ссылку
manage_adssuspend/resume/archive/unarchive/moderate/delete

Ключевые слова и ставки

ИнструментОписание
list_keywordsКлючевые фразы в группах (ставки в рублях)
add_keywordsДобавить ключевые фразы
set_keyword_bidsУстановить ставки (поиск/сети, рубли) на фразах/группах/кампаниях
manage_keywordssuspend/resume/delete
set_campaign_negative_keywordsЗадать минус-фразы кампании

Статистика, аккаунт, справочники

ИнструментОписание
get_statisticsСтатистика за период (показы, клики, расход, CTR, CPC)
get_account_balanceБаланс аккаунта (Live API v4)
get_regionsСправочник кодов регионов (225 = Россия)

Примеры запросов

Покажи все активные рекламные кампанииСоздай кампанию "Летняя распродажа" с бюджетом 5000 ₽/день, старт 2026-05-01Установи ставку 25 ₽ на ключевые фразы 111 и 222Добавь минус-фразы "бесплатно", "скачать" в кампанию 12345Какая статистика у кампаний 12345 и 67890 за последнюю неделю?Найди код региона для НовосибирскаПокажи баланс аккаунта

Разработка

bash
npm installnpm run build      # tsc → dist/npm test           # vitest (моки fetch)npm run dev        # tsx src/index.ts

Лицензия

MIT

Source: README.md at commit 24690a3

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v3.0.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts