Yandex Metrika MCP
MCP server for Yandex Metrika counters, traffic reports and custom stat queries
- Pricing
- Open source
- Platforms
- CLI
- Runs
- Locally
- Version
- 2.3.0
- Listing updated
- today
Similar MCP servers
About Yandex Metrika MCP
Yandex Metrika MCP is an open-source MCP server for analytics and data. It runs locally on your machine and is started by your AI client.
Twelve tools split into five management tools, six ready-made reports and one free-form report. The ready-made ones return traffic summaries, sources, geography, devices, popular pages and search phrases for a counter, defaulting to the last 30 days. get-report passes arbitrary metrics, dimensions, filters and sorting straight to the Metrika Stat API.
Two tools write: create-counter and delete-counter need the metrika:write OAuth scope and fail with a 403 naming the missing scope otherwise. The default auth helper requests both read and write scopes; you can ask for read only with YANDEX_METRIKA_SCOPE. delete-counter is irreversible, so it also needs confirm: true, and without it nothing is sent to the API.
The server limits itself to 3 parallel requests and 200 report attempts per five-minute window, retrying 420, 429 and 5xx responses up to three times. Large reports may be sampled, and responses then say so. The package is not on the npm scope yet, so run it from source.
Install
Run in a terminal
claude mcp add yandex-metrika-mcp --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y @stufently/yandex-metrika-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"yandex-metrika-mcp": {
"command": "npx",
"args": [
"-y",
"@stufently/yandex-metrika-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"yandex-metrika-mcp": {
"command": "npx",
"args": [
"-y",
"@stufently/yandex-metrika-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"yandex-metrika-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@stufently/yandex-metrika-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"yandex-metrika-mcp": {
"command": "npx",
"args": [
"-y",
"@stufently/yandex-metrika-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"yandex-metrika-mcp": {
"command": "npx",
"args": [
"-y",
"@stufently/yandex-metrika-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
YANDEX_METRIKA_TOKENOAuth token for Yandex Metrika (metrika:read; metrika:write for counter tools)Required
Tools this server provides (12)
Taken from the project documentation; the running server may differ.
- get-counters
- Lists all Metrika counters
- get-counter
- Gets details for one counter
- get-goals
- Gets goals for a counter
- create-counter
- Creates a new counter; needs metrika:write
- delete-counter
- Deletes a counter irreversibly; needs confirm and metrika:write
- get-traffic-summary
- Visits, users, pageviews, bounce rate and average duration
- get-traffic-sources
- Traffic breakdown by source
- get-geography
- Traffic breakdown by country and city
- get-devices
- Traffic breakdown by device, browser or OS
- get-popular-pages
- Most visited pages
- get-search-phrases
- Top search phrases driving traffic
- get-report
- Custom report with chosen metrics and dimensions
What it does
- Ready-made reports
- Traffic summary, sources, geography, devices, popular pages and search phrases.
- Custom reports
- `get-report` accepts any metrics, dimensions, filters and sort.
- Counter management
- List, inspect and create counters and read their goals.
- Guarded deletion
- `delete-counter` needs `confirm: true` and the write scope.
- Built-in rate limiting
- 3 parallel requests and 200 report attempts per five minutes, with retries.
- OAuth helper
- An `auth` command opens Yandex OAuth and returns a token.
Good for
- Summarize a site's visits, users and bounce rate for a date range
- See which pages and search phrases drive traffic
- Break traffic down by country, device or browser
- Create a Metrika counter for a new site
- Run a custom Stat API query with filters
Pricing
Open source
MIT licensed
Yandex Metrika MCP FAQ
Which scopes does it need?
`metrika:read` covers the ten read tools; `create-counter` and `delete-counter` also need `metrika:write`.
Can it delete a counter by accident?
`delete-counter` refuses unless called with a literal `confirm: true`.
What is the default date range?
The last 30 days when no dates are given.
Is data sampled?
The Stat API may sample large datasets, and responses include a note when it does.
How do I get a token?
Run the `auth` command, which opens Yandex OAuth, then set `YANDEX_METRIKA_TOKEN`.
Is Yandex Metrika MCP free?
Yes. Yandex Metrika MCP is open source, so you can use and self-host it for free.
How do I add Yandex Metrika MCP to Claude Code?
Run this command in your terminal: claude mcp add yandex-metrika-mcp --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y @stufently/yandex-metrika-mcp
What are the best alternatives to Yandex Metrika MCP?
The closest alternatives to Yandex Metrika MCP are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, dashboard-icons, Tapetide - Indian Stock Market MCP and World Monitor.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

