npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

krutov-yandex-metrika-mcp-server

v1.0.1

Published

MCP server for the Yandex Metrika

Readme

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.

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

Installation

  "mcpServers": {
    "yandex-metrika-mcp": {
      "command": "node",
      "args": [
        "{path-to-repo}/build/index.js"
      ],
      "env": {
        "YANDEX_API_KEY": {your_yandex_api_token_here}
      }
    }
  }

Get authorization token

To obtain an authorization token:

  1. 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_data access rights are not mandatory if metrika:write access is used.

  2. Click Create application and copy its ClientID (click the icon next to the identifier).

  3. Add the copied ClientID to a link of the form: https://oauth.yandex.ru/authorize?response_type=token&client_id=<application_id>

  4. Follow the link and copy your authorization token from the opened page.

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 Metrika
  • get_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 report
  • sources_search_phrases - Retrieve search phrases and browser information from traffic sources
  • get_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 filters
  • get_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 articles
  • get_content_analytics_categories - Retrieve overall statistics by content category
  • get_content_analytics_authors - Get statistics on article authors performance
  • get_content_analytics_topics - Analyze performance by article topics
  • get_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 category
  • get_device_analysis - Analyze user behavior by browser and operating system
  • get_mobile_vs_desktop - Compare traffic and engagement metrics between mobile and desktop users
  • get_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/cities
  • get_geographical_organic_traffic - Analyze geographical distribution of organic traffic

Performance & Conversion

  • get_page_performance - Get page performance and bounce rate by URL path
  • get_goals_conversion - Track conversion rates for specified goals
  • get_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 year
  • get_yandex_direct_experiment - Get bounce rate for specific Yandex Direct experiments

Requirements

  • Node.js 18+
  • Yandex Metrika API access token

License

MIT