yandex-metrica-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yandex-metrica-mcp Show daily traffic for my Yandex Metrica counter 123456 for the last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yandex-metrica-mcp
Read-only MCP server for Yandex Metrica. AI assistants and coding agents can read counters, goals, traffic reports, landing pages, device splits, and goal visits without modifying counter settings.
Available tools
Tool | Description |
| List Yandex Metrica counters available for the token. |
| List conversion goals for a counter ( |
| Load daily visits, users, average visit duration, and optional goal reaches. |
| Load traffic and engagement stats grouped by traffic source and UTM tags. |
| Load traffic and engagement stats grouped by landing page URL. |
| Load traffic and engagement stats grouped by device category. |
| Load individual visits that reached a specific goal (with timestamp and |
Related MCP server: yandex-metrika-mcp
Getting credentials
Register an app in Yandex OAuth with the
metrika:readpermission and set the Redirect URI tohttps://oauth.yandex.com/verification_code.Open this URL in your browser (replace
<CLIENT_ID>with your app ID), approve access, and copyaccess_tokenfrom the redirect URL:https://oauth.yandex.com/authorize?response_type=token&client_id=<CLIENT_ID>Set
YANDEX_METRICA_TOKENto that token. SetYANDEX_CLIENT_LOGINonly if you access another user's account via delegate/agency access.
Environment variables
YANDEX_METRICA_TOKEN(required): Yandex Metrica OAuth token.YANDEX_CLIENT_LOGIN(optional): Yandex account login sent inClient-Login.YANDEX_METRICA_API_URL(optional): base URL for the Metrica API, defaults tohttps://api-metrika.yandex.net. Set this when pointing to a local mock server (for examplehttp://localhost:8092).
Installation in coding agents
Requires uv (uvx).
Run it directly from GitHub with uvx, or from a local clone using --directory /path/to/yandex-metrica-mcp.
Standard JSON config (Cursor, Claude Desktop, Windsurf, Antigravity, VS Code, Gemini CLI)
Add this block to your agent's mcpServers JSON config:
{
"mcpServers": {
"yandex-metrica": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/s3rezhkaa/yandex-metrica-mcp",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRICA_TOKEN": "your-oauth-token"
}
}
}
}For a local clone, use "command": "uv" and "args": ["run", "--directory", "/path/to/yandex-metrica-mcp", "yandex-metrica-mcp"].
Claude Code CLI
claude mcp add yandex-metrica \
-e YANDEX_METRICA_TOKEN=your-oauth-token \
-- uvx --from git+https://github.com/s3rezhkaa/yandex-metrica-mcp yandex-metrica-mcpCodex CLI (~/.codex/config.toml)
[mcp_servers.yandex_metrica]
command = "uvx"
args = ["--from", "git+https://github.com/s3rezhkaa/yandex-metrica-mcp", "yandex-metrica-mcp"]
[mcp_servers.yandex_metrica.env]
YANDEX_METRICA_TOKEN = "your-oauth-token"Optional audit skill
A short audit skill is included in skills/yandex-metrica-audit/SKILL.md.
Copy or symlink skills/yandex-metrica-audit into your agent's skills directory (for example ~/.claude/skills/, ~/.codex/skills/, or .agents/skills/ in a workspace) to run a step-by-step site traffic audit.
Local development
uv sync
uv run ruff check .
uv run pytest -vAvailable Tools
7 toolsget_countersA
List Yandex Metrica counters available for the configured OAuth token.
Inputs: no named parameters. Returns: result
get_daily_statsB
Load daily visits, users, average visit duration, and goal reaches for a counter.
Args: counter_id: Yandex Metrica counter ID. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. goal_ids: Optional list of Metrica goal IDs to include reach counts.
Inputs: end_date (required), counter_id (required), start_date (required), goal_ids. Returns: result
get_goalsC
List conversion goals configured for a Yandex Metrica counter.
Args: counter_id: Yandex Metrica counter ID.
Inputs: counter_id (required). Returns: result
get_goal_visitsA
Load individual visits that reached a specific goal (with visit time and UTM content).
Args: counter_id: Yandex Metrica counter ID. goal_id: Yandex Metrica goal ID. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. limit: Maximum number of rows to return (1 to 100000).
Inputs: goal_id (required), end_date (required), counter_id (required), start_date (required), +1 more. Returns: result
get_pages_reportB
Load traffic and engagement stats grouped by landing page URL.
Args: counter_id: Yandex Metrica counter ID. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. goal_ids: Optional list of Metrica goal IDs to include reach counts. limit: Maximum number of rows to return (1 to 100000).
Inputs: end_date (required), counter_id (required), start_date (required), limit, +1 more. Returns: result
get_sources_reportC
Load traffic and engagement stats grouped by traffic source and UTM tags.
Args: counter_id: Yandex Metrica counter ID. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. goal_ids: Optional list of Metrica goal IDs to include reach counts. limit: Maximum number of rows to return (1 to 100000).
Inputs: end_date (required), counter_id (required), start_date (required), limit, +1 more. Returns: result
get_tech_reportA
Load traffic and engagement stats grouped by device category.
Args: counter_id: Yandex Metrica counter ID. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format. goal_ids: Optional list of Metrica goal IDs to include reach counts. limit: Maximum number of rows to return (1 to 100000).
Inputs: end_date (required), counter_id (required), start_date (required), limit, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: counter/goal listing, daily aggregate stats, grouped reports by source/page/device, and goal-level visits. The three grouped report tools are similar in shape but explicitly separated by grouping dimension, so an agent can select correctly.
All tools follow the same get_<resource> pattern with snake_case and concise noun phrases. There are no naming style deviations or ambiguous verb choices.
Seven tools is well-scoped for a focused Yandex Metrica analytics server. Each tool covers a distinct reporting or lookup need without excessive surface area.
The surface covers core analytics workflows: counters, goals, daily stats, traffic source/page/device breakdowns, and goal-reaching visits. Some common Metrica report dimensions (e.g., geography, search engines, demographics, events) are absent, but the main reporting path is covered.
Maintenance
Related MCP Connectors
Analyze Yandex Metrica traffic and conversions in ChatGPT with read-only access.
Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.
Read-only website analytics, AI referrals, crawlers, goals, revenue, and funnels.
Read-only Google Search Console and Google Analytics for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to retrieve comprehensive analytics data from Yandex Metrika accounts, including traffic, content, e-commerce, and user demographics.1MIT
- AlicenseCqualityCmaintenanceEnables interaction with Yandex Metrika's Reports and Management APIs, providing tools for querying analytics data and managing counters, goals, filters, and other settings.68MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to work with Yandex Webmaster, Direct, and Metrika data through natural language, including managing sites, sitemaps, recrawls, ad campaigns with write-safety guards, and pulling traffic, conversion, and ad statistics.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to retrieve analytics reports, compare periods, and inspect orders, leads, calls, visits, clients, and funnel data from allowed projects.1-