Skip to main content
Glama
Plausible Analytics MCP Server

Plausible Analytics MCP Server

by Defilan

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-mcp

Then 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-sites

List all sites in your Plausible account

get-current-visitors

Real-time visitor count for a site

get-aggregate-stats

Summary metrics over a time period

get-timeseries

Traffic trends over time (by day/week/month)

get-breakdown

Break down stats by dimension (pages, sources, countries, etc.)

query

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

PLAUSIBLE_API_KEY

Yes

—

Your Plausible API key

PLAUSIBLE_BASE_URL

No

https://plausible.io

Base URL for self-hosted instances

Development

git clone https://github.com/Defilan/plausible-mcp.git
cd plausible-mcp
npm install
npm run build

To test locally:

PLAUSIBLE_API_KEY=your-key node dist/index.js

License

MIT

Available Tools

6 tools
get-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

    A3.9/5.0

    Scored across 6 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Allows AI models to query and retrieve analytics data from Plausible Analytics through the Plausible API, enabling natural language interactions with website statistics.
      1
      8
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      5
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables querying Plausible Analytics data for website statistics, traffic, engagement, and conversions through natural language, with support for filters, dimensions, and time-series.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying privacy-focused website analytics from Plausible's read-only Stats API v2, with tools for overview, timeseries, breakdown, and goal performance metrics.
      340 npm
      MIT