yandex-metrica-mcp
v1.0.1Query Yandex Metrica analytics — reports, trends, metadata and raw log exports — via an AI agent.
Values you need
| Variable | What it is | |
|---|---|---|
YANDEX_METRIKA_TOKEN | optional secret | Yandex Metrica OAuth token (metrika:read). Optional if you run the `auth` login. |
YANDEX_METRIKA_COUNTER_ID | optional | Default counter id, so tools may omit counterId. |
YANDEX_METRIKA_ENABLE_WRITE | optional | Set to 1 to add the write tools (chart annotations, expense upload). Sign-in then also asks for metrika:write; every change is confirmed. |
YANDEX_METRIKA_LOGS_DIR | optional | Directory for Logs API file exports (logs_download in file mode). Defaults to a folder under the OS temp directory. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add yandex-metrica-mcp -- npx -y yandex-metrica-mcp@1.0.1Add to
claude_desktop_config.json{
"mcpServers": {
"yandex-metrica-mcp": {
"args": [
"-y",
"yandex-metrica-mcp@1.0.1"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"yandex-metrica-mcp": {
"args": [
"-y",
"yandex-metrica-mcp@1.0.1"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"yandex-metrica-mcp": {
"args": [
"-y",
"yandex-metrica-mcp@1.0.1"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.yandex-metrica-mcp]
command = "npx"
args = ["-y", "yandex-metrica-mcp@1.0.1"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: login, submit_code, get_metadata, describe_counter, run_report, run_comparison, run_drilldown, run_timeseries, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json