yandex-metrika-mcp server
MCP server for Yandex Metrika — web analytics, counters, goals, traffic (Russia)
1 stars
Reviews
Write oneNobody has reviewed yandex-metrika-mcp yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
yandex-metrika-mcp tools (15, 5 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
create_counterwrite actionCreate 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.
create_goalwrite actionCreate a new conversion goal for a counter. Supports types: 'url' (page visit), 'number' (page count threshold), 'step' (multi-step funnel), 'action' (JavaScript event).
delete_counterwrite actionPermanently delete a Yandex.Metrica counter. This action is irreversible — all historical data for this counter will be lost.
delete_goalwrite actionDelete a conversion goal from a counter. Historical goal data in reports is preserved.
export_logsExport 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.
get_counterGet full details of a single Yandex.Metrica counter by ID, including configuration, code snippet status, and goals count.
get_reportFlexible 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.
get_report_comparisonCompare metrics between two date periods (A vs B). Useful for week-over-week, month-over-month, or campaign before/after analysis.
get_report_drilldownDrill down into report data hierarchically. Start at top level, then pass parent_id to explore sub-dimensions (e.g., country -> city, traffic source -> campaign).
get_top_pagesTop pages by pageviews for a counter. Returns URL, visits, pageviews, bounce rate, and avg duration for each page. Useful for content performance analysis.
get_traffic_sourcesTraffic sources breakdown — visits and users by source channel (organic search, direct, social, referral, ad). Quick way to see where traffic comes from.
get_traffic_summaryQuick traffic overview for a counter over a date range. Returns visits, pageviews, unique users, bounce rate, and average visit duration in one call.
list_countersList all Yandex.Metrica counters available to the authenticated user. Returns counter ID, name, site URL, and status. Supports search filtering.
list_goalsList all goals configured for a Yandex.Metrica counter. Goals track conversions like page visits, button clicks, or multi-step funnels.
update_counterwrite actionUpdate an existing Yandex.Metrica counter — change its name or site URL.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan22 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 22 days ago15/15
- Maintainer identityregistry namespace matches repository owner6/10
Install yandex-metrika-mcp in Claude Code, Cursor or VS Code
Runs npx -y @theyahia/yandex-metrika-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add yandex-metrika-mcp -- npx -y @theyahia/yandex-metrika-mcp
What the publisher says
From the yandex-metrika-mcp repository's README, as published. We do not edit it. Read it on GitHub
@theyahia/yandex-metrika-mcp
MCP server for Yandex.Metrica API — counters, goals, reports, logs, traffic sources, top pages. 15 tools, OAuth Bearer token auth.
Part of the Russian API MCP series by @theYahia.
Getting a Token
- Go to oauth.yandex.ru
- Create an app (or use an existing one)
- Under Platforms, select "Web services"
- Under Access, add: Yandex.Metrica -> Read statistics and counter parameters
- Get the OAuth token:
https://oauth.yandex.ru/authorize?response_type=token&client_id=YOUR_CLIENT_ID- Copy the token from the redirect URL (access_token=...)
Installation
Claude Desktop
Add to claudedesktopconfig.json:
{
"mcpServers": {
"yandex-metrika": {
"command": "npx",
"args": ["-y", "@theyahia/yandex-metrika-mcp"],
"env": {
"YANDEX_METRIKA_TOKEN": "your_token"
}
}
}
}Claude Code
claude mcp add yandex-metrika -e YANDEX_METRIKA_TOKEN=your_token -- npx -y @theyahia/yandex-metrika-mcpStreamable HTTP (remote / multi-client)
YANDEX_METRIKA_TOKEN=your_token npx @theyahia/yandex-metrika-mcp --http --port=3000Endpoint: POST http://localhost:3000/mcp Health check: GET http://localhost:3000/health
Smithery
Use smithery.yaml from the repository. Requires YANDEXMETRIKATOKEN.
Environment Variables
Tools (15)
Management — Counters
Management — Goals
Management — Logs
Reporting API
Convenience Wrappers
Demo Prompts
Show me all my Yandex.Metrica countersCompare last week's traffic to the previous week for counter 12345678What are the top 10 pages on my site this month, sorted by pageviews?Development
npm install
npm run build
npm test
npm run dev # stdio mode
npm run start:http # HTTP mode on port 3000API Reference
- Yandex.Metrica Management API
- Yandex.Metrica Reporting API
- Yandex.Metrica Logs API
License
MIT
Nothing above is checked by us. What we check is on the safety report.
yandex-metrika-mcp: common questions
- Is yandex-metrika-mcp server safe?
- Yes, by our scan: it is graded A (89/100). Read the yandex-metrika-mcp safety report
- How do I install yandex-metrika-mcp?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does yandex-metrika-mcp need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is yandex-metrika-mcp maintained?
- The last commit was 22 days ago (2026-09-06). The latest release is v2.1.1.