# Pug

> Pug is an open-source MCP server for analytics and data. Query events, funnels and retention in Pug analytics, and edit dashboards. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, self-hosted
- **Website:** https://docs.pug.sh/mcp/
- **Repository:** https://github.com/pug-sh/pug
- **MCP Registry name:** sh.pug/pug
- **Categories:** analytics and data
- **Listing updated:** 2026-11-14

## About

Pug serves its analytics API as an MCP endpoint, so an agent can answer questions about product data without a hand-written query. Sixteen of its seventeen tools only read: running insights, browsing the raw event stream and looking up a single user. The seventeenth, upsert_dashboard, creates and edits dashboards.

The endpoint is a thin adapter: each call is replayed through the same handlers as an HTTP request, so validation and authorization behave identically. You sign in to Pug or use a private key, and connections act with the signed-in person's role.

It works with Claude's connector directory for Pug Cloud, or as a custom connector pointing at a self-hosted server. Pug itself is open source, built in Go on PostgreSQL, ClickHouse and NATS.

## Features

- **Insight queries:** Run funnels, retention, trends and segmentation.
- **Raw event browsing:** Look through the event stream.
- **User lookup:** Inspect a single profile.
- **Dashboard editing:** upsert_dashboard creates and edits dashboards.
- **Same permissions as HTTP:** Calls go through the normal authorization path.

## Good for

- Ask where users drop off in a funnel
- Compare retention across cohorts
- Look up what one user did
- Build a dashboard from a chat

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http pug https://api.pug.sh/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://api.pug.sh/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "pug": {
      "url": "https://api.pug.sh/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "pug": {
      "type": "http",
      "url": "https://api.pug.sh/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "pug": {
      "serverUrl": "https://api.pug.sh/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pug": {
      "type": "http",
      "url": "https://api.pug.sh/mcp"
    }
  }
}
```

## Tools

- `upsert_dashboard`: Creates and edits dashboards.

## FAQ

### How many tools are there?

Seventeen: sixteen read and one writes dashboards.

### How do I sign in?

Through Pug sign-in, or with a private key for a custom connector.

### Can I use a self-hosted Pug?

Yes, add your server's /mcp URL as a custom connector.

### Is Pug free?

Yes. Pug is open source, so you can use and self-host it for free.

### How do I add Pug to Claude Code?

Run this command in your terminal: claude mcp add --transport http pug https://api.pug.sh/mcp

### What are the best alternatives to Pug?

The closest alternatives to Pug are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, World Monitor and CompanyData.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/pug
