Yandex Metrika + Direct MCP Server

Яндекс.Метрика + Директ MCP Server

A 30-tool MCP server for Metrika and Direct: reports, bids, ads, negative keyword management and Wordstat

MCP server

High risk

We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.

Why this level

  • Can create, change and delete shared negative keyword sets applied across several campaigns at once
  • Can add or fully replace negative keywords at the campaign level
  • Stores tokens for multiple ad accounts in one .env file
All reasons and checks
Russian stack

unklex/yandex-mcp

Install

Manual install

git clone https://github.com/unklex/yandex-mcp.git
cd yandex-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Install from source with a virtual environment.

This is third-party code. Review the repository files before installing.

What it does

The server combines 7 Yandex Metrika tools (traffic summary, sources, top pages, goals, audience, real-time activity, period comparison) with 23 Yandex Direct tools. Direct covers campaigns and budgets with the remaining Units API quota, performance stats by day, region, device and placement, ads and ad groups, current bids, and negative keyword management: adding or replacing them at the campaign level plus full CRUD over shared negative keyword sets that can be attached to several campaigns at once. Wordstat, via the legacy Direct API v4, gives top related queries, month-by-month dynamics and regional distribution. Flexible reports give access to arbitrary Reports API types with any fields. Multiple Metrika counters and multiple Direct accounts are supported at once through aliases in .env, including agency access via client_login.

Who it is for. For PPC specialists running several sites and ad accounts who want to manage negative keywords and view stats from one place.

Good fit when

  • You want to add or replace negative keywords across several campaigns at once via a shared set
  • You run several sites and ad accounts and want aliases instead of memorizing IDs
  • You want both Metrika reports and Direct stats in one server without switching tools

Not a fit when

  • You want strictly read-only access with no risk of changing negative keywords: adding, replacing and deleting sets is available here
  • You do not need Wordstat: it uses the legacy Direct API v4 with a daily limit of roughly 1,000 reports per token

Example request

Add the negative keywords free and download to a shared set and attach it to all active campaigns

Limitations

No license is declared in the repository. Direct negative-keyword limits: up to 1,000 phrases per campaign or set, up to 20,000 characters total, each phrase up to 7 words. A negative keyword set cannot be deleted while attached to campaigns; it must be detached via campaigns.update first. Wordstat runs through the legacy API v4 with a 3-30 second polling wait and a limit of roughly 1,000 reports per day per token.

How to disable. Remove the server from your MCP client config and revoke the OAuth token at oauth.yandex.com.

MCP

Transport
stdio
Authentication
API key
Environment variables
Environment variables
YANDEX_METRICA_TOKEN
required, secret
OAuth token with the metrika:read scope
YANDEX_METRICA_COUNTER_ID
required
The main Metrika counter ID
YANDEX_METRICA_COUNTERS
A list of extra counters as alias:id pairs, comma-separated
YANDEX_DIRECT_TOKEN
secret
OAuth token with the direct:api scope for Yandex Direct
YANDEX_DIRECT_ACCOUNTS
secret
A list of tokens for multiple ad accounts as alias:token pairs
YANDEX_DIRECT_CLIENT_LOGIN
Client login for Direct agency accounts

Security check

  • Can create, change and delete shared negative keyword sets applied across several campaigns at once
  • Can add or fully replace negative keywords at the campaign level
  • Stores tokens for multiple ad accounts in one .env file

README in short

The Russian README describes the server for Metrika and Direct with natural-language request examples. It covers requirements, virtual-environment install steps, getting an OAuth token with metrika:read and direct:api scopes, finding the counter ID, and filling in the single .env file, with support for multiple counters and accounts via aliases. Setup is shown for Claude Desktop, Claude Code and Cowork. Tool tables are split into Metrika and Direct: campaigns and budgets, stats, ads and bids, negative keywords with append and replace modes plus CRUD over shared sets, Wordstat via the legacy API, and flexible reports. It states the negative-keyword and Wordstat limits.

FAQ

Can one negative keyword set be attached to several campaigns?

Yes, a shared negative keyword set can be linked to several campaigns at once, separate from campaign-level negative keywords.

Why can't a negative keyword set be deleted?

If the set is attached to campaigns, the Direct API refuses deletion; it must be detached via campaigns.update first.

Official

Official DataLens (Yandex) skills for Claude Code, Codex and OpenCode: SDK, HTML reports and RLS resolution

SkillMedium riskRussian stackNo VPN needed12Repository stars
Editors’ pick

A Yandex Metrika MCP server generated from the API spec: 108 methods, 10 tools declared by default, transparent filters and response metadata

MCP serverMedium riskRussian stackNo VPN needed2Repository stars
Official

An open MCP server and agent skill set for SEO: keyword research, competitors, backlinks and site audits powered by DataForSEO

MCP serverMedium risk21.5KRepository stars

A Claude Code plugin for SEO audits: technical SEO, E-E-A-T, schema, local and AI search via parallel subagents

PluginHigh risk17.9KRepository stars
Foxx AIYandex Metrika + Direct MCP Server

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.