# Pug

An MCP server for Claude Code connects an assistant to Pug product analytics. It can inspect project activity and create dashboards through chat requests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 117 repo stars
- Author: pug-sh
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pug-sh/pug
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/pug

## What it 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.

## Requirements
- Remote server: `https://api.pug.sh/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http pug https://api.pug.sh/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add pug --url https://api.pug.sh/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "pug": {
            "url": "https://api.pug.sh/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "pug": {
            "type": "http",
            "url": "https://api.pug.sh/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http pug https://api.pug.sh/mcp
```

## When to use it
- inspect project events and sessions
- trace user profiles and activity
- analyze a funnel or retention
- build an analytics dashboard

## Example prompts
- 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.

## Similar
- [signals-scout-anomaly-detection](https://affpapa.org/en/nevibecode/skills/signals-scout-anomaly-detection.md) — skill · 318 installs
- [signals-scout-observability-gaps](https://affpapa.org/en/nevibecode/skills/signals-scout-observability-gaps.md) — skill · 316 installs
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/tago-io-mcp-server.md) — MCP server · ★ 9 repo stars
- [analytics-pipeline-orchestration](https://affpapa.org/en/nevibecode/plugins/analytics-pipeline-orchestration.md) — plugin · ★ 451 repo stars
- [measure-dashboard-requirements](https://affpapa.org/en/nevibecode/skills/measure-dashboard-requirements.md) — skill · 847 installs
- [data-analyst](https://affpapa.org/en/nevibecode/agents/data-analyst.md) — subagent · 837 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
