yandex-metrika-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yandex-metrika-mcpShow visits for counter 12345 from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yandex-metrika-mcp
Hardened форк atomkraft/yandex-metrika-mcp. Доступ к аналитике Яндекс.Метрики из MCP-клиента (Claude Code, Cursor и другие). Только чтение — сервер отдаёт исключительно отчёты Stat API, ничего в аккаунте Метрики не меняет. Ставится через npx прямо из git.
Почему read-only и зачем форк
У Метрики есть write-операции (создание счётчиков, загрузка данных), но в этом MCP они не реализованы — только отчётные инструменты. Поэтому, в отличие от yandex-direct-mcp, здесь нет флагов «включить запись»: гейтить нечего, безопасный режим — единственный.
Что добавил форк поверх upstream:
npx-установка (
bin+ shebang) — не нужно вручную собирать и зватьnode build/index.js.Фикс бага:
get_visitsтеперь учитываетdate_from/date_to(в upstream даты игнорировались); даты прокинуты во все пресетные отчёты.Error handling: сбои возвращаются как MCP-результат с
isError: true, а не заворачиваются в обычный текст.Провенанс (NOTICE), docs/SECURITY.md, запиненное дерево зависимостей, метаданные репо.
Related MCP server: ya-metrics-mcp
Токен
Сервер авторизуется статичным OAuth-токеном в переменной YANDEX_API_KEY. Запрашивай только scope metrika:read (см. docs/SECURITY.md).
Создай приложение: платформа — веб-сервисы; redirect URI —
https://oauth.yandex.ru/verification_code; доступ — толькоmetrika:read.Скопируй ClientID приложения.
Открой ссылку
https://oauth.yandex.ru/authorize?response_type=token&client_id=<ClientID>.Скопируй токен со страницы — это значение
YANDEX_API_KEY.
Установка
Claude Code (рекомендуемо — npx из git)
claude mcp add yandex-metrika \
--env YANDEX_API_KEY=ВАШ_ТОКЕН \
-- npx -y github:nikolaymokh-dev/yandex-metrika-mcpПин на тег (после релиза):
claude mcp add yandex-metrika \
--env YANDEX_API_KEY=ВАШ_ТОКЕН \
-- npx -y github:nikolaymokh-dev/yandex-metrika-mcp#v0.1.0.mcp.json / .claude.json / Cursor
{
"mcpServers": {
"yandex-metrika": {
"command": "npx",
"args": ["-y", "github:nikolaymokh-dev/yandex-metrika-mcp"],
"env": { "YANDEX_API_KEY": "ВАШ_ТОКЕН" }
}
}
}Из локальной сборки
git clone https://github.com/nikolaymokh-dev/yandex-metrika-mcp
cd yandex-metrika-mcp && npm ci && npm run build
YANDEX_API_KEY=ВАШ_ТОКЕН node build/index.jsИнструменты (26, все read-only)
Каждый принимает counter_id; большинство — опциональные date_from/date_to (YYYY-MM-DD).
Группа | Инструменты |
Аккаунт / визиты |
|
Источники трафика |
|
Контент-аналитика |
|
Аудитория / устройства |
|
Гео |
|
Поведение / конверсии |
|
Поиск / эксперименты |
|
E-commerce |
|
Полное описание каждого инструмента (на английском) — в README_en.md.
Разработка
npm ci
npm run build # tsc → build/
npm run inspector # MCP InspectorЛицензия
MIT. Форк atomkraft/yandex-metrika-mcp (© Vadim Bezymiannyi). Изменения © 2026 nikolaymokh-dev. См. NOTICE и LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolaymokh-dev/yandex-metrika-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server