yandex-metrica-mcp

v1.0.1
io.github.BoxLab-Ltd/yandex-metrica-mcp Checked 9 hours ago Published 26 days ago

Query Yandex Metrica analytics — reports, trends, metadata and raw log exports — via an AI agent.

Values you need

VariableWhat it is
YANDEX_METRIKA_TOKENoptional secret Yandex Metrica OAuth token (metrika:read). Optional if you run the `auth` login.
YANDEX_METRIKA_COUNTER_IDoptional Default counter id, so tools may omit counterId.
YANDEX_METRIKA_ENABLE_WRITEoptional 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_DIRoptional 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.1
Add 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

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: login, submit_code, get_metadata, describe_counter, run_report, run_comparison, run_drilldown, run_timeseries, ….
  4. 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