Yandex MCP Server

Query Yandex Metrica web analytics — reports, trends and metadata — via an AI agent.

Local serverstdio

What is the Yandex MCP server?

Query Yandex Metrica web analytics — reports, trends and metadata — via an AI agent. Exposed over MCP by the yandex mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

A Model Context Protocol (MCP) server for Yandex Metrica. It lets an AI agent query your web-analytics data — traffic, sources, landing pages, conversions, geography, devices and trends — through a small set of flexible, read-only tools.

Adding it to your client

The server ships on npm as yandex-metrica-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Its toolset

Everything the assistant can do here goes through one of these:

  • run_report — flexible wrapper over the Reporting API (/stat/v1/data)
  • run_comparison — compare two periods with absolute and percentage deltas
  • run_drilldown — drill down through a dimension tree
  • run_timeseries — metrics split into a time series (/bytime) for trends
  • get_metadata — discover the counters on your account and a catalog of common
  • describe_counter — read one counter's configuration (goals, segments,
  • Built — in context control: field selection on by default, low default row

Configuration

You will need 4 environment variables: YANDEX_METRIKA_COUNTER_ID, YANDEX_METRIKA_TOKEN, YANDEX_OAUTH_CLIENT_ID, YANDEX_OAUTH_CLIENT_SECRET. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js >= 18 - Yandex Metrica credentials with the metrika:read scope (see Authentication). Whoever the credentials belong to must have access to the counters you query.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the yandex mcp server does with a few real requests.

When to reach for it

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Yandex's toolset — run_report, run_comparison, run_drilldown and 4 more — is a fair guide to whether it matches your workflow. It is maintained by BoxLab-Ltd; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
run_reportflexible wrapper over the Reporting API (/stat/v1/data).
run_comparisoncompare two periods with absolute and percentage deltas.
run_drilldowndrill down through a dimension tree.
run_timeseriesmetrics split into a time series (/bytime) for trends.
get_metadatadiscover the counters on your account and a catalog of common
describe_counterread one counter's configuration (goals, segments,
Builtin context control: field selection on by default, low default row

How to install the Yandex MCP server

{
    "mcpServers": {
        "yandex-metrica": {
            "command": "npx",
            "args": ["-y", "yandex-metrica-mcp"],
            "env": { "YANDEX_METRIKA_COUNTER_ID": "12345678" }
        }
    }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js >= 18 - Yandex Metrica credentials with the metrika:read scope (see Authentication). Whoever the credentials belong to must have access to the counters you query.
VariableDescriptionRequired
YANDEX_METRIKA_COUNTER_IDConfiguration value read at startup.Optional
YANDEX_METRIKA_TOKENCredential the server authenticates with.Yes
YANDEX_OAUTH_CLIENT_IDConfiguration value read at startup.Optional
YANDEX_OAUTH_CLIENT_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • Use Yandex to run report.
  • Use Yandex to run comparison.
  • Use Yandex to run drilldown.

Frequently asked questions

It connects Yandex to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (run_report, run_comparison, run_drilldown, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Yandex directly.