yandex-metrika-mcp
v2.1.1MCP server for Yandex Metrika — web analytics, counters, goals, traffic (Russia)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_counters
List all Yandex.Metrica counters available to the authenticated user. Returns counter ID, name, site URL, and status. Supports search filtering.
| Parameter | Type | Description |
|---|---|---|
field | string | Fields to return, comma-separated (e.g. 'name,site,status') |
per_page | number | Results per page (default 100, max 10000) |
search_string | string | Filter counters by name or site URL substring |
get_counter
Get full details of a single Yandex.Metrica counter by ID, including configuration, code snippet status, and goals count.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID to retrieve details for |
create_counter
Create a new Yandex.Metrica counter for a website. Returns the new counter ID and tracking code. You need to install the tracking code on the site afterwards.
| Parameter | Type | Description |
|---|---|---|
name * | string | Counter display name |
site * | string | Website domain (e.g. 'example.com') |
mirrors | array | Mirror domains to track alongside the main site |
update_counter
Update an existing Yandex.Metrica counter — change its name or site URL.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID to update |
name | string | New counter display name |
site | string | New website domain |
delete_counter
Permanently delete a Yandex.Metrica counter. This action is irreversible — all historical data for this counter will be lost.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID to delete. This action is irreversible. |
list_goals
List all goals configured for a Yandex.Metrica counter. Goals track conversions like page visits, button clicks, or multi-step funnels.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID to list goals for |
create_goal
Create a new conversion goal for a counter. Supports types: 'url' (page visit), 'number' (page count threshold), 'step' (multi-step funnel), 'action' (JavaScript event).
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID to create the goal in |
name * | string | Goal display name |
type * | string | Goal type: 'url' (page visit), 'number' (page count), 'step' (multi-step funnel), 'action' (JS event) |
conditions | array | Conditions array. Required for url, step, action goal types. |
delete_goal
Delete a conversion goal from a counter. Historical goal data in reports is preserved.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Counter ID the goal belongs to |
goal_id * | number | Goal ID to delete |
export_logs
Export raw visit or hit logs via the Logs API. Creates a log request and evaluates feasibility. Use source='visits' for session data, source='hits' for pageview data.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | ID счётчика Яндекс.Метрики |
date1 * | string | Дата начала в формате YYYY-MM-DD |
date2 * | string | Дата окончания в формате YYYY-MM-DD |
fields | string | Поля через запятую. По умолчанию для visits: ym:s:date,ym:s:clientID,ym:s:lastTrafficSource,ym:s:visitDuration |
source | string | Тип данных: visits (визиты) или hits (просмотры) |
get_report
Flexible Yandex.Metrica reporting endpoint. Query any combination of metrics (ym:s:visits, ym:s:pageviews, ym:s:bounceRate, ym:s:avgVisitDurationSeconds, ym:s:users, ym:s:newUsers, etc.) with dimensions (ym:s:trafficSource, ym:s:searchEngine, ym:s:country, ym:s:browser, ym:s:deviceCategory, ym:s:date, etc.) over a date range. Supports filters and sorting.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1 * | string | Start date YYYY-MM-DD |
date2 * | string | End date YYYY-MM-DD |
metrics * | array | Metrics array, e.g. ['ym:s:visits', 'ym:s:pageviews', 'ym:s:bounceRate', 'ym:s:avgVisitDurationSeconds'] |
dimensions | array | Dimensions array, e.g. ['ym:s:trafficSource', 'ym:s:browser', 'ym:s:country', 'ym:s:deviceCategory'] |
filters | string | Filter expression, e.g. ym:s:trafficSource=='organic' |
limit | number | Max rows to return (default 100) |
sort | string | Sort field, prefix with '-' for descending, e.g. '-ym:s:visits' |
get_report_comparison
Compare metrics between two date periods (A vs B). Useful for week-over-week, month-over-month, or campaign before/after analysis.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1_a * | string | Period A start date YYYY-MM-DD |
date1_b * | string | Period B start date YYYY-MM-DD |
date2_a * | string | Period A end date YYYY-MM-DD |
date2_b * | string | Period B end date YYYY-MM-DD |
metrics * | array | Metrics to compare |
dimensions | array | Dimensions to group by |
get_report_drilldown
Drill down into report data hierarchically. Start at top level, then pass parent_id to explore sub-dimensions (e.g., country -> city, traffic source -> campaign).
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1 * | string | Start date YYYY-MM-DD |
date2 * | string | End date YYYY-MM-DD |
dimensions * | array | Dimensions for drill-down hierarchy |
metrics * | array | Metrics to retrieve |
parent_id | string | Parent row ID to drill into. Omit for top-level. |
get_traffic_summary
Quick traffic overview for a counter over a date range. Returns visits, pageviews, unique users, bounce rate, and average visit duration in one call.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1 * | string | Start date YYYY-MM-DD |
date2 * | string | End date YYYY-MM-DD |
get_traffic_sources
Traffic sources breakdown — visits and users by source channel (organic search, direct, social, referral, ad). Quick way to see where traffic comes from.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1 * | string | Start date YYYY-MM-DD |
date2 * | string | End date YYYY-MM-DD |
get_top_pages
Top pages by pageviews for a counter. Returns URL, visits, pageviews, bounce rate, and avg duration for each page. Useful for content performance analysis.
| Parameter | Type | Description |
|---|---|---|
counter_id * | number | Yandex.Metrica counter ID |
date1 * | string | Start date YYYY-MM-DD |
date2 * | string | End date YYYY-MM-DD |
limit | number | Number of pages to return (default 20) |