Yandex Metrika MCP Server (ymetrika-mcp)

Yandex Metrika MCP Server

A FastMCP-based MCP server for Yandex Metrika reports: visits, traffic sources, demographics, goal conversions

  • 0 ★ on the repository
  • Last commit
MCP server

Extended access

Why this level

  • Runs a Python HTTP server on port 8000 that reads Metrika reports with an OAuth token
  • Issue the token with the metrika:read scope
All reasons and checks
Russian stack

nnstd-cloud-ru-hack-2025/ymetrika-mcp

A similar tool with a larger community: Yandex Metrika MCP, 24 ★ on the repository

Install

Manual install

docker build -t yandex-metrika-mcp . && docker run -p 8000:8000 -e YANDEX_API_KEY=your_api_key_here yandex-metrika-mcp

Build and run the container as shown in the README; the server listens on port 8000.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Runs a Python HTTP server on port 8000 that reads Metrika reports with an OAuth token
  • Issue the token with the metrika:read scope

This is third-party code. Review the repository files before installing.

What it does

A Python and FastMCP server exposes MCP over streamable HTTP and provides five tools on top of the Metrika Reporting API: counter info, visits for a period, traffic source breakdown, user demographics and goal conversions. A diagnostic ping tool checks the transport. Every call is wrapped in an OpenTelemetry trace, the server exposes Prometheus metrics at /metrics and status at /health. It runs locally via uv or in Docker under a non-root user.

Who it is for. For teams that want an observable Metrika reporting MCP server with tracing and metrics for their own infrastructure.

Good fit when

  • You need basic Metrika reports (visits, sources, demographics, goals) over MCP
  • Observability matters: OpenTelemetry traces and Prometheus metrics on your own server
  • You plan to deploy it in Docker alongside your monitoring stack

Not a fit when

  • You need the full Stat API or Logs API surface: only five ready tools are implemented here
  • You need Direct or Webmaster support in the same server

Example request

Show visits and traffic sources for counter 12345678 over the last week

MCP

Transport
http
Authentication
API key

Environment variables

YANDEX_API_KEY required, secret
Yandex OAuth token with read access to Metrika
YANDEX_COUNTER_ID
Default Metrika counter ID
PORT
Server port, defaults to 8000
ENVIRONMENT
development or production mode; production enforces YANDEX_API_KEY validation

Limitations

Only five reporting tools plus ping are implemented; other Metrika methods (Logs API, management, import) are not covered. The server only speaks streamable HTTP, no stdio mode. A Yandex OAuth token with Metrika access is required. The README has no npx or uvx one-liner, only clone and uv sync.

How to disable. Stop the server process or container and remove its address from your MCP client settings.

FAQ

Can it run without Docker?

Yes, via uv sync and uv run python src/server.py; the server comes up at http://0.0.0.0:8000.

Does the server change anything in the Metrika account?

No, all five tools only read reports, there is no write access to the account.

Discussion

No questions or reviews yet.

Yandex Metrika MCP

Yandex Metrika MCP Server

Russian stack

MCP server for Yandex Metrika reports: traffic, sources, search phrases, goals, geography, devices and content analytics

MCP serverExtended access24Repository stars

MCP Yandex Metrica with counter management

@theyahia/yandex-metrika-mcp

Russian stack

Yandex Metrica MCP server with 15 tools: reports and traffic plus creating, editing, and deleting counters and goals

MCP serverBroad access1Repository stars

Yandex Metrica MCP

yandex-metrica-mcp

Russian stack

Read-only MCP server for Yandex Metrica: reports, period comparison, goals and raw log export with browser login

MCP serverExtended access15Repository stars
Russian stack

An MCP server, CLI and Pydantic models for the Yandex Metrika API: reports, counters, goals, filters, segments, logs and offline conversion uploads

MCP serverBroad access2Repository stars
Editors’ pick

A Yandex Metrika MCP server generated from the API spec: 108 methods, 10 tools declared by default, transparent filters and response metadata

MCP serverExtended access2Repository stars
Russian stack

A read-only Yandex Metrika MCP server with 31 tools for traffic, content, demographics, geography, conversions and e-commerce, metrika:read only

MCP serverExtended access2Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Yandex Metrika MCP Server (ymetrika-mcp) (this card)noAPI key0
Yandex Metrika MCP Server (Node.js)noAPI key1fixed report bugs
MCP Yandex Metrica with counter managementnoAPI key1manage counters and goals
Yandex Metrika MCP with DuckDBnoAPI key0analyzes raw Metrika logs locally in DuckDB

README in short

The README covers quick start via uv and Docker, the endpoint list (mcp, metrics, health) and detailed parameters for each of the five tools with JSON request and response examples. Separate sections cover environment variables, getting a metrika:read OAuth token, OpenTelemetry tracing, Prometheus metrics and project layout. A roadmap at the end marks the basic tools phase done, with batch reports and multi-counter support planned next.

README badge

Report a problem