Yandex Metrika MCP
MCP server for Yandex.Metrica API providing 15 tools for managing counters, goals, reports, logs, traffic sources, and top pages with OAuth Bearer token authentication.
README
@theyahia/yandex-metrika-mcp
MCP server for Yandex.Metrica API — counters, goals, reports, logs, traffic sources, top pages. 15 tools, OAuth Bearer token auth.
Part of the Russian API MCP series by @theYahia.
Getting a Token
- Go to oauth.yandex.ru
- Create an app (or use an existing one)
- Under Platforms, select "Web services"
- Under Access, add:
Yandex.Metrica->Read statistics and counter parameters - Get the OAuth token:
https://oauth.yandex.ru/authorize?response_type=token&client_id=YOUR_CLIENT_ID - Copy the token from the redirect URL (
access_token=...)
Installation
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"yandex-metrika": {
"command": "npx",
"args": ["-y", "@theyahia/yandex-metrika-mcp"],
"env": {
"YANDEX_METRIKA_TOKEN": "your_token"
}
}
}
}
Claude Code
claude mcp add yandex-metrika -e YANDEX_METRIKA_TOKEN=your_token -- npx -y @theyahia/yandex-metrika-mcp
Streamable HTTP (remote / multi-client)
YANDEX_METRIKA_TOKEN=your_token npx @theyahia/yandex-metrika-mcp --http --port=3000
Endpoint: POST http://localhost:3000/mcp
Health check: GET http://localhost:3000/health
Smithery
Use smithery.yaml from the repository. Requires YANDEX_METRIKA_TOKEN.
Environment Variables
| Variable | Required | Description |
|---|---|---|
YANDEX_METRIKA_TOKEN |
Yes | OAuth 2.0 Bearer token from Yandex OAuth |
Tools (15)
Management — Counters
| Tool | Description |
|---|---|
list_counters |
List all counters. Filter by name/URL with search_string. |
get_counter |
Get full details of a single counter by ID. |
create_counter |
Create a new counter for a website. |
update_counter |
Update counter name or site URL. |
delete_counter |
Permanently delete a counter (irreversible). |
Management — Goals
| Tool | Description |
|---|---|
list_goals |
List all goals for a counter. |
create_goal |
Create a goal (url, number, step, action types). |
delete_goal |
Delete a goal from a counter. |
Management — Logs
| Tool | Description |
|---|---|
export_logs |
Export raw visit/hit logs via the Logs API. |
Reporting API
| Tool | Description |
|---|---|
get_report |
Flexible reporting — any metrics + dimensions + filters + sort. |
get_report_comparison |
Compare two date periods (A vs B). |
get_report_drilldown |
Hierarchical drill-down into report dimensions. |
Convenience Wrappers
| Tool | Description |
|---|---|
get_traffic_summary |
Quick overview: visits, pageviews, users, bounce rate, avg duration. |
get_traffic_sources |
Traffic sources breakdown by channel. |
get_top_pages |
Top pages by pageviews with performance metrics. |
Demo Prompts
Show me all my Yandex.Metrica counters
Compare last week's traffic to the previous week for counter 12345678
What are the top 10 pages on my site this month, sorted by pageviews?
Development
npm install
npm run build
npm test
npm run dev # stdio mode
npm run start:http # HTTP mode on port 3000
API Reference
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。