mcpField
P
plausible-mcp-server

plausible-mcp-server

Local
github.com/friendlygeorgeData & Analytics0Updated 21w ago

About plausible-mcp-server

plausible-mcp-server connects MCP-compatible assistants to Plausible Analytics for querying website traffic, conversions, and site details. Its tools cover real-time counts, time-series, and breakdowns across traffic, events, goals, and devices.

Key features

  1. 01Flexible metrics, dimensions, filters, and date ranges
  2. 02Real-time visitor counts
  3. 03Traffic and UTM breakdowns
  4. 04Time-series queries
  5. 05Event, goal, and conversion analytics
  6. 06Entry, exit, and device reports

Use cases

  1. 01Review traffic sources for a date range
  2. 02Check current visitor counts
  3. 03Compare goal conversions and custom events
  4. 04Inspect landing pages and device breakdowns

MCP support

Exposes 12 Plausible Analytics tools to MCP clients, including statistics queries, breakdowns, site management, and conversion reporting. Requires a Plausible API key and supports a custom API base for self-hosted instances.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"friendlygeorge-plausible": {
"command": "npx",
"args": [
"-y",
"plausible-mcp-server"
]
}
}
}
Run commandnpx -y plausible-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmplausible-mcp-server1.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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

12 Tools

ToolDescription
query_statsFull flexible stats query (the main endpoint)
realtime_visitorsCurrent real-time visitor count
get_breakdownBreakdown by any dimension (source, page, country, etc.)
get_timeseriesMetrics over time with configurable intervals
list_sitesList all sites in your account
get_siteGet site details
get_custom_eventsCustom event breakdown
get_entry_pagesTop landing pages
get_exit_pagesTop exit pages
get_utm_statsUTM campaign/source/medium breakdowns
get_device_statsBrowser, OS, screen size breakdowns
get_goalsConversion 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

VariableRequiredDefaultDescription
PLAUSIBLE_API_KEYYes—Your Plausible API key
PLAUSIBLE_API_BASENohttps://plausible.ioAPI 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.