
Yandex Metrika MCP
io.github.stufentlyPublished by GitHub account stufentlyv2.2.1Updated Oct 24, 2026
MCP server for Yandex Metrika API — web analytics, traffic, audience data
Overview
Local MCP server for the Yandex Metrika API that lets an assistant read web analytics traffic, audience and report data and manage counters.
- What you can do
- List counters and read counter details and goals
- Create and delete counters (delete requires explicit confirmation)
- Pull traffic summaries, sources, geography, devices and popular pages
- List top search phrases driving traffic
- Run custom Stat API reports with chosen metrics, dimensions, filters and sorting
- When to use it
- Useful when you work with Yandex Metrika and want an assistant to summarize site traffic, compare sources or devices, inspect search phrases, or build ad-hoc reports without leaving the chat.
- Requirements
- Runs locally via Node.js from a cloned source checkout (the README says nothing is published on the scope yet). Needs a Yandex Metrika OAuth token in YANDEX_METRIKA_TOKEN; the interactive auth flow also needs YANDEX_CLIENT_ID and YANDEX_CLIENT_SECRET. Optional YANDEX_METRIKA_SCOPE overrides requested scopes. Network access to the Metrika API.
Installation
In SourceWeft
- Open Yandex Metrika MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
yandex-metrika-mcp
MCP server for Yandex Metrika API. Access web analytics data -- traffic summaries, audience demographics, traffic sources, popular pages, search phrases, and custom reports.
Installation
This package is published as @stufently/yandex-metrika-mcp; the unscoped name yandex-metrika-mcp
belongs to an unrelated publisher (see the note in the root README).
Nothing is on the scope yet, so run it from source:
Configuration
Add to your MCP client config:
Environment Variables
Authentication
To obtain an OAuth token interactively:
This opens a browser for Yandex OAuth authorization and returns a token. Set it as
YANDEX_METRIKA_TOKEN.
Scopes
The helper requests metrika:read metrika:write by default. The write scope is not
optional decoration: create-counter and delete-counter are rejected with HTTP 403 without
it, and the rejection arrives at the moment you try to create a counter, not at setup time.
For a token that can only read, ask for less:
The two write tools then fail with a 403 whose message names the missing scope. Both tools also say so in their own descriptions, so a model can tell the difference between "not allowed" and "broken" before calling them.
A write-capable token no longer means an unguarded delete: delete-counter requires an explicit
confirm: true regardless of scope — see Deleting a counter.
Note: The Metrika API uses Authorization: OAuth {token} (not Bearer).
Tool Reference (12 tools)
Management (5)
Deleting a counter
delete-counter is the only irreversible tool here, and it refuses to run unless the call
carries confirm: true:
Called without it, the tool returns an error result and sends nothing to the Metrika API:
confirm is optional in the JSON schema on purpose: a missing confirmation has to come back as
that explanation, not as a schema validation error a model cannot act on. Only a literal
true counts — "true", 1 and "yes" are refused, because a guess at the protocol is not a
decision to delete anything. The tool is also marked destructiveHint: true in its MCP
annotations, so clients that surface tool risk can show it before the call.
Why the parameter exists: until the default OAuth scope included metrika:write, an accidental
delete-counter was stopped by the 403 a read-only token produced. Fixing that 403 (so setup
works the first time) removed the only real brake, and "Irreversible" in a description is a
hope that the model reads carefully, not a guard.
Reporting (6)
Custom (1)
get-report Parameters
The get-report tool provides full access to the Metrika Stat API:
Default Date Range
When date_from and date_to are not specified, all reporting tools default to the last 30 days.
Data Sampling
The Metrika Stat API may return sampled data for large datasets. When sampling is applied, the response includes a note indicating that figures are approximate.
License
MIT
Source: packages/yandex-metrika-mcp/README.md at commit bdd6c64
Tools
0Version history
2- v2.2.1LatestOct 16, 2026
- v2.2.0Oct 15, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts