mcp-analytics
mcp-analytics: веб-аналитика в чате с автоматической установкой трекера
Что умеет
- Добавлять сайты и устанавливать трекер автоматически
- Показывать сводку трафика и временные ряды
- Разбивать посещения по страницам, источникам и устройствам
- Сравнивать периоды и отслеживать пользовательские события
- Смотреть вовлечённость и данные аккаунта
Какие данные видит
Ассистент видит статистику подключённых сайтов пользователя: трафик, источники, устройства и события, без доступа к личным данным посетителей.
Нужен ли аккаунт
Не нужен: сервер работает без входа
mcp-analytics подключает веб-аналитику к ассистенту: Cursor сам ставит код отслеживания на сайт, а дальше можно спрашивать про трафик, источники и события прямо в чате. Сервер отдаёт сводки, разбивки по страницам, устройствам и языкам. Бесплатно до 100 тысяч посещений в месяц.
Как подключить
Как подключить mcp-analytics к Claude
Адрес сервера, который нужно вставить в настройках Claude:
https://mcp-analytics--mcp-analytics.run.tools
- Откройте Claude (сайт claude.ai или приложение для компьютера).
- Перейдите в Настройки → Коннекторы (в английском интерфейсе: Settings → Connectors).
- Нажмите Добавить пользовательский коннектор (Add custom connector).
- Вставьте адрес сервера, скопированный ниже, в поле URL удалённого MCP-сервера и нажмите Добавить.
- В чате нажмите + → Коннекторы и включите новый коннектор.
Пользовательские коннекторы доступны на тарифах Free, Pro, Max, Team и Enterprise. На Free можно добавить только один. В Team и Enterprise коннектор сначала добавляет владелец организации в Настройки организации → Коннекторы.
Авторизация
После нажатия Добавить откроется окно входа в сервис. Войдите под своим аккаунтом и подтвердите доступ. Пароль Claude не видит.
Как подключить mcp-analytics к ChatGPT
Адрес сервера, который нужно вставить в настройках ChatGPT:
https://mcp-analytics--mcp-analytics.run.tools
- Откройте ChatGPT в браузере (chatgpt.com). Нужен тариф Plus, Pro, Business, Enterprise или Edu.
- Один раз включите режим разработчика: Настройки → Приложения → Дополнительные настройки → Режим разработчика (Settings → Apps → Advanced settings → Developer mode).
- Откройте Настройки → Коннекторы и нажмите Создать (Create).
- Заполните форму: Название (любое), Описание (одна фраза, что делает сервис), URL MCP-сервера (скопируйте ниже).
- В поле Аутентификация выберите OAuth, если сервис требует вход, иначе Нет. Нажмите Создать.
- В новом чате откройте + → Приложения/Коннекторы и включите коннектор.
Название раздела у OpenAI менялось (Connectors → Apps/Plugins). Если пункт называется иначе, ищите «режим разработчика» в настройках. В рабочих пространствах Business/Enterprise администратор должен разрешить пользовательские коннекторы.
Авторизация
При первом использовании ChatGPT откроет окно входа в сервис. Войдите и подтвердите доступ.
Как подключить mcp-analytics к Cursor
Адрес сервера, который нужно вставить в настройках Cursor:
https://mcp-analytics--mcp-analytics.run.tools
Быстрый способ: нажмите кнопку Открыть в Cursor ниже, Cursor сам предложит добавить сервер.
Вручную:
- В Cursor откройте Settings → Cursor Settings → MCP и нажмите Add new global MCP server.
- Вставьте JSON, скопированный ниже, в открывшийся файл
~/.cursor/mcp.json(для одного проекта:.cursor/mcp.jsonв корне проекта). - Сохраните файл. Сервер появится в списке MCP; при необходимости пройдите авторизацию по кнопке рядом с ним.
Авторизация
Если сервис требует вход, рядом с сервером в списке MCP появится кнопка авторизации.
Список инструментов сервера (22)
Технические названия из tools/list. Нужны только разработчикам.
| get_started_guide | Markdown walkthrough of the mcp-analytics workflow: adding sites, installing the tracker, querying analytics, custom events. |
| list_sites | List all sites on the authenticated account. Each entry contains: site_id, domain, privacy_mode, hits_this_month (current calendar month), plan_limit, created_at. |
| add_site | Register a new site. privacy_mode cannot be changed later. |
| get_tracking_snippet | Return the HTML <script> snippet for a given site_id. |
| remove_site | Soft-delete a site. Historical events remain until TTL expires. |
| get_overview | TL;DR for the period: headline metrics (pageviews, visitors, sessions, bounce rate, avg session duration) plus pageviews_change_pct vs the previous equivalent window, top page, top traffic source, bot share, and top 3 custom events. Designed so a single call answers 'how did <period> go?' without chaining other tools. Volume metrics (pageviews / visitors / sessions / bot_share) include AI-mediated human browsing (ai_user_action — Claude/ChatGPT fetching on a user's behalf); attribution metrics (top_source) count direct browser visits only because AI-mediated traffic loses original utm/referrer tags. See traffic_class_breakdown for the per-class split. |
| get_timeseries | Time-bucketed metric over a period. pageviews/visitors/sessions include AI-mediated human browsing (ai_user_action) — see traffic_class_breakdown to see the AI-vs-direct split. |
| top_pages | Most-viewed URL paths. Counts both direct browser visits and AI-mediated human browsing (ai_user_action) — see traffic_class_breakdown if you need to separate them. |
| top_referrers | Top referring hosts. Attribution metric — counts direct browser visits only ('user' class). AI-mediated traffic (Claude/ChatGPT fetching on a user's behalf) is excluded because the AI sets its own host as referrer or strips it; including it would inflate 'direct' or 'claude.ai' without telling you where the human attention actually came from. |
| top_sources | Top UTM source/medium/campaign combinations. Attribution metric — counts direct browser visits only ('user' class). AI-mediated traffic loses original UTM tags so it would only add noise. |
| breakdown | Breakdown of visits by browser, os, device_type, or country (country empty in MVP). Volume metric — counts include AI-mediated human browsing (ai_user_action). |
| list_events | All event names with counts (includes 'pageview' and custom events). Volume metric — counts include AI-mediated human browsing (ai_user_action). |
| event_details | Details for one event. Optionally break down by a custom property. Volume metric — counts include AI-mediated human browsing (ai_user_action). |
| compare_periods | Compare a metric between two periods. Volume metric — counts include AI-mediated human browsing (ai_user_action). |
| top_user_agents | Top User-Agent strings with their traffic_class. Default analytics queries hide everything except real visitors; this tool surfaces the rest so you can see who is actually fetching the site. Pass traffic_class to filter to one bucket. The 8 classes (Phase 2 Cloudflare-compatible taxonomy): - user: real human visitor with their own browser - ai_user_action: live AI browse — a human is chatting with ChatGPT/Claude/Perplexity/Copilot and the assistant fetched the page on their behalf (counts as human attention, just AI-mediated) - ai_search: AI search-engine indexers (PerplexityBot, OAI-SearchBot, ...) — your page is a candidate answer in their index - ai_training: AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider, ...) — your content lands in training data, no human is actively reading right now - search_index: classic search engines (Googlebot, Bingbot, Yandex, DuckDuckBot, ...) - social_unfurl: link-preview / social-card bots (Slackbot, facebookexternalhit, Twitterbot, LinkedInBot, ...) - scanner: security/uptime/perf monitoring (Censys, Pingdom, Lighthouse, headless Chrome from a cloud range, ...) - bot_other: recognized as a bot but not in any specific bucket, OR a UA we caught spoofing (e.g. a fake "GPTBot" coming from a random EC2 IP) The `humans` filter alias expands to (user, ai_user_action) — useful for "real human attention including AI-mediated". |
| traffic_class_breakdown | Hit counts and percentages by traffic_class for the period. Sorted by hits descending. Classes with zero hits are omitted (a missing class means no hits in that period, treat as zero). The 8 classes (Phase 2 Cloudflare-compatible taxonomy): - user: real human visitor with their own browser - ai_user_action: live AI browse — a human is chatting with ChatGPT/Claude/Perplexity/Copilot and the assistant fetched the page on their behalf. Counts as human attention, just AI-mediated. - ai_search: AI search-engine indexers (PerplexityBot, OAI-SearchBot) — your page is a candidate answer in their index - ai_training: AI training crawlers (GPTBot, ClaudeBot, CCBot, Bytespider) — your content lands in training data, no human is actively reading right now - search_index: classic search engines (Googlebot, Bingbot, Yandex, DuckDuckBot) - social_unfurl: link-preview / social-card bots (Slackbot, facebookexternalhit, Twitterbot, LinkedInBot) - scanner: security/uptime/perf monitoring (Censys, Pingdom, Lighthouse, headless Chrome from a cloud range) - bot_other: recognized as a bot but not in any specific bucket, OR a UA we caught spoofing (e.g. a fake "GPTBot" coming from a random EC2 IP) For "how much human traffic did I get?" sum hits where traffic_class is 'user' or 'ai_user_action'. The same union is also exposed as the 'humans' alias in top_user_agents' traffic_class filter. Note on consistency: get_overview's `bot_share` field uses the same human/non-human split (excludes user + ai_user_action), so the two tools agree on what counts as bot traffic. Note on history: rows from before Phase 2 deployed were reclassified by User-Agent only (we don't store IPs for privacy), so older data may under-report scanner-via-cloud-IP and over-attribute spoofed UAs. |
| top_timezones | Top IANA timezones (Europe/Berlin, America/New_York, ...) of visitors. Quasi-geo signal without IP-based lookups — captured client-side via Intl.DateTimeFormat. |
| top_languages | Top browser languages (de-DE, en-US, ...) of visitors. From navigator.language. |
| color_scheme_breakdown | Share of visitors with prefers-color-scheme: dark vs light. Useful for product decisions ('should we default to dark mode?'). |
| viewport_breakdown | Pageviews bucketed by viewport width: mobile_xs (<480), mobile (<768), tablet (<1024), desktop (<1440), desktop_xl (≥1440). Real usable viewport, not screen resolution. |
| engagement_overview | Real reading time + scroll depth from the engagement beacon (fired on pagehide). Returns engaged_pages count, avg/median/p90 engagement seconds, and avg/median scroll-depth percentage. Better signal than session duration which counts inactive tabs. |
| get_account | Account info — email, current plan, total active sites, total_hits_this_month (across all sites), plan_limit, and api_token_first_chars (first 10 chars of the legacy API token, for identification only — not enough to authenticate). |