yandex-direct-metrica-mcp
An MCP server for Yandex Direct, Metrica, Wordstat and Audience analytics: raw reports, data joins and an HTML dashboard
Install
python3 scripts/setup.pyInteractive wizard inside a repository clone.
This is third-party code. Review the repository files before installing.
What it does
The server gives an agent two tool layers. Low-level calls return near-raw data from the Direct, Metrica, Wordstat, Audience and Search APIs. High-level tools help with common reports, join Direct spend with Metrica visits via UTM and yclid, suggest keywords and build a self-contained HTML and JSON dashboard, including across several accounts. The public build is read-only and does not change campaigns, goals or segments.
Who it is for. For marketers, analysts and agencies who need reports across several Yandex ad accounts through an agent.
Good fit when
- You need a spend and conversion dashboard across all accounts for a month
- You need to link Direct spend to Metrica visits and goals
- You need raw data for your own analysis without risking campaign changes
Not a fit when
- You need to create or edit campaigns: the public version is read-only
- You have no Docker and do not want to build an image
Example request
Generate a dashboard for all accounts for the last 30 days up to yesterday and give me the HTML pathLimitations
Requires Direct and Metrica OAuth tokens, plus separate credentials for Audience and Wordstat. The main way to run it is Docker with a state folder and accounts.json. BI data sync is in a paid private plugin. Today's data is usually incomplete, so the author suggests ending periods yesterday.
How to disable. Remove the server with claude mcp remove yandex-direct-metrica-mcp and delete the state folder with .env.
MCP
- Transport
- stdio
- Authentication
- OAuth
| Environment variables | |
|---|---|
| YANDEX_ACCESS_TOKEN required, secret | Direct and Metrica OAuth token, or YANDEX_REFRESH_TOKEN |
| MCP_ACCOUNTS_FILE | Path to accounts.json listing accounts |
| MCP_CONTENT_MODE | json for raw data analysis |
Security check
- Uses ad account OAuth tokens
- The public build only reads data but exports it to local files
README in short
The README offers a setup wizard for Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode and Gemini CLI plus a manual Docker path using a GHCR image. It explains what read-only mode allows, describes two tool layers and a paid BI plugin. Environment variables are listed, and Russian docs are on the project site. Apache 2.0 licensed.
FAQ
What does read-only mean?
The server does not create, change or delete campaigns, goals or segments. Wordstat report requests and Metrica Logs API exports are still allowed.
Can I manage several clients?
Yes, list accounts in accounts.json with Direct login and Metrica counters, and the dashboard covers all of them.
Related
A Claude Code plugin for SEO audits: technical SEO, E-E-A-T, schema, local and AI search via parallel subagents
A Claude Code skill set for auditing sites for AI search: citability, AI crawler access, llms.txt, schema and reports
The experimental official Google Analytics 4 MCP server: reports, funnels and realtime data on request
Google Search Console MCP
Google Search Console MCP Server for SEOs
An MCP server for Google Search Console: queries and pages with clicks and positions, URL indexing checks, sitemaps and ready SEO skills