analytics-mcp
analytics-mcp
统一的 Web 分析 MCP 服务器:GA4、 Cloudflare Web Analytics、Vercel Analytics 和 Google Search Console 共用一个规范化的工具接口。 一个问题 — "上周网站表现如何?" — 在你运行的每个跟踪器中都能得到回答, 它们之间的差异会被报告出来,而不是被隐藏。
远程:StreamableHTTP + OAuth 2.1,可一键部署到 Vercel — 可从 Claude web 使用。
本地:同一服务器通过 stdio 供 Claude Code / Cursor / Desktop 使用。
状态:规范驱动的构建正在进行中。
SPEC.md包含每个文件的 实现契约和阶段门。目前尚不可用。
设计说明(简版)
本仓库中不包含任何特定于某个组织的内容。你的站点、属性和令牌都是配置 (
SITES_CONFIG+ 环境变量) — 请参阅.env.example和sites.example.json。这里的"远程"指的是你的部署和你的凭据,而不是多租户 SaaS。
每个源适配器都依据
pnpm probe捕获的真实 API 响应进行类型化 — 绝不基于猜测的结构。
许可证:MIT。
Available Tools
2 toolslist_sitesARead-only
List configured sites (id, name, bound source keys). Binding values stay server-side.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and openWorldHint=true, covering the safety profile. The description adds useful behavioral context beyond that by stating 'Binding values stay server-side', which clarifies that sensitive binding values are not included in the response.
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, compact sentence that front-loads the action and resource, then adds a valuable behavior note. Every word earns its place with no redundancy or filler.
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?
This is a simple, zero-parameter read-only list operation. The description names the output fields and clarifies a key behavior, which is sufficient given the absence of an output schema. Minor details like pagination or ordering are not addressed, but they are not clearly essential for a basic site-listing 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?
The tool has zero parameters and the schema coverage is 100%, so the schema fully handles parameter semantics. The description adds no parameter meaning, but none is needed; the baseline for a zero-parameter tool applies.
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 action ('List') and the resource ('configured sites') and even enumerates the returned fields (id, name, bound source keys). However, it does not explicitly differentiate this from its sibling 'list_sources', so the agent must rely on the tool name to distinguish them.
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 the tool is used to list sites, but it gives no guidance on when to choose this over the sibling tool 'list_sources'. No exclusions, conditions, or alternative-selection guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sourcesARead-only
List registered analytics adapters and whether their credentials are present.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already convey read-only and open-world behavior, so the description only needs to add context. It does add that the output includes credential presence, which is useful, but it does not clarify details such as whether credentials are validated or whether the list is exhaustive. The description is not contradictory to the annotations.
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, compact sentence that front-loads the core purpose and avoids filler. Every word adds meaning.
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?
For a parameterless, read-only listing tool with no output schema, the description provides sufficient context: what is listed and what aspect of those items is reported. The annotations cover the safety profile, so nothing critical is missing.
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 tool has zero parameters and the schema coverage is 100%, so there is no parameter meaning for the description to add. The baseline of 4 for a no-parameter tool 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 states a specific action ('List') and a specific resource ('registered analytics adapters') with an additional useful detail (credential presence). This clearly distinguishes it from the sibling tool list_sites, which targets a different resource type.
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 resource name makes the intended use inferable—use this when you need analytics adapters and their credential status—but the description does not explicitly contrast it with list_sites or state when not to use it. Usage guidance is implied rather than stated.
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.
2 tool updates
v0.1.0- First observed
list_sites - First observed
list_sources
TDQS
Scored across 2 tools
The two tools target distinct resources: sites (configured web properties) and sources (adapter credentials). Their descriptions clearly separate these concepts, so an agent is unlikely to confuse them.
Both tools follow the same 'list_[plural noun]' pattern, making the naming fully consistent and predictable.
With only two tools, the server feels very thin for an analytics context, aligning with the borderline category of 1-2 tools. The tools are simple list operations, but the count itself is minimal.
The server covers only read-only listing of sites and sources, with no create, update, or delete operations, nor any analytics data access. For a server named 'analytics-mcp,' this is a significant functional gap.
Maintenance
Related MCP Connectors
One MCP connector for GA4, Search Console, Google Ads, Ahrefs, a site crawler and Web Vitals.
Hosted MCP server for GA4, Google Ads and Search Console. Google OAuth, nothing to install.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Google Analytics, Search Console, Ads, CRM, Cloudflare and more for your sites, from your own AI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying Google Analytics 4 data using natural language through MCP clients like Claude and Cursor, supporting 200+ dimensions and metrics for traffic, user behavior, and e-commerce analysis.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Google Analytics 4 properties through natural language, supporting historical and real-time reports, metadata discovery, and property listing via a Vercel-deployed MCP server.263 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables natural-language, read-only analysis of your own Google Search Console and Google Analytics 4 data, including search performance, engagement, sitemap health, ranking opportunities, and deterministic SEO audits through MCP clients like ChatGPT.MIT
- AlicenseAqualityCmaintenanceUnifies Google Ads, Tag Manager, Search Console, and GA4 into a single MCP server, enabling reporting, monitoring, campaign/tag/property creation, and live mutations with dry-run safety.94Apache 2.0