streamable-httpMITupdated 2mo ago
Query Yandex Metrika analytics in plain language, right inside Claude. "How many visits this week?", "Top traffic sources for June", "Mobile share today?" — the assistant queries Metrika and answers directly. No dashboards, no SQL, no API keys to manage.
Yandex Metrika MCP 能做什么?
yandex-metrika-mcp
Query Yandex Metrika analytics in plain language, right inside Claude. "How many visits this week?", "Top traffic sources for June", "Mobile share today?" — the assistant queries Metrika and answers directly. No dashboards, no SQL, no API keys to manage.
Open-source by aiaiai — we build what we teach.
Задавай вопросы по Яндекс.Метрике обычным языком прямо в Claude. «Сколько визитов за неделю?», «топ источников за июнь», «доля мобильных?» — ассистент сам сходит в Метрику и ответит. Без дашбордов.

Works with
Claude.ai · Claude Code · Claude Desktop · Cursor · any MCP-compatible client
Connect in one minute (hosted)
No installation needed — connect to the hosted service.
Claude.ai (Settings → Connectors → Add):
https://mcp.getaiaiai.ru/yandex-metrika
Click Connect → sign in with Yandex → allow access.
Claude Code CLI:
claude mcp add --transport http yandex-metrika https://mcp.getaiaiai.ru/yandex-metrika/
claude mcp login yandex-metrika
A browser window opens → sign in with Yandex → done. On headless/SSH: add --no-browser to mcp login and paste the redirect URL when prompted.
Claude Desktop / Cursor — add to mcpServers:
{
"mcpServers": {
"yandex-metrika": {
"type": "http",
"url": "https://mcp.getaiaiai.ru/yandex-metrika/"
}
}
}
No app registration, no tokens to manage. Read-only — the service never writes to your Metrika account.
Claude.ai (Настройки → Коннекторы → Добавить):
https://mcp.getaiaiai.ru/yandex-metrika
Нажмите Подключить → войдите через Яндекс → разрешите доступ.
Claude Code CLI:
claude mcp add --transport http yandex-metrika https://mcp.getaiaiai.ru/yandex-metrika/
claude mcp login yandex-metrika
Откроется браузер → войти через Яндекс → готово.
Tools
| Tool | Description |
|---|---|
list_counters |
List all Yandex Metrika counters available to the token (id, name, site) |
query |
Run a Reporting API query — visits, users, pageviews, bounce rate, traffic sources, devices, geography, UTMs, and more |
query parameters
| Parameter | Default | Description |
|---|---|---|
counter_id |
required | Counter ID from list_counters |
metrics |
required | Comma-separated metrics, e.g. ym:s:visits,ym:s:users |
dimensions |
— | Group-by fields: ym:s:date, ym:s:lastTrafficSource, ym:s:deviceCategory, … |
date1 / date2 |
7daysAgo / today |
Date range: YYYY-MM-DD or relative (today, yesterday, NdaysAgo) |
filters |
— | Filter expression, e.g. ym:s:deviceCategory=='mobile' |
sort |
— | Sort field; prefix - for descending, e.g. -ym:s:visits |
limit |
100 |
Max rows returned |
Common metrics: ym:s:visits, ym:s:users, ym:s:pageviews, ym:s:bounceRate, ym:s:avgVisitDurationSeconds, ym:s:newUsers
Common dimensions: ym:s:date, ym:s:lastTrafficSource, ym:s:startURL, ym:s:deviceCategory, ym:s:regionCountry, ym:s:lastsourceUTMSource
Self-host with your own token
Requires Python 3.10+ and uv.
git clone https://github.com/expremiental/yandex-metrika-mcp.git
cd yandex-metrika-mcp
uv sync
Get a token. Go to oauth.yandex.ru, create an app (platform: "Web services"), enable Yandex Metrika → Read statistics (metrika:read), then get an OAuth token:
export YANDEX_METRIKA_TOKEN="<your-token>"
Connect (Claude Desktop / Cursor — add to mcpServers):
{
"mcpServers": {
"yandex-metrika": {
"command": "uv",
"args": ["run", "yandex-metrika-mcp"],
"env": { "YANDEX_METRIKA_TOKEN": "<your-token>" }
}
}
}
Run over HTTP:
MCP_TRANSPORT=http PORT=8000 uv run yandex-metrika-mcp
# endpoint: http://localhost:8000/mcp
Embed in your own backend. The engine accepts an injectable async token resolver — wrap it with your own auth:
from yandex_metrika_mcp import build_server
async def my_token_resolver() -> str:
return "<metrika:read token>"
build_server(token_resolver=my_token_resolver).run(transport="stdio")
Public API: build_server, YandexMetrikaClient, TokenResolver, env_token_resolver, main.
License
安装
把 Yandex Metrika MCP 添加到你的客户端。选择你正在使用的那个。
claude mcp add --transport http yandex-metrika-mcp https://mcp.getaiaiai.ru/yandex-metrikacodex mcp add yandex-metrika-mcp --url https://mcp.getaiaiai.ru/yandex-metrika{
"mcpServers": {
"yandex-metrika-mcp": {
"url": "https://mcp.getaiaiai.ru/yandex-metrika"
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"servers": {
"yandex-metrika-mcp": {
"type": "http",
"url": "https://mcp.getaiaiai.ru/yandex-metrika"
}
}
}Add to `.vscode/mcp.json` in your workspace.
{
"mcpServers": {
"yandex-metrika-mcp": {
"url": "https://mcp.getaiaiai.ru/yandex-metrika"
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"yandex-metrika-mcp": {
"serverUrl": "https://mcp.getaiaiai.ru/yandex-metrika"
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
1 个工具
Yandex Metrika MCP 向已连接的智能体提供 1 个工具。
- list_counters
- List all Yandex Metrika counters available to the token (id, name, site)
评分
70 / 100
良好
- 文档25/25
- 维护16/25
- 可信度13/20
- 能力4/15
- 安装体验12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 68 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 1 tool(s) documented
- Provides prompt templates
- Provides resources
- 6 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
版本历史
| 版本 | 发布于 |
|---|---|
| 0.1.0最新 | 2026年6月24日 |