Skip to main content
Glama
theYahia

yandex-direct-mcp

by theYahia

🗄 Repository archived

Development has moved to theYahia/YaAll — a build where the entire Yandex layer lives in one place: official Yandex MCP servers, MCP for Direct and Metrika, the YaGEO skill, and the Wordstat gate.

The current version of what was here: mcp/yandex-direct-mcp/

Nothing is updated here anymore. Issues and pull requests — in YaAll.

Archived — development moved to theYahia/YaAll, a single repository bundling the whole Yandex stack. The current version of this package now lives at mcp/yandex-direct-mcp/. Please open issues and pull requests there.

@theyahia/yandex-direct-mcp

MCP server for the Yandex.Direct API — manage contextual advertising from any MCP client (Claude, Cursor, etc.): campaigns, ad groups, ads, keywords, bids, negative keywords, statistics, balance. 20 tools.

npm License: MIT

Money is in rubles (budgets, bids on input and output); the server itself converts to API micro-units. Sandbox for safe testing and agency mode (Client-Login) are supported.

Related MCP server: yandex-direct-mcp

Installation

Claude Desktop

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

Claude Code

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

Configuration (environment variables)

Variable

Required

Purpose

YANDEX_DIRECT_TOKEN

yes

Yandex.Direct OAuth token

YANDEX_DIRECT_SANDBOX

no

1 — work in the sandbox (isolated data, no spending). Same token, only the URL differs

YANDEX_DIRECT_LOGIN

no

Client login for agency tokens (Client-Login header). Required if the token is an agency one

How to get a token

The OAuth token is issued for an app registered in Yandex OAuth with access to the Direct API. Details — app registration and getting a token. API access must be requested in the Direct interface.

⚠️ Warning: real spending

The create_campaign, create_text_ad, add_keywords, set_keyword_bids and other tools modify a live advertising account and can spend money. For debugging scenarios, enable the sandbox (YANDEX_DIRECT_SANDBOX=1).

Tools (20)

Campaigns

Tool

Description

list_campaigns

List of campaigns (filter by status/type, pagination)

get_campaign

Detailed campaign info by ID

create_campaign

Create a campaign (budget in rubles, strategy selection)

update_campaign

Update name/budget and/or status (SUSPEND/RESUME/ARCHIVE/UNARCHIVE)

Ad groups

Tool

Description

list_ad_groups

Ad groups of selected campaigns

create_ad_group

Create a group with region targeting

delete_ad_groups

Delete groups by ID

set_ad_group_negative_keywords

Set group negative keywords

Ads

Tool

Description

list_ads

Ads in groups

create_text_ad

Create a text ad (≤56/≤30/≤81)

update_text_ad

Update headline/text/link

manage_ads

suspend/resume/archive/unarchive/moderate/delete

Keywords and bids

Tool

Description

list_keywords

Keyword phrases in groups (bids in rubles)

add_keywords

Add keyword phrases

set_keyword_bids

Set bids (search/network, rubles) on phrases/groups/campaigns

manage_keywords

suspend/resume/delete

set_campaign_negative_keywords

Set campaign negative keywords

Statistics, account, reference data

Tool

Description

get_statistics

Statistics for a period (impressions, clicks, spend, CTR, CPC)

get_account_balance

Account balance (Live API v4)

get_regions

Region code reference (225 = Russia)

Example requests

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

Development

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

License

MIT

Install Server
A
license - permissive license
A
quality
F
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    MCP server for managing Yandex Direct advertising, Yandex Metrica analytics, Wordstat keyword research, and Yandex Webmaster SEO tools, with self-configuring OAuth; provides 153 tools for complete ad and search workflows from AI assistants.
    100
    15
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    A hardened MCP server for managing Yandex.Direct advertising campaigns with read-only defaults, write and finance capabilities optional, using OAuth authentication.
    26
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Yandex Direct, Metrika, Wordstat, and Webmaster APIs, providing 132 tools to manage advertising campaigns, analytics, keyword research, and reporting through any MCP-compatible client.
    58
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP for Yandex Direct: manage ad campaigns & analytics from Claude or ChatGPT

  • All HasData scraping tools in one MCP server: Google, TikTok, Instagram, maps, e-commerce and more.

  • Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/theYahia/yandex-direct-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server