plausible-mcp
Provides tools for interacting with the Plausible Analytics API, enabling retrieval of aggregate stats, segmented breakdowns, realtime visitor counts, and timeseries trend data from Plausible Cloud or self-hosted instances.
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-mcphow many visitors did example.com get in the last 30 days?"
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
Fast, privacy-first Plausible Analytics Model Context Protocol (MCP) server for AI coding agents and LLM harnesses. Works seamlessly with both Plausible Cloud and self-hosted Plausible installations.
Quick Start
Run with uvx (Python)
export PLAUSIBLE_API_KEY="your_api_key_here"
uvx plausible-mcpRun with npx (Node / npm bridge)
export PLAUSIBLE_API_KEY="your_api_key_here"
npx -y plausible-analytics-mcpRelated MCP server: Umami MCP Server
Environment Configuration
Variable | Description | Default |
| Your Plausible Stats/Sites API token | Required (or pass via tool |
| Base URL for self-hosted Plausible |
|
| Set to |
|
Getting an API Key
Log in to Plausible (Cloud or your self-hosted instance).
Go to Settings (user profile menu) -> API Keys.
Click + New Key, name it
mcp-agent, and copy the token.Export as
PLAUSIBLE_API_KEY="your_token".
Available Tools
Tool | Description |
| High-level visitor, pageview, bounce rate, and session duration totals |
| Segment metrics by pages, traffic sources, countries, browsers, OS, devices |
| Current count of active visitors on the site right now |
| Daily or monthly trendline data points for chart generation |
| Test Plausible API connectivity and validate the configured API token |
| List dynamic analytics playbooks and methodology guides |
| Fetch full markdown playbook by name (e.g. |
| Check PyPI for newer versions and view upgrade commands |
Error Absorption Standard
Errors returned to agents are explicitly classified:
[INPUT_FIXABLE]: Parameter errors (e.g., misspelled site_id, unknown dimension). Fix arguments and retry.[ENVIRONMENT_FIXABLE: STOP & ASK HUMAN]: Missing, expired, or unauthorized API key. Prompt user with guided setup steps.[TRANSIENT]: Upstream rate limits (HTTP 429) or network hiccups. Wait briefly and retry.
MCP Client Setup
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"plausible": {
"command": "uvx",
"args": ["plausible-mcp"],
"env": {
"PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
}
}
}
}Or using the npm bridge:
{
"mcpServers": {
"plausible": {
"command": "npx",
"args": ["-y", "plausible-analytics-mcp"],
"env": {
"PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
}
}
}
}License
MIT License. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Privacy-first product analytics. Your agent sets up tracking and answers questions about traffic.
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
- cabinOAuthcom.withcabin
Privacy-first, cookie-free web analytics. Read stats and manage sites from your AI.
Related MCP Servers
- FlicenseBqualityDmaintenanceAllows AI models to query and retrieve analytics data from Plausible Analytics through the Plausible API, enabling natural language interactions with website statistics.18-
- AlicenseAqualityFmaintenanceEnables 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
- AlicenseAqualityCmaintenanceEnables 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.648 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying Plausible Analytics data for website statistics, traffic, engagement, and conversions through natural language, with support for filters, dimensions, and time-series.6-