# Plausible Analytics — how to use (mcp.ai)

Connect your Plausible Analytics account and use 13 tools for analytics straight from your AI agent. Connect with your own API key. Privacy-focused web analytics platform that provides simple, lightweight, and GDPR-compliant website statistics.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_plausible_analytics?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `plausible_analytics_check_health`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/plausible_analytics`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/plausible_analytics/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/plausible_analytics/check/health` — Tool to check the health status of the Plausible Analytics API. Use when verifying API connectivity and service availability before making other API calls.
- `POST https://api.mcp.ai/api/plausible_analytics/get/breakdown/stats` — Tool to retrieve breakdown statistics for a specific property (dimension) from Plausible Analytics. Use when you need to analyze top sources, top pages, device breakdown, geographic distribution, or a
  - body: { date?: string, page?: integer, limit?: integer, period?: string, filters?: string, metrics?: string, site_id: string, property: string }
- `POST https://api.mcp.ai/api/plausible_analytics/get/plugin/capabilities` — Tool to retrieve available capabilities for the Plausible Analytics Plugins API. Use this to check which features are enabled for the authenticated account, such as Goals, Funnels, Stats API, and more
- `POST https://api.mcp.ai/api/plausible_analytics/get/realtime/visitors` — Tool to retrieve the number of current visitors on your site in the last 5 minutes. Use this to get real-time visitor counts from the Plausible Analytics Stats API v1.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/plausible_analytics/get/site` — Tool to retrieve details for a specific Plausible Analytics site. Use when you need site configuration including domain, timezone, custom properties, and tracker script settings.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/plausible_analytics/get/timeseries/stats` — Tool to retrieve timeseries visitor data from Plausible Analytics over a specified time period. Use this to get historical trends for metrics like visitors, pageviews, bounce rate, and visit duration.
  - body: { period?: string, filters?: string, metrics?: string, site_id: string, interval?: string, with_imported?: boolean }
- `POST https://api.mcp.ai/api/plausible_analytics/list/custom/props` — Tool to list all custom properties configured for a site. Use when you need to retrieve custom property configurations for a Plausible Analytics site. Enterprise feature only.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/plausible_analytics/list/goals` — Tool to list all goals configured for a site. Use when you need to retrieve conversion goals and custom action tracking configured for a Plausible Analytics site.
  - body: { after?: integer, limit?: integer, before?: integer, site_id: string }
- `POST https://api.mcp.ai/api/plausible_analytics/list/guests` — Tool to list all guest users who have access to a site's dashboard in Plausible Analytics. Use when you need to see which guests have been granted access to view a specific site's analytics. This is a
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/plausible_analytics/list/sites` — Tool to list all sites the API key owner's Plausible account can access. Returns domain, timezone, and creation info with pagination support. Use when you need to retrieve all sites or paginate throug
  - body: { after?: string, limit?: integer, before?: string, team_id?: string }
- `POST https://api.mcp.ai/api/plausible_analytics/list/teams` — Tool to list all teams available for the API key owner. Use when you need to retrieve teams for site provisioning to a specific team.
  - body: { after?: string, limit?: integer, before?: string }
- `POST https://api.mcp.ai/api/plausible_analytics/query/stats` — Tool to query analytics stats for a site using the Stats API v2. Use when you need to retrieve historical or real-time statistics such as visitors, pageviews, bounce rate, visit duration, and more. Su
  - body: { filters?: string|string[][][], metrics: string[], site_id: string, date_range: string|string[], dimensions?: string[] }
- `POST https://api.mcp.ai/api/plausible_analytics/record/event` — Tool to record a pageview or custom event via the Plausible Events API. Use when tracking Android/iOS mobile apps or server-side tracking. Requires proper User-Agent and optionally X-Forwarded-For hea
  - body: { url: string, name: string, props?: object, domain: string, revenue?: object, referrer?: string, user_agent: string, interactive?: boolean, x_forwarded_for?: string }

## Example prompts
- "What can I do in Plausible Analytics?"
- "Show me a summary of my Plausible Analytics account"

## More
- Page: https://mcp.ai/plausible_analytics
- Agent spec (llms.txt): https://mcp.ai/plausible_analytics/llms.txt
- Postman collection: https://mcp.ai/plausible_analytics/postman.json
