Plausible Mcp Server

io.github.friendlygeorge由 GitHub 账号 friendlygeorge 发布v1.0.0更新于 Oct 28, 2026

MCP server for Plausible Analytics — privacy-friendly web analytics. 12 tools for traffic, conver...

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

面向 Plausible Analytics 的 MCP 服务器,让助手查询流量、转化、来源和设备分布等网站分析数据。

可以做什么
  • 按指定指标、维度、过滤条件和日期范围执行灵活的数据查询
  • 获取实时访客数,以及按日、周、月或小时间隔的时间序列数据
  • 按来源、页面、国家、浏览器、操作系统、屏幕尺寸和 UTM 活动拆分流量
  • 查看自定义事件、入口页与退出页,以及各目标的转化统计
  • 列出并查看账户中的站点信息
适用场景
适合需要让助手直接回答 Plausible 账户中网站流量与转化问题(如主要来源、访客数、时间趋势、目标转化率)而无需打开后台的场景。
运行要求
以本地 Node.js 进程运行(npm 包 plausible-mcp-server,或使用 npm 与 tsc 从源码构建)。需要一个 Plausible Analytics 账户(云端或自托管)以及 API 密钥,通过环境变量 PLAUSIBLE_API_KEY 提供;自托管实例还需设置 PLAUSIBLE_API_BASE。需要能访问 Plausible API 的网络。
安装前请注意
需要 Plausible API 密钥(PLAUSIBLE_API_KEY),可读取你的分析账户数据,请勿写入共享配置。所列工具仅读取分析数据,但仍应确认密钥权限范围。自托管时 PLAUSIBLE_API_BASE 决定请求发往哪台服务器,只应指向可信实例。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Plausible Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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):

json
{  "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:

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

Build from source

bash
git clone https://github.com/friendlygeorge/plausible-mcp-server.gitcd plausible-mcp-servernpm installnpx 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

来源:README.md,提交 cd8ca3b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。