plausible-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Surendran B
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: plausible-mcp
3
+ Version: 0.1.0
4
+ Summary: Plausible Analytics MCP server: privacy-first website statistics, real-time visitors, breakdowns, and trendlines for AI agents.
5
+ Author-email: Surendran B <reachsuren@gmail.com>
6
+ License-Expression: MIT
7
+ Keywords: mcp,plausible,analytics,stats,agents,fastmcp
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: mcp>=1.2.0
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest>=8.0.0; extra == "test"
20
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
21
+ Dynamic: license-file
22
+
23
+ # plausible-mcp
24
+
25
+ [![PyPI version](https://img.shields.io/pypi/v/plausible-mcp.svg)](https://pypi.org/project/plausible-mcp/)
26
+ [![npm version](https://img.shields.io/npm/v/plausible-analytics-mcp.svg)](https://www.npmjs.com/package/plausible-analytics-mcp)
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
28
+
29
+ Fast, privacy-first [Plausible Analytics](https://plausible.io) Model Context Protocol (MCP) server for AI coding agents and LLM harnesses. Works seamlessly with both Plausible Cloud and self-hosted Plausible installations.
30
+
31
+ ## Quick Start
32
+
33
+ ### Run with uvx (Python)
34
+ ```bash
35
+ export PLAUSIBLE_API_KEY="your_api_key_here"
36
+ uvx plausible-mcp
37
+ ```
38
+
39
+ ### Run with npx (Node / npm bridge)
40
+ ```bash
41
+ export PLAUSIBLE_API_KEY="your_api_key_here"
42
+ npx -y plausible-analytics-mcp
43
+ ```
44
+
45
+ ## Environment Configuration
46
+
47
+ | Variable | Description | Default |
48
+ | :--- | :--- | :--- |
49
+ | `PLAUSIBLE_API_KEY` | Your Plausible Stats/Sites API token | Required (or pass via tool `token` arg) |
50
+ | `PLAUSIBLE_BASE_URL` | Base URL for self-hosted Plausible | `https://plausible.io` |
51
+ | `DO_NOT_TRACK` | Set to `1` to disable anonymous telemetry | `0` |
52
+
53
+ ### Getting an API Key
54
+ 1. Log in to Plausible (Cloud or your self-hosted instance).
55
+ 2. Go to **Settings** (user profile menu) -> **API Keys**.
56
+ 3. Click **+ New Key**, name it `mcp-agent`, and copy the token.
57
+ 4. Export as `PLAUSIBLE_API_KEY="your_token"`.
58
+
59
+ ## Available Tools
60
+
61
+ | Tool | Description |
62
+ | :--- | :--- |
63
+ | `get_aggregate_stats(site_id, date_range="30d", metrics=None, token=None)` | High-level visitor, pageview, bounce rate, and session duration totals |
64
+ | `get_breakdown(site_id, property_name="event:page", date_range="30d", limit=20, token=None)` | Segment metrics by pages, traffic sources, countries, browsers, OS, devices |
65
+ | `get_realtime_visitors(site_id, token=None)` | Current count of active visitors on the site right now |
66
+ | `get_timeseries(site_id, date_range="30d", interval="date", token=None)` | Daily or monthly trendline data points for chart generation |
67
+ | `doctor(token=None)` | Test Plausible API connectivity and validate the configured API token |
68
+ | `skills_list()` | List dynamic analytics playbooks and methodology guides |
69
+ | `skill_read(name)` | Fetch full markdown playbook by name (e.g. `plausible-overview`, `analytics-recipes`) |
70
+ | `check_for_updates()` | Check PyPI for newer versions and view upgrade commands |
71
+
72
+ ## Error Absorption Standard
73
+
74
+ Errors returned to agents are explicitly classified:
75
+ - `[INPUT_FIXABLE]`: Parameter errors (e.g., misspelled site_id, unknown dimension). Fix arguments and retry.
76
+ - `[ENVIRONMENT_FIXABLE: STOP & ASK HUMAN]`: Missing, expired, or unauthorized API key. Prompt user with guided setup steps.
77
+ - `[TRANSIENT]`: Upstream rate limits (HTTP 429) or network hiccups. Wait briefly and retry.
78
+
79
+ ## MCP Client Setup
80
+
81
+ ### Claude Desktop (`claude_desktop_config.json`)
82
+ ```json
83
+ {
84
+ "mcpServers": {
85
+ "plausible": {
86
+ "command": "uvx",
87
+ "args": ["plausible-mcp"],
88
+ "env": {
89
+ "PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ Or using the npm bridge:
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "plausible": {
101
+ "command": "npx",
102
+ "args": ["-y", "plausible-analytics-mcp"],
103
+ "env": {
104
+ "PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
105
+ }
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ## License
112
+
113
+ MIT License. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,91 @@
1
+ # plausible-mcp
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/plausible-mcp.svg)](https://pypi.org/project/plausible-mcp/)
4
+ [![npm version](https://img.shields.io/npm/v/plausible-analytics-mcp.svg)](https://www.npmjs.com/package/plausible-analytics-mcp)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+
7
+ Fast, privacy-first [Plausible Analytics](https://plausible.io) Model Context Protocol (MCP) server for AI coding agents and LLM harnesses. Works seamlessly with both Plausible Cloud and self-hosted Plausible installations.
8
+
9
+ ## Quick Start
10
+
11
+ ### Run with uvx (Python)
12
+ ```bash
13
+ export PLAUSIBLE_API_KEY="your_api_key_here"
14
+ uvx plausible-mcp
15
+ ```
16
+
17
+ ### Run with npx (Node / npm bridge)
18
+ ```bash
19
+ export PLAUSIBLE_API_KEY="your_api_key_here"
20
+ npx -y plausible-analytics-mcp
21
+ ```
22
+
23
+ ## Environment Configuration
24
+
25
+ | Variable | Description | Default |
26
+ | :--- | :--- | :--- |
27
+ | `PLAUSIBLE_API_KEY` | Your Plausible Stats/Sites API token | Required (or pass via tool `token` arg) |
28
+ | `PLAUSIBLE_BASE_URL` | Base URL for self-hosted Plausible | `https://plausible.io` |
29
+ | `DO_NOT_TRACK` | Set to `1` to disable anonymous telemetry | `0` |
30
+
31
+ ### Getting an API Key
32
+ 1. Log in to Plausible (Cloud or your self-hosted instance).
33
+ 2. Go to **Settings** (user profile menu) -> **API Keys**.
34
+ 3. Click **+ New Key**, name it `mcp-agent`, and copy the token.
35
+ 4. Export as `PLAUSIBLE_API_KEY="your_token"`.
36
+
37
+ ## Available Tools
38
+
39
+ | Tool | Description |
40
+ | :--- | :--- |
41
+ | `get_aggregate_stats(site_id, date_range="30d", metrics=None, token=None)` | High-level visitor, pageview, bounce rate, and session duration totals |
42
+ | `get_breakdown(site_id, property_name="event:page", date_range="30d", limit=20, token=None)` | Segment metrics by pages, traffic sources, countries, browsers, OS, devices |
43
+ | `get_realtime_visitors(site_id, token=None)` | Current count of active visitors on the site right now |
44
+ | `get_timeseries(site_id, date_range="30d", interval="date", token=None)` | Daily or monthly trendline data points for chart generation |
45
+ | `doctor(token=None)` | Test Plausible API connectivity and validate the configured API token |
46
+ | `skills_list()` | List dynamic analytics playbooks and methodology guides |
47
+ | `skill_read(name)` | Fetch full markdown playbook by name (e.g. `plausible-overview`, `analytics-recipes`) |
48
+ | `check_for_updates()` | Check PyPI for newer versions and view upgrade commands |
49
+
50
+ ## Error Absorption Standard
51
+
52
+ Errors returned to agents are explicitly classified:
53
+ - `[INPUT_FIXABLE]`: Parameter errors (e.g., misspelled site_id, unknown dimension). Fix arguments and retry.
54
+ - `[ENVIRONMENT_FIXABLE: STOP & ASK HUMAN]`: Missing, expired, or unauthorized API key. Prompt user with guided setup steps.
55
+ - `[TRANSIENT]`: Upstream rate limits (HTTP 429) or network hiccups. Wait briefly and retry.
56
+
57
+ ## MCP Client Setup
58
+
59
+ ### Claude Desktop (`claude_desktop_config.json`)
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "plausible": {
64
+ "command": "uvx",
65
+ "args": ["plausible-mcp"],
66
+ "env": {
67
+ "PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ Or using the npm bridge:
75
+ ```json
76
+ {
77
+ "mcpServers": {
78
+ "plausible": {
79
+ "command": "npx",
80
+ "args": ["-y", "plausible-analytics-mcp"],
81
+ "env": {
82
+ "PLAUSIBLE_API_KEY": "YOUR_PLAUSIBLE_API_KEY"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ ## License
90
+
91
+ MIT License. See [LICENSE](LICENSE) for details.
@@ -0,0 +1,44 @@
1
+ [project]
2
+ name = "plausible-mcp"
3
+ version = "0.1.0"
4
+ description = "Plausible Analytics MCP server: privacy-first website statistics, real-time visitors, breakdowns, and trendlines for AI agents."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "MIT"
8
+ authors = [{ name = "Surendran B", email = "reachsuren@gmail.com" }]
9
+ keywords = ["mcp", "plausible", "analytics", "stats", "agents", "fastmcp"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.10",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ ]
18
+ dependencies = [
19
+ "mcp>=1.2.0",
20
+ ]
21
+
22
+ [project.optional-dependencies]
23
+ test = [
24
+ "pytest>=8.0.0",
25
+ "pytest-asyncio>=0.23.0",
26
+ ]
27
+
28
+ [project.scripts]
29
+ plausible-mcp = "plausible_mcp.server:main"
30
+ plausible-analytics-mcp = "plausible_mcp.server:main"
31
+
32
+ [build-system]
33
+ requires = ["setuptools>=68", "wheel"]
34
+ build-backend = "setuptools.build_meta"
35
+
36
+ [tool.setuptools.packages.find]
37
+ where = ["src"]
38
+
39
+ [tool.setuptools.package-data]
40
+ plausible_mcp = ["skills/*.md", "py.typed"]
41
+
42
+ [tool.pytest.ini_options]
43
+ asyncio_mode = "auto"
44
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Plausible Analytics MCP server for AI agents."""
2
+
3
+ __version__ = "0.1.0"