Pug — Claude Code MCP server: analytics and setup
An MCP server for Claude Code connects an assistant to Pug product analytics. It can inspect project activity and create dashboards through chat requests.
AGPL-3.0 ★ 117 updated 2026-11-16
claude mcp add --transport http pug https://api.pug.sh/mcpWhat Pug does
Pug lets an AI assistant read product data, including events, sessions, profiles, insights, and existing dashboards. The server can also create or edit dashboards, while analytics requests can cover funnels, retention, and trends.
Pug Cloud uses the endpoint https://api.pug.sh/mcp. Authentication works through a Pug sign-in or a project's private prv_ key sent in the x-api-key header. For a self-hosted server to offer sign-in, set PUG_API_BASE_URL.
Add the server to Claude Code over HTTP. A local Pug deployment uses PostgreSQL, NATS, and ClickHouse.
What it helps with
- inspect project events and sessions
- trace user profiles and activity
- analyze a funnel or retention
- build an analytics dashboard
Example prompts for the agent
- Show event trends for this project over the selected period.
- Analyze the funnel from product view to purchase.
- Create a dashboard with a retention chart and a short results note.
How to install Pug
Platform CLI: remote server
claude mcp add --transport http pug https://api.pug.sh/mcpPlatform CLI: remote server
codex mcp add pug --url https://api.pug.sh/mcpConfig file
{
"mcpServers": {
"pug": {
"url": "https://api.pug.sh/mcp"
}
}
}Config file
{
"servers": {
"pug": {
"type": "http",
"url": "https://api.pug.sh/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http pug https://api.pug.sh/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Pug
How do I install Pug in Claude Code?
Run claude mcp add --transport http pug https://api.pug.sh/mcp. Then authenticate with a Pug sign-in or a project's private key.
What does Pug do?
It gives an AI assistant access to Pug events, sessions, profiles, insights, and dashboards. The server can also create and modify dashboards.
What does Pug need to work?
Connect with a Pug sign-in or pass a project private prv_ key in the x-api-key header. Self-hosted sign-in requires PUG_API_BASE_URL; a local Pug deployment uses PostgreSQL, NATS, and ClickHouse.