MCP server for Yandex Metrica — query your web analytics in plain language from Claude, Cursor, and other AI agents. Secretless one-command login (PKCE), read-only, TypeScript.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y yandex-metrica-mcp~/.codex/config.toml
[mcp_servers.yandex-metrica]
command = "npx"
args = ["-y", "yandex-metrica-mcp"]
env = { YANDEX_METRIKA_TOKEN = "<YANDEX_METRIKA_TOKEN>" }
# codex mcp add yandex-metrica --env YANDEX_METRIKA_TOKEN='<YANDEX_METRIKA_TOKEN>' -- npx -y yandex-metrica-mcp~/.cursor/mcp.json
{
"mcpServers": {
"yandex-metrica": {
"command": "npx",
"args": [
"-y",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"yandex-metrica": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"yandex-metrica": {
"command": "npx",
"args": [
"-y",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"yandex-metrica": {
"command": "npx",
"args": [
"-y",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"yandex-metrica": {
"command": "npx",
"args": [
"-y",
"yandex-metrica-mcp"
],
"env": {
"YANDEX_METRIKA_TOKEN": "<YANDEX_METRIKA_TOKEN>"
}
}
}
}Environment variables
YANDEX_METRIKA_TOKEN
Replace the placeholders with your own credentials and keep them out of version control.