Yandex Metrica MCP
Yandex Metrica web analytics in chat: counters, goals, traffic sources and conversions
Yandex Metrica MCP is a free MCP server for analytics and data. It runs locally on your machine and is started by your AI client.
- Pricing
- Free
- Platforms
- CLI
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Version
- 1.5.6
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metricaAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-yandex-metrica": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-metrica"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-yandex-metrica": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-metrica"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-yandex-metrica": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-metrica"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-yandex-metrica": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-yandex-metrica"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metricaOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-yandex-metrica]
command = "npx"
args = ["-y", "mcp-yandex-metrica"]
env = { YANDEX_METRIKA_TOKEN = "<YANDEX_METRIKA_TOKEN>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-yandex-metrica": {
"command": "npx",
"args": [
"-y",
"mcp-yandex-metrica"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Or run: gemini mcp add -s user -e YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' mcp-yandex-metrica npx -- -y mcp-yandex-metrica
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-yandex-metrica": { "command": "npx", "args": [ "-y", "mcp-yandex-metrica" ], "env": { "YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
YANDEX_METRIKA_TOKENYandex Metrica OAuth token (scope metrika:read) — read access to analytics data. Treat it as a secret. Optional: without it the server starts anyway and connects through the in-chat login (start_login / finish_login).YANDEX_METRIKA_OAUTH_CLIENT_IDClientID of your own Yandex OAuth app for the in-chat login. Defaults to the Ask Ads app scoped to metrika:read.YANDEX_METRIKA_COUNTER_IDDefault Metrica counter id, used when a tool call omits counterId.YANDEX_METRIKA_LANGLanguage for API responses (ru, en, ...).YANDEX_METRIKA_API_BASEAPI root host. Override only for a proxy or a non-default endpoint.YANDEX_METRIKA_TIMEOUT_MSPer-request timeout in milliseconds.YANDEX_METRIKA_MAX_RETRIESMax retries for transient errors (429 rate limit, 5xx on reads).
About Yandex Metrica MCP
Everything is read-oriented. The server finds the counters your Yandex account can see, lists their goals and builds reports on visits, users, page views, bounce rate, visit duration, sources, devices and goal completions for a chosen period. Reports include totals and a sampling flag, and the server notes when a large result hits a limit, so numbers are not silently trimmed.
Connection starts in the conversation: you ask to connect, open a Yandex OAuth link, approve and paste back a code valid for 10 minutes, protected by PKCE. The token is saved in a user-only file locally and disconnecting deletes only that file. A general API request tool exists, where POST and DELETE require confirmWrite=true.
The README is in Russian and lists eight tools. It needs Node.js 20 or newer and can also take a token or default counter ID from environment variables.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 2 tools changes data; 1 name doesn't say.
From the server's own tool labels and tool names; not verified by us.
- start_loginName suggests: changes
- Starts the in-chat Yandex sign-in.
- finish_login
- Finishes sign-in with the code from Yandex.
What it does
- Counter and goal listing
- Finds the counters and goals available to your account.
- Traffic reports
- Visits, users, views, bounces and duration by period.
- Source and device breakdowns
- Splits traffic by source and device.
- Sampling awareness
- Reports totals and whether data was sampled.
- In-chat login
- Yandex OAuth with PKCE inside the conversation.
Good for
- See last week's visits, users and bounces
- Rank traffic sources by visits
- Measure conversion for a named goal
- Check which counters you can access
Pricing
Free
Free to install from npm
Yandex Metrica MCP FAQ
Do I need a token first?
No. You can connect from chat, or provide YANDEX_METRIKA_TOKEN.
Can Yandex Metrica MCP change my Metrica data?
Normal tools only read. The raw request tool can write only with confirmWrite=true.
How many tools are there?
Eight, per the README.
Is Yandex Metrica MCP free?
Yes. Yandex Metrica MCP is free to use.
How do I add Yandex Metrica MCP to Claude Code?
Run this command in your terminal: claude mcp add mcp-yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y mcp-yandex-metrica
What are the best alternatives to Yandex Metrica MCP?
The closest alternatives to Yandex Metrica MCP are Agent-Native Analytics, dashboard-icons, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP and Pitot.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

