Yandex Metrica MCP

v0.2.3
io.github.stufently/yandex-metrica-mcp Checked 1 day ago Published 1 month ago

Yandex Metrica for AI agents: counters, goals, Reporting API and Logs API export over stdio.

Values you need

VariableWhat it is
YANDEX_METRICA_TOKENrequired secret Yandex OAuth token with the metrika:read scope

Docker discovery passed

Requires Docker

Run in a terminal
claude mcp add yandex-metrica-mcp -e 'YANDEX_METRICA_TOKEN=<YANDEX_METRICA_TOKEN>' -- docker run -i --rm -e YANDEX_METRICA_TOKEN ghcr.io/stufently/yandex-metrica-mcp:0.2.3
Add to claude_desktop_config.json
{
  "mcpServers": {
    "yandex-metrica-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "command": "docker",
      "env": {
        "YANDEX_METRICA_TOKEN": "<YANDEX_METRICA_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "yandex-metrica-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "command": "docker",
      "env": {
        "YANDEX_METRICA_TOKEN": "<YANDEX_METRICA_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "YANDEX_METRICA_TOKEN",
      "id": "yandex-metrica-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "yandex-metrica-mcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "YANDEX_METRICA_TOKEN",
        "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"
      ],
      "command": "docker",
      "env": {
        "YANDEX_METRICA_TOKEN": "${input:yandex-metrica-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.yandex-metrica-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "YANDEX_METRICA_TOKEN", "ghcr.io/stufently/yandex-metrica-mcp:0.2.3"]
env = { "YANDEX_METRICA_TOKEN" = "<YANDEX_METRICA_TOKEN>" }

For AI agents

  1. Ask the user for: YANDEX_METRICA_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. 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).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: yandex_metrica_list_counters, yandex_metrica_get_counter, yandex_metrica_list_goals, yandex_metrica_get_report, yandex_metrica_evaluate_logs_request, yandex_metrica_create_logs_request, yandex_metrica_list_logs_requests, yandex_metrica_get_logs_request, ….
  5. If it fails, check that the required runtime is installed (Docker) and that the values above are set.

Machine-readable: install.md · manifest.json