# Yandex Direct MCP

Connects AI assistants to Yandex Direct API v5 for campaign management and reporting. It lets models adjust ads, update phrases, and manage bids directly from the IDE.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 19
- Author: stufently
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/stufently/yandex-mcp/tree/HEAD/packages/yandex-direct-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/yandex-direct-mcp

## What it does

The server provides 43 tools to handle campaigns, ad groups, sitelinks, keywords, and vCards. Bids use micro-units (millionths of a currency unit). A minor calculation error can inflate real spending fast.

Fourteen destructive operations require explicit safety opt-in via `confirm: true`. Deleting items, updating texts, or setting bids without this flag causes an immediate refusal. The server halts the request locally before any call reaches Yandex, preserving your budget and API points.

Authentication relies on `YANDEX_DIRECT_TOKEN`, alongside `YANDEX_DIRECT_CLIENT_LOGIN` for agency accounts. Testing should start in sandbox mode with `YANDEX_DIRECT_SANDBOX=true`. Unified performance campaigns on endpoint `v501` are not supported because the URL path is hard-coded to `/json/v5`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `YANDEX_DIRECT_TOKEN`, `YANDEX_DIRECT_CLIENT_LOGIN`, `YANDEX_DIRECT_SANDBOX` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env YANDEX_DIRECT_TOKEN=<YANDEX_DIRECT_TOKEN> --env YANDEX_DIRECT_CLIENT_LOGIN=<YANDEX_DIRECT_CLIENT_LOGIN> --env YANDEX_DIRECT_SANDBOX=<YANDEX_DIRECT_SANDBOX> --transport stdio yandex-direct-mcp -- npx -y @stufently/yandex-direct-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add yandex-direct-mcp --env YANDEX_DIRECT_TOKEN=<YANDEX_DIRECT_TOKEN> --env YANDEX_DIRECT_CLIENT_LOGIN=<YANDEX_DIRECT_CLIENT_LOGIN> --env YANDEX_DIRECT_SANDBOX=<YANDEX_DIRECT_SANDBOX> -- npx -y @stufently/yandex-direct-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "yandex-direct-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@stufently/yandex-direct-mcp"
            ],
            "env": {
                "YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>",
                "YANDEX_DIRECT_CLIENT_LOGIN": "<YANDEX_DIRECT_CLIENT_LOGIN>",
                "YANDEX_DIRECT_SANDBOX": "<YANDEX_DIRECT_SANDBOX>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "yandex-direct-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@stufently/yandex-direct-mcp"
            ],
            "env": {
                "YANDEX_DIRECT_TOKEN": "<YANDEX_DIRECT_TOKEN>",
                "YANDEX_DIRECT_CLIENT_LOGIN": "<YANDEX_DIRECT_CLIENT_LOGIN>",
                "YANDEX_DIRECT_SANDBOX": "<YANDEX_DIRECT_SANDBOX>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e YANDEX_DIRECT_TOKEN=<YANDEX_DIRECT_TOKEN> -e YANDEX_DIRECT_CLIENT_LOGIN=<YANDEX_DIRECT_CLIENT_LOGIN> -e YANDEX_DIRECT_SANDBOX=<YANDEX_DIRECT_SANDBOX> yandex-direct-mcp npx -y @stufently/yandex-direct-mcp
```
Replace <…> with your own values

## When to use it
- retrieve campaign performance and cost reports
- pause or restart specific advertising campaigns
- update search keyword bids across ad groups
- send modified ad creative to moderation

## Example prompts
- Fetch active campaigns and summarize their current budgets
- Set bid for keyword 987654321 to 15000000 micros with confirm true
- Generate an ad group report covering clicks and impressions for last week

## Similar
- [google-ads-manager](https://affpapa.org/en/nevibecode/skills/google-ads-manager.md) — skill · 6300 installs
- [ads-competitor](https://affpapa.org/en/nevibecode/skills/ads-competitor.md) — skill · 4100 installs
- [google-ads](https://affpapa.org/en/nevibecode/skills/arnabbagxd-google-ads.md) — skill · 1600 installs
- [amazon-ppc-campaign](https://affpapa.org/en/nevibecode/skills/amazon-ppc-campaign.md) — skill · 1400 installs
- [amazon-dayparting-strategy](https://affpapa.org/en/nevibecode/skills/amazon-dayparting-strategy.md) — skill · 1100 installs
- [google-ads-assets](https://affpapa.org/en/nevibecode/skills/google-ads-assets.md) — skill · ★ 4064

From the same set: [stufently/yandex-mcp](https://affpapa.org/en/nevibecode/by/stufently/yandex-mcp.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
