Read-only Yandex Metrika MCP server
yandex-metrika-mcp
A minimalist Python MCP with 12 read-only tools using the correct OAuth header, paired with a skill that carries the period-comparison methodology
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- Read-only access to Metrika data, with no write or settings-change tools
Install
Manual install
python3 -m venv .venv && . .venv/bin/activate && pip install -e .Installs from a local checkout of the repository.
This is third-party code. Review the repository files before installing.
What it does
The server wraps the Yandex Metrika API into 12 read-only tools: account structure discovery (counters, goals, segments, filters, access grants, labels), arbitrary table reports with metrics, dimensions, filters and sorting, breakdowns by time and by a single dimension value, and comparison of two equal-length periods. It deliberately avoids wrapping the entire API endpoint by endpoint to keep the model's prompt lean, and uses the correct Authorization OAuth header rather than Bearer, which trips up other implementations. The repo ships a companion SKILL.md for Hermes Agent that defines the analysis method: list counters first, pick comparable periods, decompose a change by source, page or device, check traffic quality, and attach a confidence label to the conclusion.
Who it is for. For marketing analysts who need precise Metrika reports without any risk of an agent accidentally changing a counter.
Good fit when
- You want strictly read-only Metrika access with no write tools
- You need period comparisons with the change decomposed by source, page or device
- You want a compact toolset that does not bloat the model's context
Not a fit when
- You need to change counter settings, goals or segments: there are no write tools
- You need Hermes Agent integration specifically without manually wrapping the token setup for other clients
Example request
Compare traffic between this month and last month and break down the change by sourceLimitations
You need a Metrika OAuth token in the YANDEX_METRIKA_TOKEN environment variable; the server builds the Authorization OAuth header itself. There is no PyPI package, only a from-source install via pip install -e . or uv tool install. The companion skill is written for the Hermes Agent format; other agents need the analysis methodology ported manually.
How to disable. Remove the yandex-metrika-mcp block from your MCP client config, or unset the YANDEX_METRIKA_TOKEN environment variable.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| YANDEX_METRIKA_TOKEN required, secret | Yandex Metrika OAuth token |
Security check
- Read-only access to Metrika data, with no write or settings-change tools
README in short
The English and Russian README explains two layers: the MCP server as the data layer and the Hermes Agent skill as the analysis-methodology layer, both needed together for full value. It lists discovery and reporting tools, explains why the toolset is minimal rather than full API coverage, and shows installation via pip or uv, the token variable, and a wrapper for Hermes that keeps the token out of the editable config. MIT license.
FAQ
Are there any write tools?
No, the server is fully read-only, and all 12 tools only read data.
Why not just use a Bearer header?
Yandex Metrika rejects Bearer with a 401 error; it needs the Authorization OAuth header specifically, which the server builds itself.
Related
Official DataLens (Yandex) skills for Claude Code, Codex and OpenCode: SDK, HTML reports and RLS resolution
A Yandex Metrika MCP server generated from the API spec: 108 methods, 10 tools declared by default, transparent filters and response metadata
An open MCP server and agent skill set for SEO: keyword research, competitors, backlinks and site audits powered by DataForSEO
A Claude Code plugin for SEO audits: technical SEO, E-E-A-T, schema, local and AI search via parallel subagents