Yandex Metrika MCP Server

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

MCP serverEditors’ pick

Medium risk

We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.

Why this level

  • With METRIKA_ALLOW_WRITES=1, 57 write tools open up, changing counters, goals and segments
  • Reads commercially sensitive traffic and conversion statistics
  • Write tools are hidden by default; the risk appears only after deliberately enabling them
All reasons and checks
Russian stack

artgas1/yandex-metrika-mcp

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/artgas1-yandex-metrika-mcp

Detects the agents on your machine, checks the risk and pins the version.

Other ways to install

Run in a terminal

claude mcp add --transport stdio --env 'YANDEX_API_KEY=<your YANDEX_API_KEY>' yandex-metrika-mcp-server -- npx -y yandex-metrika-mcp-server@3.3.1

Or add to the file .mcp.json, in the project

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Install in Cursor

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Add to the file ~/.cursor/mcp.json, for all projects

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Install in VS Code

The button opens the agent and offers to add the server. If nothing happens, copy the config below.

Run in a terminal

code --add-mcp '{"name":"yandex-metrika-mcp-server","type":"stdio","command":"npx","args":["-y","yandex-metrika-mcp-server@3.3.1"],"env":{"YANDEX_API_KEY":"<your YANDEX_API_KEY>"}}'

Or add to the file .vscode/mcp.json, in the project

{
  "servers": {
    "yandex-metrika-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the servers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Run in a terminal

codex mcp add yandex-metrika-mcp-server --env 'YANDEX_API_KEY=<your YANDEX_API_KEY>' -- npx -y yandex-metrika-mcp-server@3.3.1

Or add to the file ~/.codex/config.toml, for all projects

[mcp_servers.yandex-metrika-mcp-server]
command = "npx"
args = ["-y", "yandex-metrika-mcp-server@3.3.1"]
env = { YANDEX_API_KEY = "<your YANDEX_API_KEY>" }

If the file already exists, append the block to the end.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Add to the file ~/.gemini/settings.json, for all projects

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Add to the file ~/.config/devin/mcp_config.json, for all projects

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Formerly Windsurf.

Add to the file cline_mcp_settings.json, for all projects

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Add to the file .roo/mcp.json, in the project

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

A fork of Roo Code, same .roo folders.

Add to the file opencode.json, in the project

{
  "mcp": {
    "yandex-metrika-mcp-server": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "environment": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcp key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Add to the file ~/.config/zed/settings.json, for all projects

{
  "context_servers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the context_servers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

Add to the file .codeassistant/mcp.json, in the project

{
  "mcpServers": {
    "yandex-metrika-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrika-mcp-server@3.3.1"
      ],
      "env": {
        "YANDEX_API_KEY": "<your YANDEX_API_KEY>"
      }
    }
  }
}

If the file already exists, add the server inside the mcpServers key.

Keys and settings

YANDEX_API_KEYsecret, required
OAuth-токен Яндекса с доступом к Метрике. Без него сервер не стартует.
METRIKA_PROFILEoptional
Какая часть каталога объявляется: core (10 инструментов, умолчание), read (51 читающий), all (все 108).
METRIKA_ALLOW_WRITESoptional
1 разрешает и объявляет 57 инструментов, меняющих данные. Пока не задана — их нет в tools/list вовсе.
METRIKA_TOOLSoptional
Своя выборка инструментов через запятую: раздел (stat, logs, management), префикс имени или точное имя. Задана — побеждает METRIKA_PROFILE.
METRIKA_TRAFFIC_FILTERoptional
Условие сегментации, которое добавляется к отчётам Stat. По умолчанию ym:s:isRobot=='no'.
METRIKA_MAX_OUTPUT_CHARSoptional
Потолок длины ответа одного вызова в символах. По умолчанию 120000.

Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.

You will need: Node.js

Checked against the repository on Sep 25, 2026, commit 000a016.

Text for your agent

Get a Yandex OAuth token with Metrika access, then run npx -y yandex-metrika-mcp-server@3 with the YANDEX_API_KEY variable and add it to your MCP client config, starting with the default core profile.

Other ways from the author
npx -y yandex-metrika-mcp-server

Quick run with no package installation.

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

What it does

The server covers all 108 methods of the Yandex Metrika API: 95 Management API methods across 21 resources, 7 Logs API methods and 6 Stat API methods. Tools are not hand-written but generated from a spec the server builds itself by scanning CSS classes line by line on the official documentation pages, built on the Diplodoc engine, since Metrika has no public openapi.json. Only 10 tools of the core profile are declared by default; the rest opens via METRIKA_PROFILE set to read (51 read methods) or all (all 108), and write tools additionally require METRIKA_ALLOW_WRITES=1, without which they never appear in tools/list at all. Every response carries a _meta block with applied_by_server, notes, retries, rows_total, truncated and truncated_by_server: the server honestly discloses what it added on its own, such as the robot filter ym:s:isRobot=='no', and what it truncated for length. A dedicated metrika_catalog_list tool shows, with no token or network needed, what is hidden and how to enable it.

Who it is for. For people who care not just about full Metrika API coverage, but about transparency: knowing exactly what the server added on its own to a request or response.

Good fit when

  • You need full access to all 108 Metrika API methods, including rare Management API resources
  • You care about knowing exactly which filters and assumptions the server applied without an explicit request
  • You want controlled growth of the tool surface, from 10 basics up to all 108 via an explicit variable

Not a fit when

  • You need write tools out of the box: they are hidden by default and require METRIKA_ALLOW_WRITES=1
  • You do not want to deal with core, read and all profiles: the server deliberately limits the set to save model context instead of exposing everything at once

Example request

Where did people come from this week, and how many reached the goal?

Limitations

GitHub's license metadata shows NOASSERTION, though the README and the LICENSE file state MIT. The spec parser is tied to a specific version of Yandex's Diplodoc documentation engine; a version mismatch halts the spec build on update. The full all profile with writes enabled noticeably increases tool description size in the model's context, roughly 73,000 tokens per the author's measurement. Logs API output can exceed the single-response length limit, in which case the result is truncated with a note in the metadata.

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

MCP

Transport
stdio, http
Authentication
API key
Environment variables
Environment variables
YANDEX_API_KEY
required, secret
Yandex OAuth token with Metrika access; the server will not start without it
METRIKA_PROFILE
Which part of the catalog is declared: core (10 tools), read (51), all (all 108)
METRIKA_ALLOW_WRITES
1 declares the 57 write tools; without it they are absent from tools/list entirely
METRIKA_TRAFFIC_FILTER
Segmentation condition for Stat reports, excludes robots by default
METRIKA_MAX_OUTPUT_CHARS
Response length cap per call, defaults to 120,000 characters

Security check

  • With METRIKA_ALLOW_WRITES=1, 57 write tools open up, changing counters, goals and segments
  • Reads commercially sensitive traffic and conversion statistics
  • Write tools are hidden by default; the risk appears only after deliberately enabling them

README in short

The Russian README, with an English version as a separate file, details the server's contract at length: no silent request substitution, everything the server adds is visible in _meta, a failure stays a failure with the API's error body, truncation is disclosed, secrets are redacted in shown URLs. It explains how the spec is built by scanning documentation CSS classes line by line, plus an API drift test. It gives an environment variable table for the profile, enabling writes, manual tool selection, the traffic filter and the response length cap, along with a measured tools/list manifest size per profile in bytes and tokens. It separately covers the default robot filter and a quirk where period comparison with no dates silently compares a period against itself. MIT license.

FAQ

How do I find out which tools are hidden without reading the README?

Call metrika_catalog_list: it is declared in every profile, needs no token or network, and directly shows how many methods are hidden and how to widen the profile.

Can writes be enabled without enabling all 108 methods?

No, write tools only appear together with the all profile and METRIKA_ALLOW_WRITES=1; there is no partial write-only mode.

Official

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

SkillMedium riskRussian stackNo VPN needed12Repository 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

A Claude Code skill set for auditing sites for AI search: citability, AI crawler access, llms.txt, schema and reports

SkillMedium risk10.9KRepository stars
Foxx AIYandex Metrika 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.