Skip to main content
Glama
plausible-mcp-server

plausible-mcp-server

Plausible Analytics MCP Server

MCP server for Plausible Analytics — privacy-friendly web analytics. Query traffic, conversions, sources, and device breakdowns from any MCP-compatible AI assistant.

Features

  • Flexible stats queries — metrics, dimensions, filters, date ranges

  • Real-time visitors — live visitor count

  • Traffic breakdowns — sources, countries, browsers, UTM campaigns

  • Time-series data — daily, weekly, monthly, hourly intervals

  • Custom events — event tracking and conversion rates

  • Entry/exit pages — where visitors land and leave

  • Device analytics — browser, OS, screen size breakdowns

  • Goal tracking — conversion stats for all configured goals

  • Site management — list and inspect sites

Related MCP server: plausible-mcp

12 Tools

Tool

Description

query_stats

Full flexible stats query (the main endpoint)

realtime_visitors

Current real-time visitor count

get_breakdown

Breakdown by any dimension (source, page, country, etc.)

get_timeseries

Metrics over time with configurable intervals

list_sites

List all sites in your account

get_site

Get site details

get_custom_events

Custom event breakdown

get_entry_pages

Top landing pages

get_exit_pages

Top exit pages

get_utm_stats

UTM campaign/source/medium breakdowns

get_device_stats

Browser, OS, screen size breakdowns

get_goals

Conversion stats for all goals

Setup

Prerequisites

  1. A Plausible Analytics account (cloud or self-hosted)

  2. An API key — generate one at Site Settings → API Keys in your Plausible dashboard

Configuration

Add to your MCP client config (e.g. Claude Desktop, Cursor):

{
  "mcpServers": {
    "plausible": {
      "command": "node",
      "args": ["/path/to/plausible-mcp-server/dist/index.js"],
      "env": {
        "PLAUSIBLE_API_KEY": "your-api-key-here"
      }
    }
  }
}

For self-hosted Plausible, also set:

"env": {
  "PLAUSIBLE_API_KEY": "your-api-key",
  "PLAUSIBLE_API_BASE": "https://your-plausible-instance.com"
}

Build from source

git clone https://github.com/friendlygeorge/plausible-mcp-server.git
cd plausible-mcp-server
npm install
npx tsc

Usage Examples

Once configured, ask your AI assistant:

  • "Show me the top traffic sources for my site this month"

  • "How many visitors did I get today?"

  • "What's the time-series of pageviews for the last 30 days?"

  • "Which pages have the highest bounce rate?"

  • "Show me UTM campaign performance"

  • "What are my top entry pages?"

  • "Show conversion rates for all goals"

  • "Break down visitors by country for the last week"

Environment Variables

Variable

Required

Default

Description

PLAUSIBLE_API_KEY

Yes

—

Your Plausible API key

PLAUSIBLE_API_BASE

No

https://plausible.io

API base URL (change for self-hosted)

Supported Metrics

visitors, visits, pageviews, views_per_visit, visit_duration, events, bounce_rate, scroll_depth, conversion_rate

Supported Dimensions

visit:source, visit:referrer, visit:utm_source, visit:utm_medium, visit:utm_campaign, visit:utm_content, visit:utm_term, visit:country_name, visit:city_name, visit:screen, visit:browser, visit:browser_version, visit:os, visit:os_version, visit:entry_page, visit:exit_page, event:page, event:name, event:goal, event:props:<key>

License

MIT

Available Tools

12 tools
get_breakdownB

Get a breakdown of visitors by a specific dimension (top sources, pages, countries, browsers, etc.).

Inputs: site_id (required), property (required), date_range (required), limit, +1 more.

get_custom_eventsB

Get custom event breakdown — see which events fire most, conversion rates, and revenue.

Inputs: site_id (required), date_range (required), filters.

get_device_statsC

Get breakdown by device type, browser, OS, and screen size.

Inputs: site_id (required), date_range (required), dimension.

get_entry_pagesB

Get top entry pages — where visitors land on your site.

Inputs: site_id (required), date_range (required), limit.

get_exit_pagesB

Get top exit pages — where visitors leave your site.

Inputs: site_id (required), date_range (required), limit.

get_goalsC

Get conversion stats for all configured goals on a site.

Inputs: site_id (required), date_range (required).

get_siteB

Get detailed information about a specific site.

Inputs: site_id (required).

get_timeseriesC

Get time-series data for one or more metrics — daily, hourly, weekly, or monthly intervals.

Inputs: metrics (required), site_id (required), date_range (required), filters, +1 more.

get_utm_statsB

Get UTM campaign, source, and medium breakdowns — see which campaigns drive traffic.

Inputs: site_id (required), date_range (required), dimension.

list_sitesB

List all sites in your Plausible account.

Inputs: no named parameters.

query_statsB

Query Plausible analytics with full flexibility — metrics, dimensions, filters, date ranges. The main stats endpoint.

Inputs: metrics (required), site_id (required), date_range (required), limit, +4 more.

realtime_visitorsA

Get the current number of real-time visitors on a site.

Inputs: site_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (e.g., realtime_visitors, list_sites, get_utm_stats). However, query_stats is a flexible endpoint that could overlap with specialized tools like get_breakdown or get_timeseries, potentially causing confusion.

    Naming Consistency3/5

    The majority use a get_* pattern, but query_stats and realtime_visitors deviate. The mix of verb-based and descriptive names is inconsistent but still readable.

    Tool Count5/5

    12 tools cover the Plausible analytics domain well—neither too few nor too many. Each tool serves a distinct purpose without redundancy.

    Completeness4/5

    The tool set covers all major analytics dimensions (traffic, sources, pages, devices, goals, UTM). A minor gap is the lack of site CRUD, but this server focuses on querying, not management.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      8
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for Plausible Analytics that enables querying traffic, conversions, and comparing time periods from any AI tool supporting MCP.
      4
      42 npm
      50
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for Yandex Metrica analytics: query web analytics metrics, goals, conversions, and raw API data using natural language from AI clients like Claude and Cursor.
      8
      708 npm
      4
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A read-only MCP server for the Pirsch Analytics API that lets users list domains and query traffic, pages, events, and other analytics metrics through conversational agents.
      3
      85 npm
      2
      MIT