Server data from the Official MCP Registry
Query Yandex Metrica web analytics — reports, trends and metadata — via an AI agent.
Query Yandex Metrica web analytics — reports, trends and metadata — via an AI agent.
Valid MCP server (2 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
12 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Set these up before or after installing:
Environment variable: YANDEX_METRIKA_TOKEN
Environment variable: YANDEX_METRIKA_COUNTER_ID
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-boxlab-ltd-yandex-metrica-mcp": {
"env": {
"YANDEX_METRIKA_TOKEN": "your-yandex-metrika-token-here",
"YANDEX_METRIKA_COUNTER_ID": "your-yandex-metrika-counter-id-here"
},
"args": [
"-y",
"yandex-metrica-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
A Model Context Protocol (MCP) server for Yandex Metrica. It lets an AI agent query your web-analytics data — traffic, sources, landing pages, conversions, geography, devices and trends — through a small set of flexible, read-only tools.
Read-only by design, no secrets stored in the package: interactive login uses a built-in public OAuth client with PKCE, and the server talks only to Yandex.
Status: early development (v0.1, work in progress). General-purpose: SEO is one of many use cases, not the focus.
There is no official Yandex Metrica MCP server, and existing community ones are mostly thin, unmaintained, or dump raw data straight into the model's context. This server aims to be the well-engineered, well-maintained, open option: flexible report tools, strict token/context discipline, read-only by default.
run_report — flexible wrapper over the Reporting API (/stat/v1/data).run_comparison — compare two periods with absolute and percentage deltas.run_drilldown — drill down through a dimension tree.run_timeseries — metrics split into a time series (/bytime) for trends.get_metadata — discover available counters, goals, and common
dimensions/metrics so the model queries with real field names.Planned for later: Logs API (raw row-level export → local SQL), Streamable HTTP transport, write tools (behind an explicit flag).
metrika:read scope (see
Authentication). Whoever the credentials belong to must have access to the
counters you query.Recommended: interactive login. No app registration needed — the server ships a built-in public OAuth client. Run once:
yandex-metrica-mcp auth # or, in dev: bun run auth
It opens a Yandex consent page; after you approve, Yandex shows a code that you
paste back into the terminal. The token is cached at
~/.config/yandex-metrica-mcp/token.json (mode 0600) and is valid for ~1 year;
re-run auth when it expires. The login uses authorization-code + PKCE, so no
client secret is stored anywhere. A cached login takes precedence over
YANDEX_METRIKA_TOKEN.
Alternative: static token. Get a token for an app with the metrika:read
scope at https://oauth.yandex.ru and pass it as YANDEX_METRIKA_TOKEN — handy
for CI or non-interactive use.
Own OAuth app (optional). To use your own app instead of the built-in one,
set YANDEX_OAUTH_CLIENT_ID; add YANDEX_OAUTH_CLIENT_SECRET to also enable
automatic token refresh.
Add the server to your MCP client (e.g. Claude Desktop) configuration:
{
"mcpServers": {
"yandex-metrica": {
"command": "npx",
"args": ["-y", "yandex-metrica-mcp"],
"env": {
"YANDEX_METRIKA_TOKEN": "your-oauth-token",
"YANDEX_METRIKA_COUNTER_ID": "12345678"
}
}
}
}
See .env.example for all configuration options. The published
package runs on Node (so npx/MCP clients work out of the box); local
development uses Bun.
Once connected, an agent can answer questions like:
run_report with metrics: ["ym:s:visits","ym:s:users"],
dimensions: ["ym:s:lastsignTrafficSource"].run_comparison
(server returns A, B, and the deltas).run_drilldown, then again with parentId.get_metadata.This project is Bun-first:
bun install
bun run dev # run from source with hot reload
bun run typecheck # tsc --noEmit
bun run lint # eslint
bun test # bun's test runner
bun run build # emit dist/ with tsc (Node-compatible)
MIT © boxlab
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.