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 "Install 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 ServerHow 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.
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Domain of the site (e.g. 'example.com') | |
| metrics | No | Metrics to retrieve | |
| date_range | No | Time period. Use a preset like '30d' or a custom range ['2024-01-01', '2024-01-31'] | 30d |
| filters | No | Filters array using Plausible v2 syntax, e.g. [['is', 'event:page', ['/blog*']]] |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It only states the basic function and usage, with no mention of read-only nature, side effects, rate limits, or authentication needs. As a 'get' tool, it's likely safe, but transparency is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no fluff. The first sentence front-loads the verb and resource, the second gives usage guidance. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could explain return values, but the tool is straightforward and the schema covers parameters. The filters parameter is complex but schema describes it. The description is adequate for a summary tool, though adding output structure would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning beyond listing example metrics; it does not clarify filter syntax or default behaviors beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get', resource 'aggregate stats', and scope 'over a time period', mentioning example metrics like visitors, pageviews, bounce rate. It also distinguishes from siblings by saying 'Use this for summary/overview questions', which contrasts with breakdown or timeseries tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this for summary/overview questions', providing a clear usage context. However, it does not explicitly state when not to use it or mention alternatives like 'get-breakdown' for detailed breakdowns, though the sibling names imply differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Domain of the site (e.g. 'example.com') | |
| metrics | No | Metrics to retrieve | |
| date_range | No | Time period. Use a preset like '30d' or a custom range ['2024-01-01', '2024-01-31'] | 30d |
| dimensions | Yes | Dimensions to group by. Common: 'event:page' for top pages, 'visit:source' for traffic sources, 'visit:country_name' for geography | |
| filters | No | Filters array using Plausible v2 syntax, e.g. [['is', 'event:page', ['/blog*']]] | |
| limit | No | Max number of results to return (default 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies a read-only operation (breaking down stats) with no side effects, but does not explicitly state safety or permission requirements. The description adequately conveys the tool is non-destructive but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise: two sentences, no redundant phrases, and front-loaded with the core action. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the absence of an output schema, the description is sufficiently complete. It defines the purpose, inputs, and typical use cases. Subtle omissions (e.g., return structure) are minor; the tool is easily understood.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all parameters. The description adds value by naming common dimensions and use cases (e.g., 'event:page' for top pages), which helps users select appropriate parameters beyond what the schema alone provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool breaks down stats by a dimension, giving concrete examples like page, source, country, device, browser, OS, UTM tags. It explicitly lists use cases ('top pages', 'traffic sources', 'visitor countries'), effectively distinguishing it from siblings like get-aggregate-stats or get-timeseries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use the tool ('Use this for...'), with practical examples. However, it does not mention when not to use or explicitly name alternative tools, though sibling names imply different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-current-visitorsA
Get the number of people currently on a site (real-time)
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Domain of the site (e.g. 'example.com') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavioral traits. It states it returns a real-time count, which implies non-destructive read. However, it omits details like error handling (e.g., invalid site_id), rate limits, or whether the count is approximate. Basic transparency but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no wasted words. It is front-loaded with the action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one param, no output schema), but the description does not specify the return format (e.g., integer, object). No mention of edge cases or performance. Adequate but could be more complete given the lack of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the parameter site_id has its own description. The tool description does not add new meaning beyond the schema, so baseline 3 applies. No extra constraints or context provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'number of people currently on a site', adding 'real-time' to specify immediacy. This distinguishes it from sibling tools like get-aggregate-stats (likely historical) or get-breakdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, exclusions, or comparison with sibling tools like get-timeseries or query.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Domain of the site (e.g. 'example.com') | |
| metrics | No | Metrics to retrieve | |
| date_range | No | Time period. Use a preset like '30d' or a custom range ['2024-01-01', '2024-01-31'] | 30d |
| interval | No | Time granularity for the series | date |
| filters | No | Filters array using Plausible v2 syntax, e.g. [['is', 'event:page', ['/blog*']]] |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool returns data points but does not disclose any behavioral traits like rate limits, authentication needs, or side effects. For a read-only tool, this is minimal but acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core action and purpose. No unnecessary words, every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema is provided. The description says it returns data points broken by interval, but does not specify the structure (e.g., timestamps, value fields). For a tool that supports trend charts, this leaves ambiguity. Adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all parameters. The description mentions 'time interval' which maps to the interval parameter but does not add significant meaning beyond the schema. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves traffic trends over time, broken by interval, and explicitly recommends it for trend analysis and charts, distinguishing it from sibling tools like get-aggregate-stats or get-breakdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It says 'Use this for trend analysis and charts,' giving a clear use case. However, it does not explicitly mention when not to use it or provide alternatives, which would be helpful given sibling tools exist.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-sitesA
List all sites you have access to in Plausible Analytics
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description does not disclose read-only nature, potential limits, or output format. Minimal information beyond core purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no fluff, front-loaded with action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple parameterless tool, but lacks details on response structure or pagination. Marginal given absence of output schema or annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so description cannot add parameter meaning. Baseline score of 4 applies as there is nothing to add.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the action (list) and resource (sites) with scope (all you have access to). Distinct from sibling tools that deal with analytics data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage when needing to see accessible sites. No explicit when-to-use or alternatives, but siblings are obviously different.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | Domain of the site (e.g. 'example.com') | |
| metrics | Yes | Metrics to retrieve | |
| date_range | Yes | Date range preset or custom [start, end] | |
| dimensions | No | Dimensions to group by | |
| filters | No | Filters in Plausible v2 syntax | |
| order_by | No | Order by, e.g. [['visitors', 'desc']] | |
| pagination | No | Pagination options | |
| include | No | Include options (imports, time_labels, comparisons) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It implies read-only query but doesn't explicitly state behavioral constraints like idempotency, rate limits, or auth needs. Adequate but not detailed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, no redundant words; efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema and complex parameters, the description provides enough context for an agent to decide when to use this tool vs siblings, and covers the core purpose. Lacks return format details but acceptable for a raw API tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions cover 100% of parameters, so description adds no extra parameter-level info beyond mentioning example use cases like filters and dimensions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it executes a raw Plausible API v2 query for advanced use cases not covered by siblings, with specific examples like custom property breakdowns and behavioral filters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells when to use (advanced queries other tools don't cover) and implies alternatives by naming sibling tools, such as get-breakdown and get-timeseries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.1- First observed
get-aggregate-stats - First observed
get-breakdown - First observed
get-current-visitors - First observed
get-timeseries - First observed
list-sites - First observed
query
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query site stats, realtime visitors, breakdowns and goals from Plausible Analytics.
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
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
- 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-
- AlicenseBqualityDmaintenanceEnables natural language interaction with Plausible Analytics data to query traffic, visitors, engagement, and more using conversational questions.41MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Defilan/plausible-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server