Skip to main content
Glama
askads

Yandex Metrica MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
YANDEX_METRIKA_LANGNoЗаголовок Accept-Language.ru
YANDEX_METRIKA_TOKENYesOAuth-токен Метрики (scope metrika:read).
YANDEX_METRIKA_API_BASENoКорень API.https://api-metrika.yandex.net
YANDEX_METRIKA_COUNTER_IDNoСчётчик по умолчанию, если в вызове не задан counterId.
YANDEX_METRIKA_TIMEOUT_MSNoТаймаут запроса, мс.60000
YANDEX_METRIKA_MAX_RETRIESNoПовторы при 429/5xx.3

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_countersA

Lists the Yandex Metrica counters the token can access (Management API). Each counter has id, name and site2 (site domain) — use the id with get_statistics and list_goals. Filter by a name/site substring with search.

list_goalsA

Lists the goals (conversions) configured on a Metrica counter (Management API). Goal ids are needed to read conversion metrics (ym:s:goalreaches / ym:s:goalconversionRate) in get_statistics. counterId defaults to YANDEX_METRIKA_COUNTER_ID when omitted.

get_statisticsA

Queries the Yandex Metrica Reporting API (stat/v1/data) for a counter. By DEFAULT returns one aggregated row over the period (no dimensions) with visits/users/pageviews/bounceRate/avgVisitDuration. Add dimensions to split rows (ym:s:date for a daily trend, ym:s:lastTrafficSource for traffic sources, ym:s:deviceCategory for devices), metrics to pick KPIs — for conversions use ym:s:goalreaches / ym:s:goalconversionRate (get goal ids from list_goals). The response carries totals (grand total over ALL rows — use it for «сколько всего», no need to sum), total_rows, and sampled/sample_share (sampled=true means the data is approximate; narrow the range or pass accuracy=full for exact figures). counterId defaults to YANDEX_METRIKA_COUNTER_ID.

raw_requestA

Escape hatch to call any Yandex Metrica API path directly — e.g. "management/v1/counters", "management/v1/counter/{id}/goals", "stat/v1/data". Use it for endpoints without a dedicated tool. query becomes the query string; body is sent as JSON for POST. GET runs freely; POST and DELETE are writes and require confirmWrite=true.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/askads/mcp-yandex-metrica'

If you have feedback or need assistance with the MCP directory API, please join our Discord server