Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Yandex Metrica MCP

by stufentlyversion 0.2.3i★ 0iRuns on your computerRepository ↗
Registry nameio.github.stufently/yandex-metrica-mcp

How to install

What it does

Yandex Metrica for AI agents: counters, goals, Reporting API and Logs API export over stdio.

  • Connects Runs on your computer
  • Account or key Needs YANDEX_METRICA_TOKEN
  • Category Developer tools

Use together with

Skills that teach the AI this kind of work; they work alongside this one

rea

Reverse engineer anything with agents, from app behavior down to native binaries.

by morluto★ 470,1651 skills

Skill · How-to guide

andrej-karpathy-skills

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

by multica-ai★ 234,5281 skills

Skill · How-to guideNo license stated

graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

by Graphify-Labs★ 150,6951 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Yandex Metrica MCP. Follow https://mcp.popnx.com/i/stufently-yandex-metrica-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Yandex Metrica MCP for Claude on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "yandex-metrica": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "YANDEX_METRICA_TOKEN", "ghcr.io/stufently/yandex-metrica-mcp:0.2.3" ], "env": { "YANDEX_METRICA_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For YANDEX_METRICA_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Yandex Metrica MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Sign up and create a Yandex Metrica MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Yandex Metrica MCP site ↗

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "yandex-metrica": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "YANDEX_METRICA_TOKEN",
            "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
          ],
          "env": {
            "YANDEX_METRICA_TOKEN": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Yandex Metrica MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Yandex Metrica MCP or shows a Yandex Metrica MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Yandex Metrica MCP yet

Yandex Metrica MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Yandex Metrica MCP

  • You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)
  • You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)
  • You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)

B · Others in Developer tools that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Yandex Metrica MCP for Claude Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user yandex-metrica --env YANDEX_METRICA_TOKEN=your-value -- docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:0.2.3 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For YANDEX_METRICA_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Yandex Metrica MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Sign up and create a Yandex Metrica MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Yandex Metrica MCP site ↗

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user yandex-metrica --env YANDEX_METRICA_TOKEN=your-value -- docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:0.2.3

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Yandex Metrica MCP listed as connected

  6. Try it

    Use Yandex Metrica MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Yandex Metrica MCP or shows a Yandex Metrica MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Yandex Metrica MCP for Cursor on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "yandex-metrica": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "YANDEX_METRICA_TOKEN", "ghcr.io/stufently/yandex-metrica-mcp:0.2.3" ], "env": { "YANDEX_METRICA_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For YANDEX_METRICA_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Yandex Metrica MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Sign up and create a Yandex Metrica MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Yandex Metrica MCP site ↗

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Yandex Metrica MCP settings, YANDEX_METRICA_TOKEN is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Yandex Metrica MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Yandex Metrica MCP or shows a Yandex Metrica MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Yandex Metrica MCP key (create it on the maker’s site) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Yandex Metrica MCP for VS Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "yandex-metrica": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "-e", "YANDEX_METRICA_TOKEN", "ghcr.io/stufently/yandex-metrica-mcp:0.2.3" ], "env": { "YANDEX_METRICA_TOKEN": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For YANDEX_METRICA_TOKEN, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Yandex Metrica MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Sign up and create a Yandex Metrica MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    Open the Yandex Metrica MCP site ↗

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Yandex Metrica MCP settings, YANDEX_METRICA_TOKEN is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Yandex Metrica MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Yandex Metrica MCP or shows a Yandex Metrica MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Yandex Metrica MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user yandex-metrica --env YANDEX_METRICA_TOKEN=your-value -- docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:0.2.3

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "yandex-metrica": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "env": {
        "YANDEX_METRICA_TOKEN": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "yandex-metrica": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "env": {
        "YANDEX_METRICA_TOKEN": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "yandex-metrica": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "env": {
        "YANDEX_METRICA_TOKEN": "your-value"
      }
    }
  }
}

Values you fill in

  • YANDEX_METRICA_TOKEN secret required env
    Yandex OAuth token with the metrika:read scope

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Latest versioni
0.2.3
Published to registryi
Oct 14, 2026
Code last changedi
Nov 14, 2026
Maker
stufently
Packages
oci: ghcr.io/stufently/yandex-metrica-mcp:0.2.3
Website
github.com
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account stufently, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 6 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked: only npm and PyPI packages with a version can be checked

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/stufently-yandex-metrica-mcp.svg)](https://mcp.popnx.com/en/servers/stufently-yandex-metrica-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Developer toolsi

  • More stars than 0% of the other 6209 servers in this category
  • Published to the registry more recently than 46% of the other 6209 servers in this category
  • Basic checks equal to or better than 99% of the other 6209 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Yandex Metrica MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: YANDEX_METRICA_TOKEN

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 6 days ago, and the latest version (0.2.3) reached the registry 37 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.

What can I use instead?

In the same category: GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

by ahmedkhaleel2004Widely used★ 19KUpdated 2 months ago

Runs in the cloud✓ service owner · gitdiagram.comTried by the PopNx team

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

by AppllamaWidely used★ 5.2KUpdated 3 months ago

Runs in the cloud✓ service owner · appllama.io

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

by repowise-devWidely used↓ 6.5K/wk★ 8.2K Stars for the whole repoUpdated 7 days ago

Computer or cloud✓ service owner · repowise.dev
Compared with similar ones
This one
Yandex Metrica MCP
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computer
Needs a keyYesNoNoNoNoNo
Add with + in ClaudeNoNoNoYesNoNo
Basic checks3/34/44/44/44/45/5
LicenseMITMITMITApache-2.0Apache-2.0AGPL-3.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

yandex-metrica-mcp

MCP server for the Yandex Metrica Reporting API, Logs API and counter management, designed for use with Claude Code and Codex CLI. Eight of its 13 tools only read; five change your Metrica account — create and delete a counter, and create, cancel and clean a Logs API export. Each tool says which it is in its MCP annotations (readOnlyHint, destructiveHint).

Runs locally over stdio. No web server, no persistent storage, no background daemons.


Why this project exists

Yandex Metrica has two distinct APIs that serve different purposes:

  • Reporting API (/stat/v1/data) — aggregated, sampled statistics. Use this to build reports, query traffic sources, behavior metrics, goal conversions, etc.
  • Logs API (/management/v1/counter/{id}/logrequests) — raw, non-aggregated event export. Use this when you need row-level session or hit data for custom analytics pipelines.

This MCP server exposes both APIs as named tools that an LLM can call directly.


Features

  • 13 MCP tools covering counter management, goals, reporting, and full Logs API lifecycle
  • Authentication via environment variable only (no interactive OAuth)
  • Minimal transformation — responses stay close to the Yandex API format
  • Safe download behavior: logs parts default to 50KB preview + metadata
  • Strict TypeScript, zod validation, clean error messages
  • Multi-stage Docker image (node:24-alpine)
  • Unit + mock integration tests, live test scaffolding
  • GitHub Actions CI and Docker workflows

Supported MCP Tools

Counter Management
ToolDescription
yandex_metrica_list_countersList accessible counters (tags)
yandex_metrica_get_counterGet counter details by ID
yandex_metrica_list_goalsList goals for a counter
yandex_metrica_create_counterCreate a new counter (add a site)
yandex_metrica_delete_counterDelete a counter permanently
Reporting API (aggregated)
ToolDescription
yandex_metrica_get_reportRun a Reporting API query

For period comparison, pass date1_b/date2_b to yandex_metrica_get_report. The tool automatically routes to /stat/v1/data/comparison; date1/date2 become segment A, date1_b/date2_b become segment B. Each result row returns metrics: { a, b }.

Logs API (raw export)
ToolDescription
yandex_metrica_evaluate_logs_requestCheck if export is possible
yandex_metrica_create_logs_requestCreate an async export request
yandex_metrica_list_logs_requestsList all requests for a counter
yandex_metrica_get_logs_requestPoll status of a request
yandex_metrica_download_logs_partDownload a processed part (TSV)
yandex_metrica_cancel_logs_requestCancel a pending request
yandex_metrica_clean_logs_requestClean processed files to free quota

Logs API Workflow

evaluate → create → [poll get until status=processed] → download parts → clean

The Logs API is asynchronous. After creating a request, poll yandex_metrica_get_logs_request until status = "processed", then download each part listed in log_request.parts (by its part_number).


Download Behavior

Raw log parts can be hundreds of MB. By default yandex_metrica_download_logs_part returns:

{

"mode": "preview", "truncated": true, "original_byte_size": 52428800, "preview_byte_size": 49980, "content": "ym:s:visitID\tym:s:date\t...\n..." }

Set mode: "full" to get the entire content — only do this for small parts.


Requirements

  • Node.js 24+
  • Yandex OAuth token with metrika:read scope
How to get YANDEX_METRICA_TOKEN
  1. Go to https://oauth.yandex.com/ → Create app
  2. Fill in any name, select For API access
  3. Under Access → enable metrika:read
  4. Click Create app, copy the ClientID
  5. Open in browser (replace with yours):
   https://oauth.yandex.com/authorize?response_type=token&client_id=<ClientID>
  1. Authorize → copy the access_token from the URL fragment (#access_token=...)
How to get YANDEX_METRICA_COUNTER_ID

The counter ID is the numeric ID of your Yandex Metrica tag (счётчик):

  • Open https://metrika.yandex.ru — the counter ID is shown next to each tag
  • Or look at the URL: metrika.yandex.ru/dashboard?id=**12345678**
  • Or use the tool itself: call yandex_metrica_list_counters — it returns all counters with their IDs

YANDEX_METRICA_COUNTER_ID is only needed for live tests (npm run test:live), not for normal server operation.


Installation

docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:latest

One path that works today: Docker. Nothing to clone, no Node.js. Every MCP client below starts the server with this same command.

-e YANDEX_METRICA_TOKEN without a value forwards the variable from the client's environment into the container, so the token lives in the client's env block and never appears in the docker command line or ps output. The client pulls the image on first start; docker pull ghcr.io/stufently/yandex-metrica-mcp:latest up front just makes that first start faster.

Smoke test without a token or network — the server must answer initialize and list 13 tools. The image ships a placeholder YANDEX_METRICA_TOKEN so it starts for introspection; tool calls with it return a "YANDEX_METRICA_TOKEN is not set" error instead of reaching Yandex:

printf '%s\n' \

'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \ | docker run -i --rm --network none ghcr.io/stufently/yandex-metrica-mcp:latest

Image tags on GHCR: latest and main (every push to main), sha- , and X.Y.Z / X.Y / X on version tags. Pin a version tag (:0.2.3) for reproducible setups.

npm (not published yet)

The package is scoped — both unscoped names (yandex-metrica-mcp and the project's former name mcp-yandex-metrica) belong to unrelated projects on npm — so it ships as @stufently/yandex-metrica-mcp (command yandex-metrica-mcp). The first npm release has not been cut, so npx -y @stufently/yandex-metrica-mcp does not work today. Use Docker.

From source
git clone https://github.com/stufently/yandex-metrica-mcp.git

cd yandex-metrica-mcp npm install && npm run build

See Running from a local build for the client config.


Configuration

Copy .env.example to .env and set your token:

cp .env.example .env
VariableRequiredDefaultDescription
YANDEX_METRICA_TOKENYes—OAuth token with metrika:read
YANDEX_METRICA_TIMEOUT_MSNo30000Request timeout in ms
LOG_LEVELNoinfoLog level: debug, info, warn, error, silent
YANDEX_METRICA_USER_AGENTNoyandex-metrica-mcp/0.2.3Custom User-Agent
YANDEX_METRICA_BASE_URLNohttps://api-metrika.yandex.netAPI base URL (tests only)

Local Development

# Development with hot reload

YANDEX_METRICA_TOKEN=your_token npm run dev

Build

npm run build

Run production build

YANDEX_METRICA_TOKEN=your_token npm start

Lint

npm run lint

Type check

npm run typecheck

Tests (unit + mock integration, no live API calls)

npm test

Live tests (requires real token and counter ID)

LIVE_TESTS=1 YANDEX_METRICA_TOKEN=your_token YANDEX_METRICA_COUNTER_ID=12345678 npm run test:live

Format

npm run format


Docker

# Use pre-built image from GHCR (updated on every push to main)

docker run -i --rm \ -e YANDEX_METRICA_TOKEN=your_token \ ghcr.io/stufently/yandex-metrica-mcp:latest

Or build locally

docker build -t yandex-metrica-mcp:local . docker run -i --rm \ -e YANDEX_METRICA_TOKEN=your_token \ yandex-metrica-mcp:local

Docker Compose

# Create .env with your token first

cp .env.example .env

Run

docker-compose run --rm yandex-metrica-mcp


Verified clients and platforms

Only what has actually been run is listed as verified. Everything else in Client Configuration is a documented config that nobody has checked end to end.

Client / runtimeOSHow it runsStatusEvidence
Claude Code 2.1Ubuntu 26.04 LTS, x86_64Docker image built locally from this repo, stdioVerifiedDaily use on the maintainer's host (counters, reports, goals)
Node.js 24Ubuntu (ubuntu-latest)npm ci, lint, typecheck, unit + mock integration tests, buildVerified in CIci.yml
Docker imageUbuntu (ubuntu-latest)Image build on every pull request and push to mainBuilt in CI, not started theredocker.yml
Claude Desktop (.mcpb)macOS, WindowsDesktop ExtensionNot verifiedBundle is built in CI, never installed in a real Desktop
Cursor, Windsurf, Codex CLI, ZedanyConfigs belowNot verifiedDocumented only
macOS, Windows—Any clientNot verifiedNo CI runner on these systems

Client Configuration

All configs below are copy-paste ready and use the Docker command from Installation. Replace your_oauth_token_here with your Yandex OAuth token and nothing else.

Claude Code

Project file: .mcp.json in the project root.

claude mcp add yandex-metrica \

-e YANDEX_METRICA_TOKEN=your_oauth_token_here \ -- docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:latest

Add --scope user to make it available in every project, or --scope project to write .mcp.json. Check with claude mcp list / claude mcp get yandex-metrica.

The same server as JSON in .mcp.json:

{

"mcpServers": { "yandex-metrica": { "command": "docker", "args": [ "run", "-i", "--rm", "-e",

Only the beginning is shown; read the rest in the repo