Yandex Metrika MCP

v2.3.0
io.github.stufently/yandex-metrika-mcp Checked 16 hours ago Published 22 days ago

MCP server for Yandex Metrika API — web analytics, traffic, audience data

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get-counters

List all Metrika counters (sites). Use when the user wants the list of Metrika counters and their ids before any report. Do not use it for visits or traffic; call get-traffic-summary or another report tool once a counter id is known.

get-counter

Get details for a specific Metrika counter. Use when the user asks for the settings of one known Metrika counter, such as its name, site, or status. Do not use it to list every counter; call get-counters. Do not use it for visit numbers; call a report tool.

ParameterTypeDescription
counter_id *numberCounter ID

get-goals

Get goals for a Metrika counter. Use when the user asks which conversion goals exist on a counter. Do not use it for visit totals; call get-traffic-summary. Do not use it to create a counter; call create-counter.

ParameterTypeDescription
counter_id *numberCounter ID

create-counter

Create a new Metrika counter (add a site). Requires an OAuth token with the `metrika:write` scope; a read-only token fails with 403. Use when the user asks to add a new site to Metrika and a write-capable token is available. Do not use it to remove a counter; call delete-counter, which is irreversible and requires confirm. Do not use it to read an existing counter; call get-counter.

ParameterTypeDescription
name *stringCounter name
site *stringSite domain (e.g. "example.com")
gdpr_agreement_acceptedbooleanGDPR agreement accepted (required for EU)
mirrorsarrayMirror domains
time_zone_namestringTimezone (e.g. "Europe/Moscow")

delete-counter

Delete a Metrika counter. IRREVERSIBLE: the counter and all its collected statistics are lost permanently. Requires `confirm: true` — without it the tool refuses and calls nothing. Also requires an OAuth token with the `metrika:write` scope; a read-only token fails with 403. Use when the user has explicitly asked to delete one Metrika counter and accepts that its statistics are lost. Do not use it to create a site; call create-counter. Do not use it to inspect a counter; call get-counter.

ParameterTypeDescription
counter_id *numberCounter ID to delete
confirmbooleanMust be exactly true to actually delete. Omit it (or pass false) and the tool refuses without calling the Metrika API.

get-traffic-summary

Get traffic summary: visits, users, pageviews, bounce rate, avg duration. Use when the user wants visits, users, pageviews, bounce rate, or average duration for a counter over a date range. Do not use it for a breakdown by source, city, or page; call get-traffic-sources, get-geography, or get-popular-pages.

ParameterTypeDescription
counter_id *numberCounter ID
date_fromstringStart date YYYY-MM-DD
date_tostringEnd date YYYY-MM-DD

get-traffic-sources

Get traffic breakdown by source. Use when the user asks where visits came from, such as organic search, ads, or direct. Do not use it for the headline totals only; call get-traffic-summary. Do not use it for landing pages; call get-popular-pages.

ParameterTypeDescription
counter_id *numberCounter ID
date_fromstring
date_tostring
limitnumberMax results (default: 10)

get-geography

Get traffic breakdown by country and city. Use when the user asks which countries or cities the visitors come from. Do not use it for devices or browsers; call get-devices. Do not use it for traffic sources; call get-traffic-sources.

ParameterTypeDescription
counter_id *numberCounter ID
date_fromstring
date_tostring
limitnumberMax results (default: 10)

get-devices

Get traffic breakdown by device, browser, or OS. Use when the user asks for a breakdown by device, browser, or operating system. Do not use it for countries and cities; call get-geography. Do not use it for the headline visit total; call get-traffic-summary.

ParameterTypeDescription
counter_id *numberCounter ID
date_fromstring
date_tostring
group_bystringGroup by (default: device)
limitnumberMax results (default: 10)

get-search-phrases

Get top search phrases driving traffic. Use when the user asks which search phrases sent visits to the site. Do not use it for Yandex-wide keyword volume outside this counter; that is Wordstat, not this server. Do not use it for pageview leaders; call get-popular-pages.

ParameterTypeDescription
counter_id *numberCounter ID
date_fromstring
date_tostring
limitnumberMax results (default: 20)

get-report

Run a custom Metrika report with arbitrary metrics and dimensions. Use when the user needs a custom Metrika table with chosen metrics and dimensions that no dedicated tool covers. Do not use it for the standard visit summary; call get-traffic-summary. Do not use it to change the counter; this tool only reads.

ParameterTypeDescription
counter_id *numberCounter ID
metrics *stringComma-separated metrics (e.g. "ym:s:visits,ym:s:users")
date_fromstringStart date YYYY-MM-DD
date_tostringEnd date YYYY-MM-DD
dimensionsstringComma-separated dimensions
filtersstringFilter expression (e.g. "ym:s:trafficSource=='organic'")
limitnumberMax results (default: 10)
sortstringSort field (prefix with - for DESC)