yandex-metrika-mcp

Registre officiel Marketing et ventes

MCP server for Yandex Metrika — web analytics, counters, goals, traffic (Russia)

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @theyahia/yandex-metrika-mcp
Claude Code
claude mcp add yandex-metrika-mcp -- npx -y @theyahia/yandex-metrika-mcp@2.1.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "yandex-metrika-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@theyahia/yandex-metrika-mcp@2.1.1"
            ]
        }
    }
}

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. @theyahia/yandex-metrika-mcp
  2. Getting a Token
  3. Installation
  4. Environment Variables
  5. Tools (15)
  6. Demo Prompts
  7. Development
  8. API Reference
  9. License

@theyahia/yandex-metrika-mcp

MCP server for Yandex.Metrica API — counters, goals, reports, logs, traffic sources, top pages. 15 tools, OAuth Bearer token auth.

Part of the Russian API MCP series by @theYahia.

Getting a Token

  1. Go to oauth.yandex.ru
  2. Create an app (or use an existing one)
  3. Under Platforms, select "Web services"
  4. Under Access, add: Yandex.Metrica -> Read statistics and counter parameters
  5. Get the OAuth token:
     https://oauth.yandex.ru/authorize?response_type=token&client_id=YOUR_CLIENT_ID
  6. Copy the token from the redirect URL (access_token=...)

Installation

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "yandex-metrika": {
      "command": "npx",
      "args": ["-y", "@theyahia/yandex-metrika-mcp"],
      "env": {
        "YANDEX_METRIKA_TOKEN": "your_token"
      }
    }
  }
}
Claude Code
claude mcp add yandex-metrika -e YANDEX_METRIKA_TOKEN=your_token -- npx -y @theyahia/yandex-metrika-mcp
Streamable HTTP (remote / multi-client)
YANDEX_METRIKA_TOKEN=your_token npx @theyahia/yandex-metrika-mcp --http --port=3000

Endpoint: POST http://localhost:3000/mcp Health check: GET http://localhost:3000/health

Smithery

Use smithery.yaml from the repository. Requires YANDEX_METRIKA_TOKEN.

Environment Variables

VariableRequiredDescription
YANDEX_METRIKA_TOKENYesOAuth 2.0 Bearer token from Yandex OAuth

Tools (15)

Management — Counters
ToolDescription
list_countersList all counters. Filter by name/URL with search_string.
get_counterGet full details of a single counter by ID.
create_counterCreate a new counter for a website.
update_counterUpdate counter name or site URL.
delete_counterPermanently delete a counter (irreversible).
Management — Goals
ToolDescription
list_goalsList all goals for a counter.
create_goalCreate a goal (url, number, step, action types).
delete_goalDelete a goal from a counter.
Management — Logs
ToolDescription
export_logsExport raw visit/hit logs via the Logs API.
Reporting API
ToolDescription
get_reportFlexible reporting — any metrics + dimensions + filters + sort.
get_report_comparisonCompare two date periods (A vs B).
get_report_drilldownHierarchical drill-down into report dimensions.
Convenience Wrappers
ToolDescription
get_traffic_summaryQuick overview: visits, pageviews, users, bounce rate, avg duration.
get_traffic_sourcesTraffic sources breakdown by channel.
get_top_pagesTop pages by pageviews with performance metrics.

Demo Prompts

Show me all my Yandex.Metrica counters
Compare last week's traffic to the previous week for counter 12345678
What are the top 10 pages on my site this month, sorted by pageviews?

Development

npm install
npm run build
npm test
npm run dev           # stdio mode
npm run start:http    # HTTP mode on port 3000

API Reference

License

MIT

Questions fréquentes

Qu'est-ce que yandex-metrika-mcp ?

MCP server for Yandex Metrika — web analytics, counters, goals, traffic (Russia)

Comment installer yandex-metrika-mcp ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add yandex-metrika-mcp -- npx -y @theyahia/yandex-metrika-mcp@2.1.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour yandex-metrika-mcp ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

yandex-metrika-mcp est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient yandex-metrika-mcp ?

Il est publié par theYahia. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.