# io.github.BoxLab-Ltd/yandex-metrica-mcp (npm · yandex-metrica-mcp)

Query Yandex Metrica analytics — reports, trends, metadata and raw log exports — via an AI agent.

- Trust score: 77/100 (medium)
- Change this week: +53
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `yandex-metrica-mcp`: 77/100 (this document), [markdown](https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp.md), [page](https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp)

## Channel facts

- Registry: `npm`
- Package: `yandex-metrica-mcp`
- Version: `0.3.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to BoxLab-Ltd/yandex-metrica-mcp).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 12 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 60/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 3301 tokens (~275/item across 12 items; 12 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add boxlab-ltd-yandex-metrica-mcp -- npx -y yandex-metrica-mcp
```

### Codex

```bash
codex mcp add boxlab-ltd-yandex-metrica-mcp -- npx -y yandex-metrica-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "boxlab-ltd-yandex-metrica-mcp": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "yandex-metrica-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add boxlab-ltd-yandex-metrica-mcp --command npx --arg -y --arg yandex-metrica-mcp
```

### Hermes

```yaml
mcp_servers:
  boxlab-ltd-yandex-metrica-mcp:
    command: "npx"
    args: ["-y", "yandex-metrica-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "boxlab-ltd-yandex-metrica-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "yandex-metrica-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 77, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 76, +59)

- [security improvement] Install scripts: unverified → pass
- [security improvement] Provenance: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] The attested source repository moved: BoxLab-Ltd/yandex-metrica-mcp
- [functional regression] Security disclosure: fail → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Stability: unverified → 0.23
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] License: unverified → pass
- [functional improvement] Schema quality: unverified → excellent
- [functional] Licence: MIT

### 2026-07-31 (score 17, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 24, −18)

- [functional regression] Tool coverage: 100 → unverified

### 2026-07-28 (score 42, +18)

- [functional improvement] Tool coverage: unverified → 100
- [functional] First check of Schema quality: unverified
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: fail
- [functional] First check of Tool coverage: 100

### 2026-07-27 (score 24)

First indexed and scored.

## MCP tools (12)

### `login` (~108 tokens)

Sign in to Yandex

Sign in to Yandex from here. Opens your browser to approve access; the code returns automatically over a local redirect, so this usually finishes in one call. If the local port is unavailable it returns a URL to approve and you then call submit_code with the code Yandex shows. Run this once (the token lasts ~1 year); needed before the data tools if you are not signed in yet.

Input parameters:

- `oob` (boolean): Force the copy-paste flow instead of the automatic local redirect.

### `submit_code` (~50 tokens)

Submit the Yandex sign-in code

Complete a copy-paste sign-in started by login: pass the code Yandex showed you after you approved access.

Input parameters:

- `code` (string, required): The code shown on the Yandex page after you approved access.

### `get_metadata` (~83 tokens)

Get Metrica metadata

Discovery tool. Lists the counters available to your token plus a curated catalog of common dimensions and metrics (Metrica has no enumeration API), attribution options and Logs API fields. Call this before run_report or logs_request to use real field names and to find a counterId. For a counter's own goals, segments, filters or grants, use describe_counter. Read-only.

### `describe_counter` (~195 tokens)

Describe Metrica counter

Read a single counter's configuration — settings, goals, segments, filters, operations and access grants — choosing sections with `include`. The goals section returns the goal ids needed to build conversion metrics (ym:s:goal<id>reaches / conversionRate) in run_report, so call this with include=["goals"] before any conversion question. To list the account's counters, use get_metadata. Read-only.

Input parameters:

- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `fullResponse` (boolean): If true, return the full raw objects with every field. Default false: a curated subset to save context.
- `include` (array): Which configuration sections to return. Default ["settings","goals"]. "goals" gives the goal ids needed for conversion metrics in run_report; "grants" is a read-only access audit.

### `run_report` (~498 tokens)

Run Metrica report

Query a Yandex Metrica table report (/stat/v1/data): one or more metrics grouped by dimensions over a date range, with optional filter and sort. Read-only. Use get_metadata first to discover valid metric/dimension ids and the account counters.

Input parameters:

- `accuracy` (string): Sampling accuracy: low | medium | high | full, or a 0..1 share. Use "full" for exact data.
- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `date1` (string): Start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date2` (string): End date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `dimensions` (array): Dimension ids to group by, e.g. ["ym:s:lastsignTrafficSource"]. Max 10. Do not mix ym:s: and ym:pv: namespaces.
- `filters` (string): Metrica filter expression in native syntax, e.g. ym:s:regionCityName=='Moscow' AND ym:pv:URL=@'help'.
- `fullResponse` (boolean): If true, include all dimension sub-fields (id, icons, …). Default false: only the dimension name and metric values are returned, to save context.
- `includeUndefined` (boolean): Include rows where the first dimension value is undefined ("Not set"). Default false.
- `limit` (integer): Rows per page (max 100000). Defaults to a small value to protect context.
- `metrics` (array, required): Metric ids, e.g. ["ym:s:visits","ym:s:users"]. Max 20. Discover valid ids with get_metadata. Do not mix ym:s: (visits) and ym:pv: (hits) namespaces in one call.
- `offset` (integer): 1-based index of the first row to return, for pagination. Default 1.
- `preset` (string): Named Metrica report preset (advanced); can substitute for metrics/dimensions.
- `sort` (array): Sort fields; prefix a field with "-" for descending, e.g. ["-ym:s:visits"].
- `timezone` (string): Timezone offset for the report as ±hh:mm, e.g. "+03:00". Defaults to the counter timezone.

### `run_comparison` (~594 tokens)

Compare Metrica segments

Compare two segments/periods (A vs B) for the same metrics and dimensions (/stat/v1/data/comparison). Returns per-metric values for A and B plus the absolute and percentage delta, computed server-side: delta = B − A (segment A is the baseline), delta_pct = (B − A) / A × 100. Defaults to last 7 days (B) vs the prior 7 days (A), so a positive delta means growth. Read-only.

Input parameters:

- `accuracy` (string): Sampling accuracy: low | medium | high | full, or a 0..1 share. Use "full" for exact data.
- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `date1A` (string): Segment A start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date1B` (string): Segment B start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date2A` (string): Segment A end date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date2B` (string): Segment B end date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `dimensions` (array): Dimension ids to group by, e.g. ["ym:s:lastsignTrafficSource"]. Max 10. Do not mix ym:s: and ym:pv: namespaces.
- `filtersA` (string): Filter expression for segment A.
- `filtersB` (string): Filter expression for segment B.
- `fullResponse` (boolean): If true, include all dimension sub-fields (id, icons, …). Default false: only the dimension name and metric values are returned, to save context.
- `includeUndefined` (boolean): Include rows where the first dimension value is undefined ("Not set"). Default false.
- `limit` (integer): Rows per page (max 100000). Defaults to a small value to protect context.
- `metrics` (array, required): Metric ids, e.g. ["ym:s:visits","ym:s:users"]. Max 20. Discover valid ids with get_metadata. Do not mix ym:s: (visits) and ym:pv: (hits) namespaces in one call.
- `offset` (integer): 1-based index of the first row to return, for pagination. Default 1.
- `preset` (string): Named Metrica report preset (advanced); can substitute for metrics/dimensions.
- `sort` (array): Sort fields; prefix a field with "-" for descending, e.g. ["-ym:s:visits"].
- `timezone` (string): Timezone offset for the report as ±hh:mm, e.g. "+03:00". Defaults to the counter timezone.

### `run_drilldown` (~522 tokens)

Drill down a Metrica report

Return one level of a hierarchical (tree) report (/stat/v1/data/drilldown). Each row has an "expandable" flag; pass parentId with the path of dimension keys to expand deeper. Requires dimensions. Read-only.

Input parameters:

- `accuracy` (string): Sampling accuracy: low | medium | high | full, or a 0..1 share. Use "full" for exact data.
- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `date1` (string): Start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date2` (string): End date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `dimensions` (array): Dimension ids to group by, e.g. ["ym:s:lastsignTrafficSource"]. Max 10. Do not mix ym:s: and ym:pv: namespaces.
- `filters` (string): Metrica filter expression in native syntax, e.g. ym:s:regionCityName=='Moscow' AND ym:pv:URL=@'help'.
- `fullResponse` (boolean): If true, include all dimension sub-fields (id, icons, …). Default false: only the dimension name and metric values are returned, to save context.
- `includeUndefined` (boolean): Include rows where the first dimension value is undefined ("Not set"). Default false.
- `limit` (integer): Rows per page (max 100000). Defaults to a small value to protect context.
- `metrics` (array, required): Metric ids, e.g. ["ym:s:visits","ym:s:users"]. Max 20. Discover valid ids with get_metadata. Do not mix ym:s: (visits) and ym:pv: (hits) namespaces in one call.
- `offset` (integer): 1-based index of the first row to return, for pagination. Default 1.
- `parentId` (array): Path from the tree root as a list of dimension keys. Omit for the top level.
- `preset` (string): Named Metrica report preset (advanced); can substitute for metrics/dimensions.
- `sort` (array): Sort fields; prefix a field with "-" for descending, e.g. ["-ym:s:visits"].
- `timezone` (string): Timezone offset for the report as ±hh:mm, e.g. "+03:00". Defaults to the counter timezone.

### `run_timeseries` (~442 tokens)

Metrica metrics over time

Return metrics split into a time series (/stat/v1/data/bytime): each metric comes back as an array of values, one per interval (day/week/month/…) over the date range. Use for trends and charts. Optionally group by dimensions (topKeys rows). Read-only.

Input parameters:

- `accuracy` (string): Sampling accuracy: low | medium | high | full, or a 0..1 share. Use "full" for exact data.
- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `date1` (string): Start date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `date2` (string): End date as YYYY-MM-DD or relative (today, yesterday, NdaysAgo).
- `dimensions` (array): Dimension ids to group by, e.g. ["ym:s:lastsignTrafficSource"]. Max 10. Do not mix ym:s: and ym:pv: namespaces.
- `filters` (string): Metrica filter expression in native syntax, e.g. ym:s:regionCityName=='Moscow' AND ym:pv:URL=@'help'.
- `fullResponse` (boolean): If true, include all dimension sub-fields (id, icons, …). Default false: only the dimension name and metric values are returned, to save context.
- `group` (string): Time interval granularity. Default day.
- `includeUndefined` (boolean): Include rows where the first dimension value is undefined ("Not set"). Default false.
- `metrics` (array, required): Metric ids, e.g. ["ym:s:visits","ym:s:users"]. Max 20. Discover valid ids with get_metadata. Do not mix ym:s: (visits) and ym:pv: (hits) namespaces in one call.
- `timezone` (string): Timezone offset for the report as ±hh:mm, e.g. "+03:00". Defaults to the counter timezone.
- `topKeys` (integer): Max number of dimension rows to chart (max 30). Default 7.

### `logs_request` (~380 tokens)

Request Metrica raw logs

Create a Yandex Metrica Logs API request for RAW, un-sampled rows (source="visits" sessions or "hits" events) over a date range. Checks feasibility, then queues preparation (takes minutes). Returns a request_id to poll with logs_status; then logs_download, then logs_clean. Discover field ids with get_metadata. Not read-only: preparing data consumes the counter storage quota.

Input parameters:

- `attribution` (string): Attribution model for attribution-dependent fields: FIRST | LAST | LASTSIGN | CROSS_DEVICE_LAST_SIGNIFICANT | AUTOMATIC | ... Default LASTSIGN.
- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `date1` (string, required): Start date as a concrete YYYY-MM-DD (relative dates are not supported for logs). date2 must be earlier than today — the current day's data is not ready.
- `date2` (string, required): End date as a concrete YYYY-MM-DD (relative dates are not supported for logs). date2 must be earlier than today — the current day's data is not ready.
- `fields` (array, required): Log field ids to export, e.g. ["ym:s:visitID","ym:s:dateTime","ym:s:startURL"]. All must share the source's prefix (ym:s: for visits, ym:pv: for hits). Discover valid ids with get_metadata (logs_fiel…
- `source` (string, required): Raw data source. "visits" = sessions (ym:s: fields); "hits" = page views/events (ym:pv: fields). Fields must match the source.
- `waitSeconds` (integer): Optionally poll up to this many seconds for preparation to finish before returning (handy for small exports). Default 0 = return immediately; poll with logs_status afterwards.

### `logs_status` (~111 tokens)

Check Metrica log requests

Inspect a Logs API request by request_id (status, parts, size, next step), or omit request_id to list all of the counter's log requests and current storage-quota usage. Poll this after logs_request until status="processed". Read-only.

Input parameters:

- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `requestId` (integer): Log request id to inspect. Omit to list all requests and current quota usage.

### `logs_download` (~226 tokens)

Download Metrica raw logs

Download prepared log data for a request_id (must be status="processed"; check logs_status). Default mode "sample" returns up to maxRows parsed rows inline — cheap and bounded. Mode "file" streams the FULL export to a file and returns its path plus a small preview; the raw content (potentially millions of rows) is never loaded into context. Read-only.

Input parameters:

- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `maxRows` (integer): sample mode only: max rows to return inline (default 100, max 1000).
- `mode` (string): sample (default): return up to maxRows parsed rows inline — cheap, bounded, no file. file: stream the FULL export to a file and return its path plus a small preview.
- `outputPath` (string): file mode only: absolute path to write the export to. Defaults to a file in the configured logs directory.
- `requestId` (integer, required): Log request id returned by logs_request.

### `logs_clean` (~92 tokens)

Clean or cancel a Metrica log request

Free the counter storage quota by cleaning a finished (processed) log request, or cancel one still being prepared. Dispatches by current status. Destructive: cleaned data must be requested again to download later.

Input parameters:

- `counterId` (integer): Yandex Metrica counter id. Optional if YANDEX_METRIKA_COUNTER_ID is configured.
- `requestId` (integer, required): Log request id returned by logs_request.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp#diagnostics

## Score history

- 2026-08-03: 77
- 2026-08-02: 76
- 2026-08-01: 17
- 2026-07-31: 17
- 2026-07-30: 24
- 2026-07-28: 42
- 2026-07-27: 24

## Links

- npm package: https://www.npmjs.com/package/yandex-metrica-mcp
- Socket report: https://socket.dev/npm/package/yandex-metrica-mcp
- Repository: https://github.com/BoxLab-Ltd/yandex-metrica-mcp
- Changelog RSS feed: https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/boxlab-ltd-yandex-metrica-mcp/yandex-metrica-mcp
