GA4 MCP Server

Ask Claude Code, Cursor, or Claude Desktop how your apps are doing. Plask exposes your Google Analytics 4 data through the Model Context Protocol — no dashboard tab required.

Free planRead-onlyStreamable HTTP6 tools

What it does

MCP (Model Context Protocol) is the open standard AI assistants use to call external tools. The Plask MCP server is a remote endpoint at https://plask.dev/api/mcp that any MCP-capable client can connect to with a bearer API key. Once connected, your assistant can list your GA4 properties, pull daily metrics, read anomaly alerts with AI root causes, and fetch the latest weekly digest — then reason about it in plain English.

Data comes from Plask's daily sync, not a live GA4 call, so queries are fast and never count against your Google Analytics API quota. Every tool is scoped to the account that owns the key and is strictly read-only.

Setup in two minutes

  1. Sign in to Plask with Google and connect at least one GA4 property.
  2. Open Settings → API Keys and create a key. Copy it — it is shown only once.
  3. Paste one of the configurations below into your client.

Claude Code

claude mcp add --transport http plask https://plask.dev/api/mcp --header "Authorization: Bearer plk_YOUR_KEY"

Then run /mcp inside Claude Code to confirm the connection. Add --scope user to make it available in every project.

Cursor

Add this to .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally). The same JSON works for Windsurf and VS Code.

{
  "mcpServers": {
    "plask": {
      "url": "https://plask.dev/api/mcp",
      "headers": {
        "Authorization": "Bearer plk_YOUR_KEY"
      }
    }
  }
}

Claude Desktop & claude.ai

Go to Settings → Connectors → Add custom connector, enter the URL below, and paste your key as the Authorization header value Bearer plk_YOUR_KEY under advanced settings.

https://plask.dev/api/mcp

Plain HTTP (any language)

The endpoint speaks standard JSON-RPC over POST, so you can script it directly.

curl -X POST https://plask.dev/api/mcp \
  -H "Authorization: Bearer plk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_portfolio_summary","arguments":{}}}'

The six tools

list_properties

Lists your connected GA4 properties with their Plask id, display name, platform (web, iOS, Android), and whether monitoring is enabled.

get_metrics

Daily rows for one property over the last 1–90 days: active users, sessions, new users, page views, revenue, transactions, session duration, engagement rate. Includes period totals and percentage change versus the preceding period.

get_alerts

Recent anomaly alerts with metric, date, expected vs actual value, modified Z-score, severity, direction, priority score, and the AI root-cause explanation when available. Filter by property and read state.

get_digest

The latest AI weekly digest: the plain-English summary plus the week-over-week metric snapshot it was generated from.

get_insights

Latest proactive AI insights: trends, milestones, personal bests, and pattern shifts across your properties.

get_portfolio_summary

Every enabled property with last-7-day totals, change versus the previous 7 days, and unread alert count, sorted by sessions. The best first call for portfolio-wide questions.

Things to ask

  • Which of my properties dropped this week?
  • Show me the last 14 days of sessions for my iOS app and tell me if the weekend dip is normal.
  • Any unread critical alerts? Summarise the root causes.

Security

  • Keys are random 256-bit secrets. Only a SHA-256 hash is stored; the plaintext is shown once.
  • Every request is scoped to the key's account. You cannot query another user's properties.
  • All tools are read-only and carry MCP readOnlyHint annotations.
  • Revoke a key at any time from Settings. Revocation takes effect immediately.

Frequently asked questions

Is the MCP server available on the Free plan?
Yes. The Plask MCP server and API keys are available on every plan, including Free. Free accounts can connect up to 2 GA4 properties, and every tool works against those properties. Pro-only data such as weekly digests and AI insights simply returns an empty result on Free accounts.
Is it read-only?
Yes. All six tools only read data that Plask has already synced from Google Analytics. Nothing in the MCP server can modify your GA4 configuration, your Plask properties, or your alerts. Every tool is annotated as read-only so MCP clients can auto-approve calls if you choose.
Which clients are supported?
Any MCP client that supports the Streamable HTTP transport with custom headers: Claude Code, Cursor, Claude Desktop and claude.ai (as a custom connector), Windsurf, VS Code with GitHub Copilot, and the official MCP SDKs. The server is stateless, so no long-lived connection is required.
Are there rate limits?
There is no hard quota today. Requests are served from Plask's own database rather than the GA4 API, so a normal IDE session is cheap. Abusive traffic may be throttled, and you can hold at most 10 active API keys per account.
How fresh is the data?
Plask syncs each property once a day at 06:00 UTC, so the MCP server reflects data through yesterday. It does not call the GA4 Data API live. Use the Plask dashboard for real-time numbers.
How do I revoke a key?
Open Settings → API Keys in your Plask dashboard and click the trash icon next to the key. Revocation is immediate; any client still using that key receives a 401 response.

Connect your analytics to your editor

Free for up to 2 GA4 properties. Create an API key and you're querying in minutes.