@theyahia/yandex-metrika-mcp

A 15-tool Yandex Metrika MCP server: reports and traffic plus creating, updating and deleting counters and goals

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 permanently delete a Yandex Metrika counter
  • Can create and delete goals, affecting conversion data
  • No read-only versus write mode split at the server's config level
All reasons and checks
Russian stack

theyahia/yandex-metrika-mcp

Install

In your terminal, with SkillFoxx CLI

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

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

Other ways to install

This entry is high risk, so there is no one-click install. Review the code and add the config by hand.

Run in a terminal

claude mcp add --transport stdio --env 'YANDEX_METRIKA_TOKEN=<your YANDEX_METRIKA_TOKEN>' yandex-metrika -- npx -y @theyahia/yandex-metrika-mcp

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

{
  "mcpServers": {
    "yandex-metrika": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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 ~/.cursor/mcp.json, for all projects

{
  "mcpServers": {
    "yandex-metrika": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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_METRIKA_TOKENsecret, required

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

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

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

{
  "servers": {
    "yandex-metrika": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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 --env 'YANDEX_METRIKA_TOKEN=<your YANDEX_METRIKA_TOKEN>' -- npx -y @theyahia/yandex-metrika-mcp

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

[mcp_servers.yandex-metrika]
command = "npx"
args = ["-y", "@theyahia/yandex-metrika-mcp"]
env = { YANDEX_METRIKA_TOKEN = "<your YANDEX_METRIKA_TOKEN>" }

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "environment": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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": {
      "command": "npx",
      "args": [
        "-y",
        "@theyahia/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<your YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}

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

Keys and settings

YANDEX_METRIKA_TOKENsecret, required

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 2c736e0.

Text for your agent

Get an OAuth token at oauth.yandex.ru with Yandex Metrika access, then add the server with claude mcp add yandex-metrika -e YANDEX_METRIKA_TOKEN=token -- npx -y @theyahia/yandex-metrika-mcp.

Other ways from the author
{
  "mcpServers": {
    "yandex-metrika": {
      "command": "npx",
      "args": ["-y", "@theyahia/yandex-metrika-mcp"],
      "env": {
        "YANDEX_METRIKA_TOKEN": "your_token"
      }
    }
  }
}

Config for Claude Desktop from the README.

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

What it does

The server exposes 15 tools across four areas of the Yandex Metrika API. Counter management: listing, per-ID details, creating a new counter, updating its name or site URL, and irreversible deletion. Goal management: listing, creating with url, number, step or action types, and deletion. Logs: raw visit and hit data export via the Logs API. Reports: a flexible report with any metrics, dimensions, filters and sort order, comparing two date periods, and hierarchical drill-down. Convenience wrappers: a traffic summary, a source breakdown by channel, and top pages by pageviews. The server runs locally over stdio via npx or as an HTTP server for remote and multi-client use with a /mcp endpoint and a /health check, ships a ready smithery.yaml, and bundles an analytics-report skill for Claude Code.

Who it is for. For marketers and agencies who need not just to read Metrika reports, but to create counters and goals right from a conversation with an agent.

Good fit when

  • You want to quickly create a new counter or goal for a new project
  • You need a flexible report with custom metrics and period comparison
  • You need a remote HTTP mode for several clients instead of local stdio

Not a fit when

  • You want strictly read-only access with zero risk of accidentally deleting a counter or goal: delete_counter is irreversible and available without a separate confirmation step
  • You plan to issue a read-only token: the server uses one general OAuth Bearer token without splitting read and write scopes in its config

Example request

Compare last week's traffic to the previous week for counter 12345678

Limitations

Deleting a counter is irreversible, and the README states this plainly. A Yandex OAuth Bearer token is required; the README shows obtaining a token with only the read-statistics scope, though the server also exposes write tools, so writing needs broader permissions obtained separately. There is no read-only versus write mode split at the server's configuration level.

How to disable. Remove the server with claude mcp remove yandex-metrika and revoke the OAuth token at oauth.yandex.ru.

MCP

Transport
stdio, http
Authentication
API key
Environment variables
Environment variables
YANDEX_METRIKA_TOKEN
required, secret
Yandex OAuth 2.0 Bearer token

Security check

  • Can permanently delete a Yandex Metrika counter
  • Can create and delete goals, affecting conversion data
  • No read-only versus write mode split at the server's config level

README in short

The English README describes the server as part of author theYahia's Russian API MCP series. It gives instructions for getting an OAuth token with the read-statistics scope, setup for Claude Desktop and Claude Code via npx, running in streamable HTTP mode for remote scenarios, and via Smithery. A table of 15 tools is split into counter management, goal management, logs, reports and convenience wrappers for traffic, sources and top pages. It gives demo prompts and development commands. MIT license.

FAQ

Can a deleted counter be restored?

No, the README explicitly states that delete_counter removes the counter permanently.

Can the server run as a remote HTTP endpoint?

Yes, the --http and --port flags start it as a streamable HTTP server with a /mcp endpoint and a /health check for multiple clients.

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 AI@theyahia/yandex-metrika-mcp

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