Skip to main content
Glama
Plausible Analytics MCP Server

Plausible Analytics MCP Server

by er1carruda

Plausible Analytics MCP Server

An MCP (Model Context Protocol) server that connects AI assistants like Claude to your Plausible Analytics data. Ask questions about your website traffic in plain language.

Installation

Claude Desktop — .dxt extension (easiest)

Download plausible-analytics.dxt from the latest release and double-click to install. Claude Desktop will prompt you for your API key and site domain — no manual config needed.

Claude Code

claude mcp add plausible node /absolute/path/to/plausibleMCP/dist/index.js \
  -e PLAUSIBLE_API_KEY=your-api-key-here \
  -e PLAUSIBLE_SITE_ID=your-site.com

Manual (Claude Desktop config)

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "plausible": {
      "command": "node",
      "args": ["/absolute/path/to/plausibleMCP/dist/index.js"],
      "env": {
        "PLAUSIBLE_API_KEY": "your-api-key-here",
        "PLAUSIBLE_SITE_ID": "your-site.com"
      }
    }
  }
}

Self-hosted Plausible

Add PLAUSIBLE_BASE_URL to point to your instance:

"env": {
  "PLAUSIBLE_API_KEY": "your-api-key-here",
  "PLAUSIBLE_SITE_ID": "your-site.com",
  "PLAUSIBLE_BASE_URL": "https://your-plausible-instance.com"
}

Related MCP server: Plausible Analytics MCP Server

Requirements

  • Node.js 18+

  • A Plausible Analytics account (Cloud or self-hosted)

  • A Plausible Stats API key — get it at plausible.io → Settings → API Keys

Tools

14 tools covering the full Plausible Stats API v2:

Tool

Description

get_current_visitors

Real-time visitor count (last 5 min)

get_aggregate

Aggregate metrics for any time period

get_timeseries

Metrics over time (hourly, daily, weekly, monthly)

get_top_pages

Top pages, landing pages, or exit pages

get_page_breakdown

Detailed metrics for a specific page or pattern

get_top_sources

Top traffic sources, referrers, or channels

get_utm_breakdown

UTM campaign/medium/source/content/term breakdown

get_breakdown_by_location

Visitors by country, region, or city

get_breakdown_by_device

Visitors by device type

get_breakdown_by_browser

Visitors by browser (with optional version)

get_breakdown_by_os

Visitors by OS (with optional version)

get_goal_conversions

Goal and event conversion data

get_custom_property_breakdown

Breakdown by custom event properties

plausible_query

Raw API v2 query for advanced use cases

Usage Examples

Once connected, ask Claude:

  • "How many visitors did I have this week?"

  • "What are the top 5 pages this month?"

  • "Where are my visitors coming from?"

  • "Show me traffic trends over the last 30 days"

  • "What's my bounce rate this quarter?"

  • "Which UTM campaigns are driving the most conversions?"

  • "How many people are on my site right now?"

Environment Variables

Variable

Required

Default

Description

PLAUSIBLE_API_KEY

Yes

—

Your Plausible Stats API key

PLAUSIBLE_SITE_ID

Yes

—

Your site domain (e.g. example.com)

PLAUSIBLE_BASE_URL

No

https://plausible.io

Base URL for self-hosted instances

Development

git clone https://github.com/er1carruda/plausibleMCP.git
cd plausibleMCP
npm install
npm run build   # Compile TypeScript to dist/
npm start       # Run the server

License

MIT © Eric Arruda

Available Tools

14 tools
get_aggregateB

Get aggregate analytics metrics for a time period. Metrics can include: visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration, events. Date range examples: '7d', '30d', 'month', 'year', 'all', or ['2024-01-01', '2024-03-01'].

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

get_breakdown_by_browserA

Get visitors broken down by browser. Set include_version to true to also see browser versions.

Inputs: date_range (required), limit, filters, include_version.

get_breakdown_by_deviceB

Get visitors broken down by device type (Desktop, Mobile, Tablet).

Inputs: date_range (required), filters.

get_breakdown_by_locationA

Get visitors broken down by geographic location. Use country_filter to drill into regions of a specific country, or region_filter to drill into cities of a specific region.

Inputs: date_range (required), limit, filters, location_type, +2 more.

get_breakdown_by_osB

Get visitors broken down by operating system. Set include_version to true to see OS versions.

Inputs: date_range (required), limit, filters, include_version.

get_current_visitorsA

Get the number of people currently on the site (active in the last 5 minutes)

Inputs: no named parameters.

get_custom_property_breakdownC

Get breakdown by a custom event property. property_name is the key without the 'event:props:' prefix.

Inputs: date_range (required), property_name (required), limit, filters.

get_goal_conversionsB

Get conversion data for goals/events tracked in Plausible. Optionally filter to a specific goal by name.

Inputs: date_range (required), filters, goal_filter.

get_page_breakdownB

Get detailed metrics for a specific page or page pattern (supports wildcards like '/blog/**').

Inputs: page_path (required), date_range (required), filters, metrics.

get_timeseriesB

Get metrics broken down over time. Useful for trend analysis.

Inputs: date_range (required), filters, metrics, interval.

get_top_pagesC

Get top pages ranked by visitors. page_type: 'all' = any page view, 'entry' = landing pages, 'exit' = exit pages.

Inputs: date_range (required), limit, filters, page_type.

get_top_sourcesB

Get top traffic sources. source_type: 'source' = traffic source (e.g. Google), 'referrer' = full referrer URL, 'channel' = channel grouping (Organic Search, Direct, etc.).

Inputs: date_range (required), limit, filters, source_type.

get_utm_breakdownC

Get breakdown by UTM parameters to analyze campaign performance.

Inputs: utm_param (required), date_range (required), limit, filters.

plausible_queryB

Execute an arbitrary Plausible Stats API v2 query. Use this for advanced analysis not covered by the other tools. See Plausible API v2 docs for full query syntax.

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools target clearly distinct analytics dimensions or actions. A few boundaries could blur, especially get_aggregate vs get_timeseries, get_top_pages vs get_page_breakdown, and plausible_query as a catch-all, but the descriptions make the intended use reasonably clear.

    Naming Consistency4/5

    Almost all tools use a consistent snake_case get_* pattern. The only clear outlier is plausible_query, which drops the get_ verb but remains readable and idiomatic enough.

    Tool Count5/5

    Fourteen tools is well within the appropriate range for an analytics server. Each tool corresponds to a meaningful query dimension or convenience function, and the set does not feel bloated.

    Completeness5/5

    The surface covers aggregate metrics, timeseries, pages, sources, UTM, locations, devices, browsers, OS, goals, custom properties, realtime visitors, and an arbitrary query fallback. For a read-only analytics API, there are no obvious dead ends.

    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 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.
      6
      35 npm
      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.
      7
      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.
      61 npm
      MIT