analytics
Plausible Analytics MCP, CLI, and Lua Integration for AI Agents
Plausible Analytics integration docs for AI agents: MCP gateway setup, Plausible Analytics CLI commands, Lua API reference, credentials, and function schemas.
8 functions 4 read 4 write API key auth
Plausible Analytics for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
plausible- route_slug
plausible- package
plausible- auth_strategy
api_keyAPI key- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Plausible Analytics CLIHeadless setup and direct function calls. Plausible Analytics MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Plausible Analytics MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Plausible Analytics.
Claude Code Plausible Analytics MCP setup for Claude Code. Cursor Plausible Analytics MCP setup for Cursor. Codex Plausible Analytics MCP setup for Codex. OpenAI Agents Plausible Analytics MCP setup for OpenAI Agents SDK. Claude Agent SDK Plausible Analytics MCP setup for Claude Agent SDK. Vercel AI SDK Plausible Analytics MCP setup for Vercel AI SDK. LangChain Plausible Analytics MCP setup for LangChain. LangGraph Plausible Analytics MCP setup for LangGraph. CrewAI Plausible Analytics MCP setup for CrewAI. MCP clients Plausible Analytics MCP setup for Generic MCP Clients.
Plausible Analytics CLI Matrix
Use these pages for direct Plausible Analytics CLI workflows in scripts, CI, cron, and agent wrappers.
CI Plausible Analytics CLI for CI. Cron Jobs Plausible Analytics CLI for cron jobs. Shell Scripts Plausible Analytics CLI for shell scripts. Headless Automation Plausible Analytics CLI for headless automation. Coding Agents Plausible Analytics CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
plausible.plausible_query_stats | Read read | 9 | Query website analytics from Plausible. Supports aggregate stats, timeseries, and breakdowns by dimension. Use dimensions to group results (e.g., by country, source, page). Omit dimensions for simple aggregate totals. |
plausible.plausible_realtime_visitors | Read read | 1 | Get the current number of realtime visitors on a website (visitors in the last 5 minutes). |
plausible.plausible_list_sites | Read read | 2 | List websites tracked in Plausible Analytics. Returns site domains you can query for analytics data. |
plausible.plausible_create_site | Write write | 2 | Register a new website for tracking in Plausible Analytics. |
plausible.plausible_delete_site | Write write | 1 | Remove a website from Plausible Analytics tracking. This deletes all associated data. |
plausible.plausible_list_goals | Read read | 1 | List all goals (conversion tracking) configured for a website in Plausible. |
plausible.plausible_create_goal | Write write | 3 | Create a conversion goal for a website in Plausible. Goals can track pageviews to specific pages or custom events. |
plausible.plausible_delete_goal | Write write | 2 | Delete a conversion goal from a website in Plausible. |