Google Analytics MCP Server
Google Analytics MCP
Локальный MCP-сервер для Google Analytics 4. Оборачивает API данных GA4 в инструменты, ориентированные на отчетность по SEO и платным каналам.
Инструменты
Инструмент | Назначение |
| SEO: сеансы/пользователи/вовлеченность/конверсии из органического поиска по целевой странице, источнику, стране или устройству |
| Платный трафик: сеансы/конверсии/стоимость/CPC по кампании, целевой странице, ключевому слову или источнику |
| Платный трафик: все платные каналы (поиск + соцсети + видео + медийная реклама) со стоимостью и ROAS |
| Платный трафик: кампания Google Ads × группа объявлений × ключевое слово (требуется связь GA4 ↔ Google Ads) |
| Лучшие целевые страницы по сеансам/вовлеченности/конверсиям (опциональный фильтр по каналу) |
| Сводка по группам каналов по умолчанию |
| Разбивка по кампании × источнику × каналу |
| Конверсии и ключевые события по источнику/каналу/группе каналов |
| Активные пользователи за последние 30 минут |
| Гибкий инструмент — любые измерения + показатели |
Настройка
git clone https://github.com/ZLeventer/google-analytics-mcp-server.git
cd google-analytics-mcp-server
npm install
npm run buildУчетные данные
Скопируйте .env.example в .env и заполните:
GA4_PROPERTY_ID— числовой идентификатор ресурса из GA4: Администратор → Настройки ресурса (например,123456789). Не идентификатор потока данных (G-XXXXXXX).GOOGLE_APPLICATION_CREDENTIALS— абсолютный путь к JSON-файлу ключа сервисного аккаунта.
Создание сервисного аккаунта
Перейдите в console.cloud.google.com → выберите/создайте проект
API и сервисы → Библиотека → включите Google Analytics Data API
IAM и администрирование → Сервисные аккаунты → Создать сервисный аккаунт (назовите его
ga4-mcpили аналогично)Для созданного аккаунта → Ключи → Добавить ключ → Создать новый ключ → JSON → скачайте
Сохраните JSON как
service-account.jsonв этой директории (уже в.gitignore)В GA4 → Администратор → Управление доступом к ресурсу, нажмите + → вставьте email сервисного аккаунта (
ga4-mcp@project-id.iam.gserviceaccount.com) → назначьте роль Читатель
Google SDK автоматически считывает GOOGLE_APPLICATION_CREDENTIALS — изменения в коде не требуются.
Установка в Claude Code
claude mcp add google-analytics \
--env-file "/absolute/path/to/google-analytics-mcp-server/.env" \
-- node "/absolute/path/to/google-analytics-mcp-server/dist/index.js"Или добавьте вручную в ~/.claude.json:
{
"mcpServers": {
"google-analytics": {
"command": "node",
"args": ["/absolute/path/to/google-analytics-mcp-server/dist/index.js"],
"env": {
"GA4_PROPERTY_ID": "123456789",
"GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/google-analytics-mcp-server/service-account.json"
}
}
}
}После установки перезапустите Claude Code.
Форматы даты
Все аргументы даты принимают форматы GA4:
YYYY-MM-DD(например,2026-04-01)NdaysAgo(например,28daysAgo,90daysAgo)yesterday,today
Значения по умолчанию: 28daysAgo → yesterday.
Проверка
После настройки учетных данных:
node -e '
import("./dist/tools/reports.js").then(m =>
m.channelPerformance({ start_date: "7daysAgo", end_date: "yesterday", limit: 10 })
).then(r => console.log(JSON.stringify(r, null, 2)))
'Если команда возвращает строки, значит всё работает. Ожидаемые ошибки:
GA4_PROPERTY_ID is not set— проверьте.envPERMISSION_DENIED— сервисному аккаунту не предоставлена роль «Читатель» для ресурса403 Google Analytics Data API has not been used— включите API в проекте GCP
Дорожная карта
[ ] Инструменты Admin API (список пользовательских измерений, событий конверсии, аудиторий) по мере необходимости
[ ] Search Console MCP как вспомогательный сервер для данных о ранжировании / показах / CTR (дополняет этот сервер)
[ ] Интеграция с Demandbase MCP для объединения трафика GA4 с фирмографическими данными (атрибуция на уровне аккаунта)
Available Tools
10 toolsga4_all_paid_performanceA
Paid: all paid channels (Search + Social + Video + Display + Other) broken down by channel × campaign × source × medium, with cost and ROAS.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not confirm it is read-only or non-destructive. For a reporting tool, this is a gap; it should at least indicate it only reads data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with key information, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema; description mentions cost and ROAS and dimensions, but lacks full metric list, pagination behavior, or any mention of row limits. Adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 4 parameters are fully described in the input schema (100% coverage). The description adds no additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns paid channel performance broken down by channel, campaign, source, and medium with cost and ROAS. It differentiates from siblings like ga4_paid_search_performance which only covers search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies it's for all paid channels but doesn't explicitly state when to use this versus other sibling tools like ga4_channel_performance or ga4_google_ads_performance. Guidance is implicit but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_campaign_performanceB
Campaign × source × medium breakdown with sessions/conversions/revenue. Optional channel filter.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return | |
| channel | No | Optional sessionDefaultChannelGroup filter, e.g. 'Paid Search' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, rate limits, data freshness, or side effects. The transmission of query parameters implies a read operation, but the agent must infer this.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise (one sentence) with no unnecessary words. However, it could be more structured by listing dimensions and metrics separately for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and the tool's complexity (multiple dimensions and metrics), the description is insufficient. It does not explain the output format or how the breakdown is structured, leaving the agent to infer from the tool name.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds minimal value: it mentions 'Optional channel filter', which corresponds to the channel parameter, but does not elaborate on other parameters or their relationships.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the dimensions (campaign, source, medium) and metrics (sessions, conversions, revenue), with an optional channel filter. This distinguishes it from sibling tools like ga4_channel_performance or ga4_paid_search_performance, which focus on specific breakdowns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Optional channel filter' hints at usage but does not explicitly state when to prefer this tool over alternatives. No guidance on when to use this vs. other GA4 performance tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_channel_performanceB
Default channel group rollup: sessions/users/conversions/revenue for Organic Search, Paid Search, Email, Direct, Referral, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description mentions 'rollup' but fails to disclose behavioral traits such as default grouping definition, permission requirements, read-only nature, or return format. Minimal transparency for a data-retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, concise and to the point. However, it could be structured with bullet points for clarity, but it's not verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description only lists metrics without explaining the response structure, pagination, or error behavior. Given the lack of annotations and output schema, the description is incomplete for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema's parameter descriptions (start_date, end_date, property_id, limit). It does not elaborate on how these parameters affect the rollup.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns a default channel group rollup with specific metrics (sessions, users, conversions, revenue) for channels like Organic Search, Paid Search, etc., distinguishing it from sibling tools that focus on specific channels or campaigns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives such as ga4_paid_search_performance or ga4_campaign_performance. The description implies an overview purpose but lacks when-to-use or when-not-to-use advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_conversions_by_sourceB
Conversions and key events broken down by session source × medium × channel group. Sorted by key events desc.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states the output and sorting, but does not mention idempotency, auth needs, rate limits, or data freshness. The agent cannot infer safety or operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences. The first sentence delivers the key purpose upfront, and the second adds sorting detail. No superfluous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool returns a report but has no output schema. The description gives a high-level idea of the output dimensions but lacks specifics like response format, column names, or whether it includes date range. Given the complexity of GA4 reports, this is mildly insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The description adds no additional parameter details (e.g., meaning of 'key events', date range constraints). Baseline score of 3 is appropriate as the description does not improve parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: it breaks down conversions and key events by session source, medium, and channel group, and sorts by key events descending. This distinguishes it from sibling tools that focus on specific channels or campaigns (e.g., ga4_channel_performance, ga4_campaign_performance).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide guidance on when to use this tool versus alternatives. It lacks explicit context about when this breakdown is appropriate or when to prefer sibling tools like ga4_all_paid_performance or ga4_organic_search_performance. No when-not or prerequisite info is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_google_ads_performanceA
Paid: Google Ads campaign × ad group × keyword performance (impressions, clicks, cost, CPC, conversions, ROAS). Requires Google Ads ↔ GA4 link.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description should compensate. It discloses the prerequisite (GA4 link) but does not state that the tool is read-only, has rate limits, or other behavioral traits. The term 'performance' implies non-destructive, but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence plus a requirement line. Front-loaded with key identifier 'Paid: Google Ads...' and metric list. No superfluous words; every part adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers what data is returned and the prerequisite, but does not mention default sorting, pagination behavior, or what happens when limit is reached. Given no output schema, description could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description does not add additional parameter meaning beyond what is already in the schema. Parameters are adequately described in schema, but no extra context provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it returns paid Google Ads performance data at campaign × ad group × keyword granularity, with specific metrics listed. Distinguishes from siblings like ga4_campaign_performance and ga4_paid_search_performance by specifying 'Google Ads' and the precise dimensions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Mentions prerequisite 'Requires Google Ads ↔ GA4 link' but does not explicitly guide when to use this over siblings such as ga4_all_paid_performance or ga4_paid_search_performance. Usage context is implied but not directly addressed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_landing_page_performanceA
Top landing pages by sessions/engagement/conversions. Optional channel filter (e.g. 'Organic Search', 'Paid Search').
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return | |
| channel | No | Optional sessionDefaultChannelGroup filter, e.g. 'Organic Search', 'Paid Search' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It states the tool returns top landing pages by specified metrics and mentions an optional filter. However, it does not disclose whether data is historical, any rate limits, permission needs, or response format. The schema covers parameters, but the description adds limited behavioral context beyond its core function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence followed by a parenthetical example. It is front-loaded with the core purpose ('Top landing pages by sessions/engagement/conversions') and wastes no words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description hints at the return type (top landing pages with metrics) but does not specify exact columns or ranking details. For a simple listing tool, it is largely complete, but could be slightly improved by noting it returns a ranked list.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description reiterates the channel filter with examples, adding minimal new information beyond the schema's parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns top landing pages with key metrics (sessions, engagement, conversions) and mentions an optional channel filter. This effectively distinguishes it from sibling tools that focus on other dimensions like campaigns or channels.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for landing page analysis with optional channel filtering but provides no explicit guidance on when to use this tool versus alternatives like ga4_channel_performance or ga4_campaign_performance, given the sibling list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_organic_search_performanceA
SEO: sessions/users/engagement/conversions for Organic Search traffic, broken down by landing page (default), source, country, or device.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return | |
| breakdown | No | Dimension to break organic traffic down by | landingPage |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It describes what data is returned (metrics and breakdowns) but does not disclose behavioral traits such as rate limits, authentication requirements, or data freshness. For a reporting tool, it is adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence front-loaded with key information: tool purpose, metrics, and breakdown options. No wasted words; efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the schema fully describes parameters and no output schema is provided, the description sufficiently tells what the tool returns and how to break down the data. It is complete for a straightforward reporting tool with good sibling context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of parameters with descriptions, but the description adds value by explaining the breakdown options and metrics in context. It clarifies that the default breakdown is landing page and lists the available dimensions, going beyond the schema's technical descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool is for Organic Search traffic, listing key metrics (sessions, users, engagement, conversions) and breakdown dimensions. It uses 'SEO' as a prefix and 'Organic Search' to distinguish from paid or channel-specific tools among siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for organic search performance analysis, but lacks explicit guidance on when to use vs alternatives like paid search or campaign tools. Sibling names provide context, but no direct exclusions or preconditions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_paid_search_performanceB
Paid: sessions/conversions/cost/CPC for Paid Search traffic, broken down by campaign (default), landing page, keyword, or source.
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return | |
| breakdown | No | Dimension to break paid search traffic down by | sessionCampaignName |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and description does not mention behavioral traits like read-only nature, rate limits, or side effects. The tool is likely read-only but this is not stated, leaving the agent uninformed about safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, front-loaded sentence with no extra words. All key information (subject, metrics, breakdown options) is included efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Description covers the essential return values (sessions, conversions, cost, CPC) and breakdown dimension, but does not specify row structure or pagination. Given no output schema, this is reasonably complete for a simple report tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description mentions breakdown dimensions but these are already fully documented in the schema's enum and parameter descriptions, adding minimal extra meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the tool returns metrics (sessions, conversions, cost, CPC) for Paid Search traffic, with breakdown options. It distinguishes itself by explicitly targeting Paid Search, differentiating from sibling tools like ga4_organic_search_performance.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives such as ga4_all_paid_performance or ga4_google_ads_performance. Description lacks any usage conditions or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_realtime_active_usersB
Current active users (last 30 min) broken down by screen/page, country, device, or audience.
| Name | Required | Description | Default |
|---|---|---|---|
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| breakdown | No | Dimension to break active users down by | unifiedScreenName |
| limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It states the time window (last 30 min) and breakdown options, but does not disclose output format, authentication needs, rate limits, or that it returns only one metric. Adequate but lacking depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single 18-word sentence that conveys the core functionality efficiently. No unnecessary words, but could be slightly front-loaded with the action verb.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description does not explain the return format (e.g., list of dimension-value pairs with count), nor does it contextualize the tool among siblings for realtime vs historical data. Given no output schema, more detail is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67% (property_id and breakdown described, limit not). The description adds value by explaining the breakdown concept and listing example dimensions, but does not detail property_id's override behavior or the limit parameter's purpose. Partially compensates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves current active users in the last 30 minutes, with explicit breakdown options (screen/page, country, device, or audience). This distinguishes it from sibling tools that focus on historical performance reports.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like ga4_run_report or ga4_channel_performance. It does not mention that this is for realtime data while others cover longer time ranges.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ga4_run_reportA
Flexible GA4 Data API runReport. Pass any dimensions + metrics. Use for custom reports the preset tools don't cover.
| Name | Required | Description | Default |
|---|---|---|---|
| dimensions | Yes | GA4 dimension API names, e.g. ['sessionSource','sessionMedium','landingPage'] | |
| metrics | Yes | GA4 metric API names, e.g. ['sessions','totalUsers','conversions'] | |
| start_date | No | Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today | 28daysAgo |
| end_date | No | End date: YYYY-MM-DD, NdaysAgo, yesterday, or today | yesterday |
| property_id | No | Override GA4_PROPERTY_ID env var for this call | |
| limit | No | Max rows to return | |
| dimension_filter | No | Optional string filter: 'dimensionName=value' (exact) or 'dimensionName~regex' | |
| order_by | No | Metric or dimension to sort by, prefix with '-' for desc. Default: first metric desc |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must fully disclose behavioral traits. It only states 'Flexible GA4 Data API runReport' and 'Pass any dimensions + metrics', lacking details on rate limits, data freshness, or whether the operation is read-only. The minimal description does not adequately cover behavioral aspects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loading the key purpose ('Flexible GA4 Data API runReport') and immediately stating usage context. Every sentence is necessary and concise, with no extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of 8 parameters, no output schema, and no annotations, the description is too minimal. It does not explain return format, error handling, or limitations (e.g., maximum rows). For a flexible API tool, the agent needs more context to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all 8 parameters. The description adds no new semantic value beyond the schema's existing parameter descriptions, such as the examples and default values. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool is for flexible GA4 Data API runReport, specifying it handles arbitrary dimensions and metrics. It explicitly distinguishes from sibling preset tools by stating 'Use for custom reports the preset tools don't cover.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear guidance on when to use this tool ('custom reports the preset tools don't cover'), implying it should not be used when preset tools suffice. However, it does not explicitly list or exclude alternative sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
10 tool updates
v0.1.0- First observed
ga4_all_paid_performance - First observed
ga4_campaign_performance - First observed
ga4_channel_performance - First observed
ga4_conversions_by_source - First observed
ga4_google_ads_performance - First observed
ga4_landing_page_performance - First observed
ga4_organic_search_performance - First observed
ga4_paid_search_performance - First observed
ga4_realtime_active_users - First observed
ga4_run_report
TDQS
Each tool targets a distinct area of GA4 data: all paid, specific channels, campaigns, conversions, landing pages, organic/paid search, realtime, and a generic report. No two tools have overlapping purposes that would cause confusion.
All tool names consistently follow the 'ga4_<descriptive_name>' format using snake_case. The naming pattern is predictable and uniform across the entire set.
10 tools is well within the ideal 3-15 range for a focused analytics server. Each tool serves a clear purpose, and the count feels neither excessive nor insufficient for covering core GA4 queries.
The set covers acquisition, behavior, conversions, and realtime analytics well. Minor gaps exist (e.g., user demographics, event details), but the flexible ga4_run_report tool allows agents to fill these gaps for custom reports.
Related MCP Connectors
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
- CalmSEOOAuthcom.calmseo
SEO MCP server for keyword research, SERP analysis, audits, and Search Console workflows.
Google Ads, Meta Ads & GA4 MCP server - 250+ tools for campaigns, creatives, audiences & reports.
Google Ads MCP server — manage campaigns, keywords, and metrics.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/ZLeventer/google-analytics-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server