yandex-metrika-mcp
Click on "Install 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-metrika-mcpshow me visits and page views 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 Metrika MCP Server (Node.js)
A Model Context Protocol (MCP) server that provides access to Yandex Metrika analytics data through various tools and functions. This server allows AI assistants and applications to retrieve comprehensive analytics data from Yandex Metrika accounts.
Based on atomkraft/yandex-metrika-mcp (MIT, unmaintained since 08.2025). This repo carries a bugfix series on top: several reports were sending invalid Yandex Metrika Reporting API attributes or silently ignoring their date-range parameters — see commit history for details. Maintained on a best-effort basis by @IlyaVorozhbit — file issues/PRs on this repo, not upstream.
Documentation in Russian is located here / Здесь находится документация на русском языке.
Features
Account Information: Get basic account and counter information
Traffic Analytics: Retrieve visits, page views, and user engagement metrics
Traffic Sources: Analyze traffic sources including organic search, direct traffic, and referrals
Content Analytics: Get insights about articles, authors, categories, and topics performance
User Demographics: Access user demographics and device analysis
Geographic Data: Regional traffic analysis and geographical distribution
E-commerce Analytics: Product performance and revenue tracking
Conversion Tracking: Goals conversion rates and funnel analysis
Search Performance: Organic search queries and search engine data
Device Analysis: Mobile vs desktop traffic comparison
Related MCP server: Google Analytics MCP Server
Requirements
Node.js 18+
Yandex Metrika API access token (see below)
Setup
Clone the repo and install dependencies:
git clone https://github.com/IlyaVorozhbit/yandex-metrika-mcp.git cd yandex-metrika-mcp npm installBuild it:
npm run buildThis compiles
src/*.tsintobuild/*.jsviatsc, then does a quick smoke-test run ofbuild/index.js. Without a token set, that smoke test fails with❌ Error: Missing Yandex Metrika token— expected, harmless, not a failed build. The token is only needed when the server actually runs (next steps).Get an authorization token — see Get authorization token below.
Find the counter ID(s) you want to query — every tool call takes a
counter_idparameter. You can find it in your Yandex Metrika dashboard: it's the numeric ID shown next to each counter (also visible in the counter's tracking snippet, e.g.ym(XXXXXXXX, 'init', ...)).Register the server with your MCP client. Example for Claude Code:
claude mcp add yandex-metrika -e YANDEX_API_KEY=your_token_here -- node /path/to/yandex-metrika-mcp/build/index.jsOr add it manually to your client's config (e.g.
claude_desktop_config.jsonfor Claude Desktop):{ "mcpServers": { "yandex-metrika-mcp": { "command": "node", "args": [ "/path/to/yandex-metrika-mcp/build/index.js" ], "env": { "YANDEX_API_KEY": "your_token_here" } } } }Replace
/path/to/yandex-metrika-mcpwith the absolute path to your clone, andyour_token_herewith the token from step 3.
Get authorization token
To obtain an authorization token:
Create an application, filling in the following fields:
name — can be arbitrary;
service icon — optional;
application platforms — select web services;
redirect URI — specify
https://oauth.yandex.ru/verification_code;data access — specify the set of access rights for your application. Available access rights:
metrika:read— obtaining statistics, reading parameters of your own and trusted counters, obtaining a list of counters;metrika:write— creating counters, changing parameters of your own and trusted counters, uploading any data;metrika:expenses— uploading expenses to counters;metrika:user_params— uploading user parameters to counters;metrika:offline_data— uploading offline data to counters (data from CRM, offline conversions, calls).
Note:
metrika:expenses,metrika:user_params,metrika:offline_dataaccess rights are not mandatory ifmetrika:writeaccess is used. For read-only usage,metrika:readalone is enough.Click Create application and copy its ClientID (click the icon next to the identifier).
Add the copied ClientID to a link of the form:
https://oauth.yandex.ru/authorize?response_type=token&client_id=<application_id>Follow the link and copy your authorization token from the opened page. This is the value that goes into
YANDEX_API_KEYin the Setup section above.
Available Tools
The server provides 25 different tools for accessing Yandex Metrika data:
Account & Basic Analytics
get_account_info- Get basic account and counter information from Yandex Metrikaget_visits- Retrieve visit statistics with optional date range filtering (defaults to last 7 days)
Traffic Sources Analysis
sources_summary- Get comprehensive traffic sources overview and summary reportsources_search_phrases- Retrieve search phrases and browser information from traffic sourcesget_traffic_sources_types- Analyze different types of traffic sources (organic, direct, referral)get_search_engines_data- Get sessions and users data from search engines with optional filtersget_new_users_by_source- Identify which traffic sources are most effective in acquiring new users
Content Analytics
get_content_analytics_sources- Get sources that drive users to website articlesget_content_analytics_categories- Retrieve overall statistics by content categoryget_content_analytics_authors- Get statistics on article authors performanceget_content_analytics_topics- Analyze performance by article topicsget_content_analytics_articles- Get detailed report on article views grouped by article
User Behavior & Demographics
get_user_demographics- Access user demographics and engagement by device categoryget_device_analysis- Analyze user behavior by browser and operating systemget_mobile_vs_desktop- Compare traffic and engagement metrics between mobile and desktop usersget_page_depth_analysis- Get sessions where users viewed more than specified number of pages
Geographic & Regional Data
get_regional_data- Get sessions and users data for specific regions/citiesget_geographical_organic_traffic- Analyze geographical distribution of organic traffic
Performance & Conversion
get_page_performance- Get pageviews by URL path (bounce rate/duration not available per-page, only site-wide viaget_visits)get_goals_conversion- Track conversion rates for specified goalsget_organic_search_performance- Analyze organic search performance by search engine and query
E-commerce Analytics
get_ecommerce_performance- Get e-commerce performance by product category and region
Browser & Technical Data
get_browsers_report- Get browsers report without accounting for browser version
Advanced Analytics
get_data_by_time- Get data for specific time periods grouped by day, week, month, quarter, or yearget_yandex_direct_experiment- Get bounce rate for specific Yandex Direct experiments
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server that provides access to Yandex Metrika analytics data through various tools and functions. This server allows AI assistants and applications to retrieve comprehensive analytics data from Yandex Metrika accounts.Last updated1
- AlicenseAqualityCmaintenanceEnables LLMs to interact with Google Analytics Admin and Data APIs to retrieve account summaries, property details, and custom metrics. It allows users to run core and real-time reports to analyze website performance and configuration via natural language.Last updated71Apache 2.0
- AlicenseAqualityAmaintenanceProvides AI assistants with read access to Clamp analytics data including pageviews, visitors, referrers, and custom events. Enables traffic analysis, conversion funnel evaluation, and metric alerts through natural language queries.Last updated331002MIT
- AlicenseCqualityDmaintenanceMCP server for Yandex Metrika analytics, enabling AI assistants to access traffic, content, demographics, conversion, e-commerce, and drill-down reports.Last updated312MIT
Related MCP Connectors
Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.
MCP for Yandex Direct: manage ad campaigns & analytics from Claude or ChatGPT
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/IlyaVorozhbit/yandex-metrika-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server