# Yandex Metrika

> Yandex Metrika is an open-source MCP server for analytics and data. Read-only Yandex Metrika analytics for AI clients, with checkable dates and exports. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, CLI
- **Repository:** https://github.com/devcrabs-inc/yandex-metrika-mcp
- **MCP Registry name:** io.github.DevCrabs-Inc/yandex-metrika-mcp
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data), [marketing and SEO](https://ai-powered.com/categories/marketing-and-seo)
- **Listing updated:** 2026-11-18

## About

This server answers traffic questions from Yandex Metrika counters and shows its working. Each answer carries exact dates, the counter's time zone, sampling status, filters and provenance. By default it uses complete calendar days, and strict accuracy mode refuses sampled data rather than calling it exact. Totals come from the API rather than summed visible rows.

Thirteen tools and three prompts cover it: metrika_connect starts a browser sign-in with no token pasted into chat, metrika_list_counters and metrika_describe_counter show sites and goals, metrika_run_report, metrika_compare_periods and metrika_run_timeseries do the analysis, and the export tools run full CSV or JSON exports as resumable background jobs with checksums. The prompts are weekly_review, traffic_drop and landing_conversion. A synthetic demo connection works without an account.

Tokens are kept in the operating system credential store, report data you request goes to your AI client's model provider, and there is no telemetry. It needs Node.js 22.13 or later. The README says 1.0.0 was checked with a live Yandex sign-in on macOS, with other platforms still tracked. Documentation is available in Russian.

## Features

- **Verifiable reports:** Answers include dates, time zone, sampling status, filters and provenance.
- **Period comparison:** metrika_compare_periods gives absolute, percent and percentage-point changes under identical conditions.
- **Full exports:** Background CSV or JSON exports cover every row with checksums and resume after restart.
- **Browser sign-in:** Connect through the browser without an OAuth app of your own or pasted tokens.
- **Multiple accounts:** Isolated connections keep separate counters for each account.
- **Strict accuracy:** Sampled data is refused instead of being presented as exact.

## Good for

- Compare the last two complete weeks by traffic source
- Find which landing pages produced the most goal conversions
- Plot weekly visits since the start of the quarter
- Export all October traffic sources to CSV
- Investigate a drop in traffic

## Install

### Claude Code (Terminal)

```sh
claude mcp add yandex-metrika-mcp --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y @dev-crabs/yandex-metrika-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "yandex-metrika-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dev-crabs/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "yandex-metrika-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dev-crabs/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "yandex-metrika-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dev-crabs/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "yandex-metrika-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@dev-crabs/yandex-metrika-mcp"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

## Tools

- `metrika_status`: Shows connections, exports and the next step.
- `metrika_connect`: Starts a browser sign-in.
- `metrika_disconnect`: Removes a connection and its token locally.
- `metrika_list_counters`: Lists counters.
- `metrika_describe_counter`: Describes a counter's time zone and goals.
- `metrika_catalog`: Lists presets, metrics, dimensions and period presets.
- `metrika_run_report`: Runs a report for one period.
- `metrika_compare_periods`: Compares two periods under identical conditions.
- `metrika_run_timeseries`: Returns day, week or month buckets.
- `metrika_export_report`: Starts a full CSV or JSON export job.

## FAQ

### Can it change my Metrika settings?

No. It is read-only, with no write endpoints and no raw HTTP tool.

### Do I need an API key?

No. You sign in through the browser, though an existing OAuth token can be supplied for headless setups.

### Can I try it without an account?

Yes, a synthetic demo connection is always available.

### Where are tokens stored?

In the OS credential store such as macOS Keychain, Windows Credential Manager or Linux Secret Service.

### What licence is it?

MIT.

### Is Yandex Metrika free?

Yes. Yandex Metrika is open source, so you can use and self-host it for free.

### How do I add Yandex Metrika to Claude Code?

Run this command in your terminal: claude mcp add yandex-metrika-mcp --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y @dev-crabs/yandex-metrika-mcp

### What are the best alternatives to Yandex Metrika?

The closest alternatives to Yandex Metrika are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, dashboard-icons, Tapetide - Indian Stock Market MCP and World Monitor.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [dashboard-icons](https://ai-powered.com/mcp/dashboard-icons): dashboard-icons is an open-source MCP server for analytics and data.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [Calven](https://ai-powered.com/mcp/calven): Calven is an MCP server for marketing and seo.
- [DataArcus for Power BI](https://ai-powered.com/mcp/dataarcus-for-power-bi): DataArcus for Power BI is a free MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/yandex-metrika
