Google Analytics 4
ภาพรวม
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Google Analytics 4 MCP server with reporting, schema discovery, and admin visibility tools
สามเสาของ PopNx MCP
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
- เสียงผู้ใช้iยังไม่มีรีวิวรีวิวเปิดพร้อมระบบบัญชีในขั้นถัดไป
- ผลตรวจเบื้องต้นของเราiผ่าน 1 จาก 1 ข้อตรวจจากข้อมูลที่เปิดอยู่ ยังไม่ได้สแกนโค้ด
- การใช้งานiยังใหม่มาก↓ 42/สัปดาห์ · ★ –
ใช้ทำอะไรได้
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
- การเชื่อมต่อ: รันบนเครื่อง
- ช่องทาง (transport): stdio
- หมวด: การตลาดและโซเชียล
- ต้องใส่ค่าเหล่านี้: GOOGLE_APPLICATION_CREDENTIALS
ติดตั้ง
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ก่อนติดตั้ง
- ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
- รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
- ค่าที่คุณต้องใส่เอง:
GOOGLE_APPLICATION_CREDENTIALS,GA4_PROPERTY_ID
ต้องเตรียมก่อน
- npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GA4_PROPERTY_ID": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add google-analytics --env GOOGLE_APPLICATION_CREDENTIALS='ใส่ค่าของคุณ' --env GA4_PROPERTY_ID='ใส่ค่าของคุณ' -- npx -y @mindstone/mcp-server-google-analyticsเติมค่าที่เว้นว่างไว้ก่อนรัน
หรือคัดลอกค่าตั้งเอง
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"google-analytics": {
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GA4_PROPERTY_ID": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
หรือคัดลอกค่าตั้งเอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"google-analytics": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mindstone/mcp-server-google-analytics"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "ใส่ค่าของคุณ",
"GA4_PROPERTY_ID": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าที่ต้องใส่เอง
- Absolute path to ADC or service-account JSON file
GA4_PROPERTY_IDenvDefault GA4 property ID (e.g. 123456789)
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
ทำอะไรได้บ้าง
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
ผลตรวจเบื้องต้นi
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
- ✓ ผ่าน
ตัวตนผู้ทำตรงกับ repo
ชื่อใน registry ยืนยันด้วยบัญชี GitHub mindstone ซึ่งเป็นเจ้าของ repo
- … ยังไม่ตรวจ
ยังมีคนดูแล
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
- … ยังไม่ตรวจ
มีสัญญาอนุญาต (license)
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
- – ไม่เกี่ยว
endpoint ตอบ
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
- – ไม่เกี่ยว
ล็อกอินแบบ OAuth
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
- … ยังไม่ตรวจ
คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับตัวอื่นในหมวด การตลาดและโซเชียลi
- ดาวมากกว่า 0% ของอีก 3602 ตัวในหมวดนี้
- ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 23% ของอีก 3602 ตัวในหมวดนี้
- ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 3602 ตัวในหมวดนี้
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
คำถามที่พบบ่อย
Google Analytics 4 ปลอดภัยไหม?
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใช้กุญแจหรือรหัสอะไรบ้าง?
ต้องใส่ค่าเหล่านี้: GOOGLE_APPLICATION_CREDENTIALS
ตัวนี้รันบนเครื่องหรือบนคลาวด์?
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
ยังมีคนดูแลอยู่ไหม?
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.1) เข้า registry 3 เดือนที่ผ่านมา
ใช้กับโปรแกรมไหนได้บ้าง?
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
มีตัวไหนใช้แทนได้บ้าง?
ในหมวดเดียวกันมี MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer
ตัวที่ใช้แทนได้
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
Google Analytics MCP
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
BibiGPT YouTube Video Summarizer
AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.
README จากผู้ทำ
เปิดอ่าน README
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
@mindstone/mcp-server-google-analytics
Google Analytics 4 MCP server for Model Context Protocol hosts. Discover account/property structure, explore the live schema, run reports (with row-volume safety), create large asynchronous exports, and inspect admin configuration through a standardised MCP interface. With writes explicitly enabled, it can also set up and change property configuration: key events, custom dimensions and metrics, audiences, channel groups, data streams, enhanced measurement, event create and edit rules, calculated metrics, annotations, attribution, Measurement Protocol secrets, product links, and data retention.
Status
- Version: 0.2.1 · npm
- Auth: OAuth via Google ADC (
GOOGLE_APPLICATION_CREDENTIALS) - Tools: 91 (accounts, schema, reporting, admin, admin writes)
- Surface: cloud-api
- Machine-readable:
STATUS.json
Requirements
- Node.js 20+
- npm
- Google Application Default Credentials (ADC) with the
analytics.readonlyscope, or a service account JSON with access to the GA4 property - For write tools:
GA4_ALLOW_WRITES=true, credentials with theanalytics.editscope, and the Editor role on the property
One-click install
After clicking the button, your host will prompt you to fill: GOOGLE_APPLICATION_CREDENTIALS.
Manual config for Claude Desktop / Claude Code / Goose / Continue.dev (Google Analytics 4)
{
"mcpServers": { "Google Analytics 4": { "command": "npx", "args": [ "-y", "@mindstone/mcp-server-google-analytics" ], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "" } } } }
Quick Start
Install & build
cd <path-to-repo>/connectors/google-analytics
npm install npm run build
npx (once published)
npx -y @mindstone/mcp-server-google-analytics
Local
node dist/index.js
Authentication
This server uses Google Application Default Credentials (ADC). Mint ADC for a user account by installing the Google Cloud CLI and running:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/analytics.readonly \ --client-id-file=/absolute/path/to/oauth-client-secret.json
The --client-id-file is optional but strongly recommended — using your own OAuth client avoids the shared gcloud quota and gives you a stable verification footprint. You'll need a Google Cloud project with the Google Analytics Admin API and Google Analytics Data API enabled.
For service accounts, set GOOGLE_APPLICATION_CREDENTIALS to the absolute path of the service-account JSON. The service account must be granted access to the GA4 property in the GA4 Admin UI.
Enabling writes
Write tools are registered but refuse to run (WRITES_DISABLED) unless GA4_ALLOW_WRITES=true. To use them, mint ADC with the edit scope instead:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/analytics.edit \ --client-id-file=/absolute/path/to/oauth-client-secret.json
The account (or service account) also needs the Editor role on the GA4 property. Service-account credentials request the edit scope automatically when writes are enabled; user ADC keeps whatever scope it was minted with.
Configuration
Environment variables
GOOGLE_APPLICATION_CREDENTIALS— required. Absolute path to ADC or service-account JSON. Node does not expand~or%APPDATA%— provide a fully-resolved path.GA4_PROPERTY_ID— optional. Default GA4 property ID (e.g.123456789). Tools fall back to this whenproperty_idis not passed in the call.GA4_ALLOW_WRITES— optional. Set totrue(or1) to allow the write tools to change GA4 configuration. Any other value, or unset, keeps the connector read-only.
Host configuration examples
Claude Desktop / Cursor
{
"mcpServers": { "GoogleAnalytics": { "command": "npx", "args": ["-y", "@mindstone/mcp-server-google-analytics"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "/Users/you/.config/gcloud/application_default_credentials.json", "GA4_PROPERTY_ID": "123456789" } } } }
Local development (no npm publish needed)
{
"mcpServers": { "GoogleAnalytics": { "command": "node", "args": [" /connectors/google-analytics/dist/index.js"], "env": { "GOOGLE_APPLICATION_CREDENTIALS": "/absolute/path/to/credentials.json", "GA4_PROPERTY_ID": "123456789" } } } }
Tools (91)
Account & property
ga_list_account_summaries— discover available accounts and propertiesga_list_properties— flat list of GA4 properties with optional filteringga_get_property_details— currency, time zone, industry category, service level
Schema discovery
ga_get_metadata— live property schemaga_get_property_schema— same data with summary countsga_search_schema— keyword search across dimensions and metricsga_list_dimension_categories,ga_list_metric_categoriesga_get_dimensions_by_category,ga_get_metrics_by_categoryga_check_compatibility— verify dimension/metric combinations before reporting
Reporting
ga_run_report— core report with row-volume safety (estimate, opt-in to large datasets, automatic aggregation suggestions)ga_run_pivot_report— cross-tabulated reportsga_batch_run_reports— up to 5 reports in one callga_run_realtime_report— last 30 minutes of activityga_get_property_quotas_snapshot— remaining tokens / requestsga_run_funnel_report— step-by-step completion and drop-off, with optional breakdown, next action, and trended view (v1alpha)
Large exports
ga_create_report_task— start an asynchronous report task for large exports (no synchronous timeout, no row-volume gate)ga_get_report_task— poll task state untilACTIVEga_query_report_task— page task rows (up to 250,000 per page)ga_create_audience_export— snapshot the users in an audience (incl. predictive segments); charges audience-export quota tokensga_get_audience_export— poll export state untilACTIVEga_list_audience_exports— find and reuse existing exportsga_query_audience_export— page user-level rows from anACTIVEexport
Admin visibility
ga_list_audiences— audiences configured on the property, with filter clausesga_list_channel_groups— channel groups and their grouping rulesga_get_custom_dimensions_and_metricsga_list_google_ads_linksga_list_key_eventsga_list_data_streamsga_get_global_site_tag— gtag.js snippet for the first web streamga_list_bigquery_linksga_get_data_retention_settingsga_list_firebase_linksga_search_change_history_eventsga_get_enhanced_measurement_settings— automatic events on a web streamga_list_event_create_rules— rules that derive new events on a streamga_list_measurement_protocol_secrets— secret values are returned; treat as sensitivega_list_annotations— chart annotations (v1alpha)ga_get_attribution_settings— attribution model and lookback windows (v1alpha)ga_list_calculated_metrics— formula metrics (v1alpha)ga_list_event_edit_rules— rules that rename or modify events on a stream (v1alpha)ga_get_google_signals_settings(v1alpha)ga_get_data_sharing_settings— account-level
Admin writes (require GA4_ALLOW_WRITES=true)
Every write is annotated readOnlyHint: false, destructiveHint: true. Archive, delete, acknowledgement, and data-retention tools also require confirm: true. Update tools change only the fields you pass (the update mask is built from them) and fail with NOTHING_TO_UPDATE if you pass none.
- Key events:
ga_create_key_event,ga_update_key_event,ga_delete_key_event - Custom dimensions:
ga_create_custom_dimension,ga_update_custom_dimension,ga_archive_custom_dimension - Custom metrics:
ga_create_custom_metric,ga_update_custom_metric,ga_archive_custom_metric - Audiences (v1alpha):
ga_create_audience,ga_update_audience,ga_archive_audience - Channel groups (v1alpha):
ga_create_channel_group,ga_update_channel_group,ga_delete_channel_group - Event create rules (v1alpha):
ga_create_event_create_rule,ga_update_event_create_rule,ga_delete_event_create_rule - Property:
ga_create_property,ga_update_property,ga_delete_property(moves to trash for 35 days),ga_acknowledge_user_data_collection - Data streams:
ga_create_web_data_stream,ga_update_data_stream,ga_delete_data_stream - Enhanced measurement (v1alpha):
ga_update_enhanced_measurement_settings - Measurement Protocol secrets:
ga_create_measurement_protocol_secret,ga_delete_measurement_protocol_secret - Google Ads links:
ga_create_google_ads_link,ga_update_google_ads_link,ga_delete_google_ads_link - Firebase links:
ga_create_firebase_link,ga_delete_firebase_link - BigQuery links (v1alpha):
ga_create_bigquery_link,ga_update_bigquery_link,ga_delete_bigquery_link - Data retention:
ga_update_data_retention_settings - Annotations (v1alpha):
ga_create_annotation,ga_update_annotation,ga_delete_annotation - Attribution (v1alpha):
ga_update_attribution_settings - Calculated metrics (v1alpha):
ga_create_calculated_metric,ga_update_calculated_metric,ga_delete_calculated_metric - Event edit rules (v1alpha):
ga_create_event_edit_rule,ga_update_event_edit_rule,ga_delete_event_edit_rule
Explorations, saved reports, and report layouts have no Google API, so they cannot be created or changed by this connector.
Notes
- Read-only by default. Without
GA4_ALLOW_WRITES=true, the only tools that create anything arega_create_report_taskandga_create_audience_export, which materialise server-side snapshots and charge quota without modifying property configuration. The admin write tools refuse withWRITES_DISABLEDbefore any request is sent. All of these are annotatedreadOnlyHint: false,destructiveHint: true, so hosts can gate them behind explicit user approval. - Alpha endpoints. Audiences, channel groups, BigQuery lin
ตัดมาแค่ช่วงต้น อ่านต่อใน repo