Plausible Analytics MCP Server
Connects to the Plausible Stats API v2 and exposes tools for querying real-time visitors, aggregate metrics, timeseries, top pages and sources, UTM and location/device/browser/OS breakdowns, goal conversions, custom properties, and raw API queries.
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 visitors did I have this week?"
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 Analytics MCP Server
An MCP (Model Context Protocol) server that connects AI assistants like Claude to your Plausible Analytics data. Ask questions about your website traffic in plain language.
Installation
Claude Desktop — .dxt extension (easiest)
Download plausible-analytics.dxt from the latest release and double-click to install. Claude Desktop will prompt you for your API key and site domain — no manual config needed.
Claude Code
claude mcp add plausible node /absolute/path/to/plausibleMCP/dist/index.js \
-e PLAUSIBLE_API_KEY=your-api-key-here \
-e PLAUSIBLE_SITE_ID=your-site.comManual (Claude Desktop config)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"plausible": {
"command": "node",
"args": ["/absolute/path/to/plausibleMCP/dist/index.js"],
"env": {
"PLAUSIBLE_API_KEY": "your-api-key-here",
"PLAUSIBLE_SITE_ID": "your-site.com"
}
}
}
}Self-hosted Plausible
Add PLAUSIBLE_BASE_URL to point to your instance:
"env": {
"PLAUSIBLE_API_KEY": "your-api-key-here",
"PLAUSIBLE_SITE_ID": "your-site.com",
"PLAUSIBLE_BASE_URL": "https://your-plausible-instance.com"
}Related MCP server: Plausible Analytics MCP Server
Requirements
Node.js 18+
A Plausible Analytics account (Cloud or self-hosted)
A Plausible Stats API key — get it at plausible.io → Settings → API Keys
Tools
14 tools covering the full Plausible Stats API v2:
Tool | Description |
| Real-time visitor count (last 5 min) |
| Aggregate metrics for any time period |
| Metrics over time (hourly, daily, weekly, monthly) |
| Top pages, landing pages, or exit pages |
| Detailed metrics for a specific page or pattern |
| Top traffic sources, referrers, or channels |
| UTM campaign/medium/source/content/term breakdown |
| Visitors by country, region, or city |
| Visitors by device type |
| Visitors by browser (with optional version) |
| Visitors by OS (with optional version) |
| Goal and event conversion data |
| Breakdown by custom event properties |
| Raw API v2 query for advanced use cases |
Usage Examples
Once connected, ask Claude:
"How many visitors did I have this week?"
"What are the top 5 pages this month?"
"Where are my visitors coming from?"
"Show me traffic trends over the last 30 days"
"What's my bounce rate this quarter?"
"Which UTM campaigns are driving the most conversions?"
"How many people are on my site right now?"
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your Plausible Stats API key |
| Yes | — | Your site domain (e.g. |
| No |
| Base URL for self-hosted instances |
Development
git clone https://github.com/er1carruda/plausibleMCP.git
cd plausibleMCP
npm install
npm run build # Compile TypeScript to dist/
npm start # Run the serverLicense
MIT © Eric Arruda
Available Tools
14 toolsget_aggregateB
Get aggregate analytics metrics for a time period. Metrics can include: visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration, events. Date range examples: '7d', '30d', 'month', 'year', 'all', or ['2024-01-01', '2024-03-01'].
Inputs: metrics (required), date_range (required), filters.
get_breakdown_by_browserA
Get visitors broken down by browser. Set include_version to true to also see browser versions.
Inputs: date_range (required), limit, filters, include_version.
get_breakdown_by_deviceB
Get visitors broken down by device type (Desktop, Mobile, Tablet).
Inputs: date_range (required), filters.
get_breakdown_by_locationA
Get visitors broken down by geographic location. Use country_filter to drill into regions of a specific country, or region_filter to drill into cities of a specific region.
Inputs: date_range (required), limit, filters, location_type, +2 more.
get_breakdown_by_osB
Get visitors broken down by operating system. Set include_version to true to see OS versions.
Inputs: date_range (required), limit, filters, include_version.
get_current_visitorsA
Get the number of people currently on the site (active in the last 5 minutes)
Inputs: no named parameters.
get_custom_property_breakdownC
Get breakdown by a custom event property. property_name is the key without the 'event:props:' prefix.
Inputs: date_range (required), property_name (required), limit, filters.
get_goal_conversionsB
Get conversion data for goals/events tracked in Plausible. Optionally filter to a specific goal by name.
Inputs: date_range (required), filters, goal_filter.
get_page_breakdownB
Get detailed metrics for a specific page or page pattern (supports wildcards like '/blog/**').
Inputs: page_path (required), date_range (required), filters, metrics.
get_timeseriesB
Get metrics broken down over time. Useful for trend analysis.
Inputs: date_range (required), filters, metrics, interval.
get_top_pagesC
Get top pages ranked by visitors. page_type: 'all' = any page view, 'entry' = landing pages, 'exit' = exit pages.
Inputs: date_range (required), limit, filters, page_type.
get_top_sourcesB
Get top traffic sources. source_type: 'source' = traffic source (e.g. Google), 'referrer' = full referrer URL, 'channel' = channel grouping (Organic Search, Direct, etc.).
Inputs: date_range (required), limit, filters, source_type.
get_utm_breakdownC
Get breakdown by UTM parameters to analyze campaign performance.
Inputs: utm_param (required), date_range (required), limit, filters.
plausible_queryB
Execute an arbitrary Plausible Stats API v2 query. Use this for advanced analysis not covered by the other tools. See Plausible API v2 docs for full query syntax.
Inputs: metrics (required), date_range (required), limit, offset, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools target clearly distinct analytics dimensions or actions. A few boundaries could blur, especially get_aggregate vs get_timeseries, get_top_pages vs get_page_breakdown, and plausible_query as a catch-all, but the descriptions make the intended use reasonably clear.
Almost all tools use a consistent snake_case get_* pattern. The only clear outlier is plausible_query, which drops the get_ verb but remains readable and idiomatic enough.
Fourteen tools is well within the appropriate range for an analytics server. Each tool corresponds to a meaningful query dimension or convenience function, and the set does not feel bloated.
The surface covers aggregate metrics, timeseries, pages, sources, UTM, locations, devices, browsers, OS, goals, custom properties, realtime visitors, and an arbitrary query fallback. For a read-only analytics API, there are no obvious dead ends.
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.
Ask an assistant about your website traffic. Privacy-first web analytics, no cookies. OAuth.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
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 query website statistics from Plausible Analytics, providing access to metrics like real-time visitors, traffic trends, and page performance. It supports both Plausible Cloud and self-hosted instances through the Stats API v2.635 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Plausible Analytics data for website statistics, traffic, engagement, and conversions through natural language, with support for filters, dimensions, and time-series.7MIT
- 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.61 npmMIT