# Yandex Metrica MCP

> Yandex Metrica MCP is a free MCP server for analytics and data. Yandex Metrica web analytics in chat: counters, goals, traffic sources and conversions. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI
- **Repository:** https://github.com/askads/mcp-yandex-metrica
- **MCP Registry name:** io.github.askads/mcp-yandex-metrica
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-11-23

## About

Everything is read-oriented. The server finds the counters your Yandex account can see, lists their goals and builds reports on visits, users, page views, bounce rate, visit duration, sources, devices and goal completions for a chosen period. Reports include totals and a sampling flag, and the server notes when a large result hits a limit, so numbers are not silently trimmed.

Connection starts in the conversation: you ask to connect, open a Yandex OAuth link, approve and paste back a code valid for 10 minutes, protected by PKCE. The token is saved in a user-only file locally and disconnecting deletes only that file. A general API request tool exists, where POST and DELETE require confirmWrite=true.

The README is in Russian and lists eight tools. It needs Node.js 20 or newer and can also take a token or default counter ID from environment variables.

## Features

- **Counter and goal listing:** Finds the counters and goals available to your account.
- **Traffic reports:** Visits, users, views, bounces and duration by period.
- **Source and device breakdowns:** Splits traffic by source and device.
- **Sampling awareness:** Reports totals and whether data was sampled.
- **In-chat login:** Yandex OAuth with PKCE inside the conversation.

## Good for

- See last week's visits, users and bounces
- Rank traffic sources by visits
- Measure conversion for a named goal
- Check which counters you can access

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metrica
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metrica
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-yandex-metrica]
command = "npx"
args = ["-y", "mcp-yandex-metrica"]
env = { YANDEX_METRIKA_TOKEN = "<YANDEX_METRIKA_TOKEN>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' mcp-yandex-metrica npx -- -y mcp-yandex-metrica

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "mcp-yandex-metrica": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-yandex-metrica"
      ],
      "env": {
        "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 2 tools changes data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `start_login` (name suggests: changes): Starts the in-chat Yandex sign-in.
- `finish_login`: Finishes sign-in with the code from Yandex.

## FAQ

### Do I need a token first?

No. You can connect from chat, or provide YANDEX_METRIKA_TOKEN.

### Can Yandex Metrica MCP change my Metrica data?

Normal tools only read. The raw request tool can write only with confirmWrite=true.

### How many tools are there?

Eight, per the README.

### Is Yandex Metrica MCP free?

Yes. Yandex Metrica MCP is free to use.

### How do I add Yandex Metrica MCP to Claude Code?

Run this command in your terminal: claude mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metrica

### What are the best alternatives to Yandex Metrica MCP?

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

## 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.
- [dashboard-icons](https://ai-powered.com/mcp/dashboard-icons): dashboard-icons 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.
- [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.
- [Pitot](https://ai-powered.com/mcp/pitot): Pitot is an open-source MCP server for cloud and infrastructure.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [ELBI](https://ai-powered.com/mcp/elbi): ELBI is an open-source MCP server for analytics and data.
- [MCP Observatory: one read only walk over every https endpoint in the official registry](https://ai-powered.com/mcp/mcp-observatory-one-read-only-walk-over-every-https-endpoint): MCP Observatory: one read only walk over every https endpoint in the official registry is an MCP server for analytics and data.

---
Source: https://ai-powered.com/mcp/yandex-metrica-mcp-3
