Yandex Metrica MCP logo

Yandex Metrica MCP

Query Yandex Metrica counters, reports, goals, and raw Logs API exports through 13 local stdio MCP tools.

Install Yandex Metrica MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "yandex-metrica-mcp-2": {
      "command": "npx",
      "args": [
        "-y",
        "@stufently/yandex-metrica-mcp"
      ],
      "env": {
        "YANDEX_METRICA_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env YANDEX_METRICA_TOKEN=YOUR_VALUE_HERE --transport stdio yandex-metrica-mcp-2 -- npx -y @stufently/yandex-metrica-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command didn't complete successfully in our automated test.

npx -y @stufently/yandex-metrica-mcp

'@stufently/yandex-metrica-mcp@*' is not in this registry. npm error 404 npm error 404 Note that you can also install from a npm error 404 tarball, folder, http url, or git url. npm notice npm notice New major version of npm available! 10.9.9 -> 12.2.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.2 npm notice To update run: npm install -g npm@12.2.2 npm notice npm error A complete log of this run can be found in: /home/user/.npm/_logs/2026-11-11T14_29_07_817Z-debug-0.log

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Yandex Metrica MCP MCP server exposes Yandex Metrica counter management, Reporting API queries, and Logs API exports to AI agents over local stdio. It provides 13 named tools, including read operations for counters, goals, aggregated reports, and log request status, plus tools that create or delete account resources. Logs exports follow an asynchronous evaluate, create, poll, download, and clean workflow. Reach for it when an agent needs Metrica reporting or row-level log data without a web service or persistent local daemon.

Use cases

  • Query aggregated traffic and conversion reports
  • List counters and goals available to an account
  • Compare two reporting periods
  • Export raw session or hit data
  • Manage asynchronous Logs API requests

Key features

  • 13 MCP tools for counters, goals, reports, and logs
  • Reporting API period comparison support
  • Asynchronous Logs API export workflow
  • Preview and full download modes for log parts
  • OAuth token authentication through environment variables
  • stdio transport with Docker support

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 52d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · @stufently/yandex-metrica-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit6d agoMost recent push to the default branch.
Install checkInconclusiveInstall command did not finish in our automated test.

How Yandex Metrica MCP works

What the Yandex Metrica MCP MCP server does

Yandex Metrica MCP provides an MCP interface to three areas of the Yandex Metrica platform: counter management, the Reporting API, and the Logs API. It runs locally and communicates with an MCP client over standard input and output. There is no web server, persistent storage layer, or background daemon.

The server includes 13 tools. Counter tools list accessible counters, retrieve counter details, list goals, create counters, and permanently delete counters. The Reporting API tool runs queries against aggregated statistics, including traffic, behavior, and goal-conversion data. It can also compare two periods when a second pair of dates is supplied.

Logs API tools support raw, non-aggregated exports for row-level session or hit analysis. The available operations cover export evaluation, creation, request listing, status polling, part downloads, cancellation, and cleanup. Tool annotations identify read-only and potentially destructive operations.

How it works

The Yandex Metrica MCP MCP server sends requests to Yandex Metrica using an OAuth token supplied through the environment. Responses remain close to the API format, so agents receive the structures returned by Yandex rather than a heavily normalized data model.

Reporting queries are synchronous from the tool caller’s perspective. Logs exports are asynchronous. A typical workflow is:

  1. Check whether the requested export can be created.
  2. Create the Logs API request.
  3. Poll its status until it is processed.
  4. Download each available part by its part number.
  5. Clean processed files when they are no longer needed.

Downloaded log parts default to a preview with metadata and approximately 50 KB of content. Use full mode only when the part is small enough to fit the client’s response handling, because raw parts may be hundreds of megabytes.

Setup and configuration

Docker is the documented current installation path. Run the published GHCR image with interactive input and pass YANDEX_METRICA_TOKEN into the container. The token must have the metrika:read scope. A versioned image tag can be used when reproducible deployment is important; latest and main are also available.

The server requires Node.js 24 or newer when built and run from source. Source setup consists of cloning the repository, installing dependencies, and building the project.

Optional settings include YANDEX_METRICA_TIMEOUT_MS for request timeouts, LOG_LEVEL for logging verbosity, YANDEX_METRICA_USER_AGENT for a custom user agent, and YANDEX_METRICA_BASE_URL for test environments. A counter ID is needed for live tests, not for normal server startup.

Tools and capabilities

The Yandex Metrica MCP MCP server exposes these capability groups:

  • Counter listing, inspection, goal listing, creation, and deletion.
  • Aggregated Reporting API queries and period comparisons.
  • Logs API evaluation, creation, listing, polling, downloading, cancellation, and cleanup.
  • Preview or full retrieval modes for processed log parts.
  • MCP annotations that distinguish read-only and destructive actions.

Limitations and notes

Authentication is configured through environment variables rather than interactive OAuth. Creating or deleting counters and managing Logs API exports can change the Metrica account, so agents should distinguish those tools from the eight read-oriented tools.

The Reporting API returns aggregated, sampled statistics, while the Logs API is intended for raw export. The two APIs therefore suit different analysis tasks. Full log downloads can produce very large responses, and the default preview exists to limit the amount returned by a tool call.

The local transport is stdio only. The server does not provide an HTTP endpoint or retain state between runs.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Yandex Metrica MCP

Yandex Metrica MCP is an MCP server that connects AI agents to the Yandex Metrica Reporting API, Logs API, and counter management endpoints. Its 13 tools list and inspect counters, list goals, run reports, compare periods, and manage asynchronous raw log exports, including creation, polling, downloading, cancellation, and cleanup.

Use the published Docker image because an npm release is not available yet. Run `docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:latest`, or clone the repository and build it with Node.js 24 or newer.

Set `YANDEX_METRICA_TOKEN` to a Yandex OAuth token with the `metrika:read` scope. `YANDEX_METRICA_TIMEOUT_MS`, `LOG_LEVEL`, `YANDEX_METRICA_USER_AGENT`, and `YANDEX_METRICA_BASE_URL` are optional configuration variables.

Evaluate and create a Logs API request, poll it with the request-status tool until its status is `processed`, then download each listed part and clean the processed files. Downloads use a limited preview by default; full mode returns the complete part.

Yes. The README names Claude Code as a supported use case, and the server communicates locally over stdio. Codex CLI is also named, while other MCP clients can configure it using the Docker command and the required token.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewYandex Metrica MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/yandex-metrica-mcp-2?style=directory)](https://allmcps.com/mcp/yandex-metrica-mcp-2)
HTML Embed
<a href="https://allmcps.com/mcp/yandex-metrica-mcp-2"><img src="https://allmcps.com/api/badge/yandex-metrica-mcp-2?style=directory" alt="Yandex Metrica MCP on AllMCPs" /></a>