Plausible Analytics MCP Server
Provides tools to read analytics data from a Plausible Analytics account, including listing sites, querying statistics, and fetching realtime visitor counts.
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 ServerShow me top pages for example.com in the last 7 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 Analytics MCP Server
A stdio-based Model Context Protocol (MCP) server that gives Large Language Models (LLMs) tools to read analytics data from a Plausible Analytics account (cloud-hosted or self-hosted). It operates as a read-only proxy — it does not store, transform, cache, or mutate anything. Every tool call maps to exactly one Plausible API request.
Prerequisites
Python: 3.12 or higher
Package Manager:
uvPlausible Account: Plausible Cloud or self-hosted instance with an API key (Personal Access Token)
Related MCP server: plausible-whenever-mcp
Setup Instructions
Clone the repository and navigate into the directory:
git clone <repository-url> cd plausible-mcpInstall dependencies using
uv:uv syncCreate and configure your environment file:
cp .env.example .envEdit
.envto set your credentials:PLAUSIBLE_API_KEY=your_secret_api_key_here PLAUSIBLE_BASE_URL=https://plausible.io(For self-hosted instances, replace
https://plausible.iowith your custom instance URL).
Running the Server
Start the server locally over stdio transport:
uv run python -m src.serverMCP Client Configuration (Claude Desktop)
To connect this MCP server to Claude Desktop, add the following entry to your claude_desktop_config.json file (typically located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"plausible-mcp": {
"command": "uv",
"args": [
"--directory",
"C:/path/to/plausible-mcp",
"run",
"python",
"-m",
"src.server"
],
"env": {
"PLAUSIBLE_API_KEY": "your_secret_api_key_here",
"PLAUSIBLE_BASE_URL": "https://plausible.io"
}
}
}
}Tool Reference
1. list_sites
Description: Returns the list of sites/domains accessible by the configured Plausible API key.
Parameters: None
Example Call:
list_sites()
2. query_stats
Description: General-purpose analytics query endpoint wrapping Plausible Stats API v2 (
POST /api/v2/query).Parameters:
site_id(str, required): The domain name configured in Plausible (min length 1).metrics(list[Metric], required): List of confirmed metrics (e.g.visitors,visits,pageviews,bounce_rate,visit_duration,events,scroll_depth,percentage,conversion_rate,group_conversion_rate,average_revenue,total_revenue,time_on_page).date_range(DateRangePreset|DateRangeCustom, required): Either a preset string (day,24h,7d,28d,30d,91d,month,6mo,12mo,year,all) or a 2-element list of ISO8601 date/datetime strings (e.g.,["2026-01-01", "2026-01-07"]).dimensions(list[str], optional): List of event, visit, or time dimensions (e.g.,visit:source,event:page,time:day).filters(list[FilterClause], optional): Structurally validated filter clauses (e.g.,[["is", "visit:country", ["US"]]]).order_by(list[tuple[str, "asc" | "desc"]], optional): Sorting specifications.pagination(Pagination, optional): Limits and offsets ({"limit": 10000, "offset": 0}).
Example Call:
query_stats( site_id="example.com", metrics=["visitors", "pageviews"], date_range="7d", dimensions=["visit:source"], order_by=[("visitors", "desc")] )
3. get_realtime_visitors
Description: Convenience wrapper querying the current active visitor count over a server-fixed 5-minute window (
now - 5 minutestonow).Parameters:
site_id(str, required): The domain name configured in Plausible.
Example Call:
get_realtime_visitors(site_id="example.com")
Known Limitations
Filter DSL Structural Validation Only: Filter clauses undergo structural validation (checking element length and operator string), but semantic validation of Plausible's full filter DSL is delegated to the Plausible API itself.
stdio Transport Only: Only stdio transport is supported in this release.
Single Account / Single API Key: Designed for single-tenant operations per server instance.
Read-Only Scope: Purely read-only proxy. Endpoint calls to record pageviews, provision sites, or mutate goals are strictly out of scope.
License
Not yet decided.
Available Tools
3 toolsget_realtime_visitorsB
Get the current active visitor count for a site over the last 5 minutes.
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It does disclose the time window (5 minutes), which is a useful behavioral trait, but it does not mention the return format, error behavior, or any rate limits, leaving gaps.
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 sentence, front-loaded with the action and object, and contains no extraneous information.
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?
For a simple read operation with one parameter, the description provides the essential purpose and time context. However, it lacks information about the return value structure and how to obtain a site_id, so it is not fully 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?
The description does not explain the site_id parameter beyond referring to 'a site'. With 0% schema description coverage, the description fails to add meaning to the parameter, such as how to obtain a valid site_id (e.g., from list_sites).
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 retrieves the current active visitor count for a site, with a specific time window ('last 5 minutes'), distinguishing it from sibling tools list_sites and query_stats.
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 the alternatives. The description does not mention any alternatives, exclusions, or conditions under which it should be preferred, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sitesA
Returns the list of sites/domains accessible by the configured Plausible API key.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the transparency burden. It does indicate a read operation through 'Returns' and mentions API key authentication, but it lacks details on potential errors, rate limits, or return structure. This is minimally sufficient for a simple list operation.
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 clear sentence with no redundant information. It is front-loaded with the main action and resource, making it easy to parse.
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?
For a tool with zero parameters and no output schema, this description is complete enough. It explains what the tool returns and the underlying access context. The sibling tools suggest complementary analytics functions, reinforcing the purpose.
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?
There are zero parameters, so the schema coverage is trivially 100%. The description adds context about the configured API key, which clarifies the data source. With no parameters, the baseline is 4, and this description does not detract from that.
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 returns a list of sites/domains accessible via the API key. The verb 'Returns' and resource 'sites/domains' make it distinct from the sibling tools query_stats and get_realtime_visitors, which focus on 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?
No usage guidance is provided. The description does not indicate when to use this tool versus the siblings, nor does it mention any prerequisites or expected workflow. This leaves the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_statsC
Execute a general-purpose analytics query against Plausible Analytics API v2.
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | ||
| metrics | Yes | ||
| site_id | Yes | ||
| order_by | No | ||
| date_range | Yes | ||
| dimensions | No | ||
| pagination | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'execute a query', which implies a read operation but does not state whether it is read-only, whether authentication is needed, or any side effects. It adds little beyond what the tool name already implies.
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, front-loaded sentence with no wasted words. It is easy to parse, though it is also under-specified. The conciseness is good but not exceptional because it sacrifices needed detail for brevity.
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 complexity (7 parameters, no output schema, no annotations), the description is severely incomplete. It provides no information about return values, pagination, error behavior, or how to construct queries. An agent would not know what to expect from the tool's output or how to use it effectively.
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 0%, and the description does not compensate by explaining any parameters. It mentions none of the seven parameters, leaving the agent to rely entirely on the schema. The schema itself has minimal descriptions for the main properties, so the tool provides insufficient parameter guidance.
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 'Execute a general-purpose analytics query against Plausible Analytics API v2' clearly states the action (execute) and resource (analytics query). It provides a general sense of scope with 'general-purpose', but it does not explicitly differentiate from sibling tools like get_realtime_visitors or list_sites, so it lacks a strong distinguishing element.
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 offers no guidance on when to use this tool vs alternatives. There is no mention of specific use cases, prerequisites, or exclusions. Sibling tools are not referenced, so an agent receives no context for choosing query_stats over get_realtime_visitors or list_sites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The three tools are mostly distinct: list_sites retrieves site metadata, query_stats provides general analytics data, and get_realtime_visitors focuses on current active visitors. There is slight overlap between query_stats and get_realtime_visitors, but the descriptions clearly differentiate realtime from historical querying.
All tool names follow the verb_noun pattern: list_sites, query_stats, get_realtime_visitors. The naming is consistent, predictable, and clearly indicates the action and target resource.
With only 3 tools, the server is minimal but focused. The count is not excessive and covers the core analytics needs (site listing, stats querying, and realtime tracking) without adding redundant tools.
The server covers the essential read-only analytics lifecycle for Plausible: listing sites, querying statistics, and checking realtime visitors. Minor gaps exist such as site management (add/delete) or specific breakdown endpoints, but query_stats likely abstracts several API v2 query types, so the surface is reasonably complete for typical analytics workflows.
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.
- SupabaseOAuthcom.supabase
MCP server for interacting with the Supabase platform
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Related MCP Servers
- AlicenseAqualityDmaintenanceRead-only MCP server for Umami analytics. It talks to the Umami REST API directly over HTTP, supporting self-hosted and cloud setups.817MIT
- AlicenseAqualityCmaintenanceMCP server that provides read access to Plausible Analytics data with natural-language date resolution, enabling users to query analytics like 'yesterday' or 'last week' without needing to know exact date formats.8MIT
- AlicenseAqualityAmaintenanceMCP server for Plausible Analytics that enables querying traffic, conversions, and comparing time periods from any AI tool supporting MCP.43338MIT

@vskstudio/takt-mcpofficial
AlicenseAqualityFmaintenanceMCP server for querying privacy-friendly website analytics from a self-hosted Takt instance, supporting metrics like visitors, pageviews, realtime activity, and more.1016MIT
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/AryanKo/Plausible-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server