Plausible Analytics MCP Server
Provides tools to query website statistics from Plausible Analytics, including real-time visitor counts, aggregate metrics like visitors and pageviews, traffic trends, and detailed breakdowns by dimensions such as pages, sources, and geography.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Plausible Analytics MCP Server How many people are on my site right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
plausible-mcp
An MCP (Model Context Protocol) server for Plausible Analytics. Query your website stats directly from AI assistants like Claude.
Features
Aggregate stats — visitors, pageviews, bounce rate, visit duration
Time series — traffic trends by day, week, or month
Breakdowns — top pages, traffic sources, countries, devices, browsers, and more
Real-time visitors — current visitor count
Site listing — discover all your Plausible sites
Raw query — full access to the Plausible Stats API v2 for advanced use cases
Works with both Plausible Cloud and self-hosted instances.
Related MCP server: Umami MCP Server
Setup
1. Get a Plausible API key
Go to your Plausible account settings and create an API key.
2. Configure your MCP client
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"plausible": {
"command": "npx",
"args": ["-y", "plausible-mcp"],
"env": {
"PLAUSIBLE_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
claude mcp add plausible -- npx -y plausible-mcpThen set the environment variable PLAUSIBLE_API_KEY in your shell.
Self-hosted Plausible
Add PLAUSIBLE_BASE_URL to point to your instance:
{
"env": {
"PLAUSIBLE_API_KEY": "your-api-key-here",
"PLAUSIBLE_BASE_URL": "https://plausible.example.com"
}
}Tools
Tool | Description |
| List all sites in your Plausible account |
| Real-time visitor count for a site |
| Summary metrics over a time period |
| Traffic trends over time (by day/week/month) |
| Break down stats by dimension (pages, sources, countries, etc.) |
| Raw Plausible Stats API v2 query for advanced use cases |
Example prompts
"How many visitors did example.com get this month?"
"Show me traffic trends for the last 30 days"
"What are my top 10 pages?"
"Where is my traffic coming from?"
"Compare this month's visitors to last month"
"How many people are on my site right now?"
Environment variables
Variable | Required | Default | Description |
| Yes | — | Your Plausible API key |
| No |
| Base URL for self-hosted instances |
Development
git clone https://github.com/Defilan/plausible-mcp.git
cd plausible-mcp
npm install
npm run buildTo test locally:
PLAUSIBLE_API_KEY=your-key node dist/index.jsLicense
MIT
Available Tools
6 toolsget-aggregate-statsA
Get aggregate stats for a site over a time period (visitors, pageviews, bounce rate, etc.). Use this for summary/overview questions.
Inputs: site_id (required), metrics, date_range, filters.
get-breakdownA
Break down stats by a dimension (e.g. page, source, country, device, browser, OS, UTM tags). Use this for 'top pages', 'traffic sources', 'visitor countries', etc.
Inputs: site_id (required), dimensions (required), metrics, date_range, +2 more.
get-current-visitorsA
Get the number of people currently on a site (real-time)
Inputs: site_id (required).
get-timeseriesA
Get traffic trends over time. Returns data points broken down by time interval (day, week, or month). Use this for trend analysis and charts.
Inputs: site_id (required), metrics, date_range, interval, +1 more.
list-sitesA
List all sites you have access to in Plausible Analytics
Inputs: no named parameters.
queryA
Execute a raw Plausible Stats API v2 query. Use this for advanced queries that the other tools don't cover, such as custom property breakdowns, behavioral filters, or combining multiple dimensions with time series.
Inputs: site_id (required), metrics (required), date_range (required), dimensions, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: aggregate overview, breakdown by dimension, real-time visitors, time series trends, site listing, and a raw query for advanced needs. No two tools are likely to be confused.
Most tools follow a 'get-<resource>' pattern, but 'list-sites' deviates to 'list' and 'query' uses a bare verb. The pattern is readable and largely consistent, with minor exceptions.
Six tools cover the core analytics query needs (aggregate, breakdown, timeseries, real-time, site listing, raw query) without bloat. The count is well-scoped for the domain.
The tool set covers the main analytics operations: summary, breakdown, trends, real-time, site list, and a raw query for custom requests. Missing explicit support for custom properties or goals, but the raw query compensates, so only minor gaps.
Maintenance
Related MCP Connectors
Query site stats, realtime visitors, breakdowns and goals from Plausible Analytics.
Privacy-first, cookie-free web analytics. Read stats and manage sites from your AI.
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Related MCP Servers
- AlicenseBqualityDmaintenanceAllows AI models to query and retrieve analytics data from Plausible Analytics through the Plausible API, enabling natural language interactions with website statistics.18MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Umami Analytics for both Cloud and self-hosted instances. It provides tools to retrieve website statistics, visitor metrics, pageview trends, and real-time active user counts.51MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Plausible Analytics data for website statistics, traffic, engagement, and conversions through natural language, with support for filters, dimensions, and time-series.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying privacy-focused website analytics from Plausible's read-only Stats API v2, with tools for overview, timeseries, breakdown, and goal performance metrics.340 npmMIT