# PostHog (verified)

Manage dashboards, insights, and feature flags directly within your product analytics workflow. Run complex HogQL queries, launch A/B experiments, and monitor application logs to drive data-driven de…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add PostHog

# Browse available tools
npx -y @smithery/cli@latest tool list PostHog

# Get full schema for a tool
npx -y @smithery/cli@latest tool get PostHog add-insight-to-dashboard

# Call a tool
npx -y @smithery/cli@latest tool call PostHog add-insight-to-dashboard '{}'
```

## Direct MCP Connection

Endpoint: `https://posthog.run.tools`

**Required config:**
- `api-key` (header) — PostHog Personal API Key

## Tools (46)

- `add-insight-to-dashboard` — Add an existing insight to a dashboard. Requires insight ID and dashboard ID. Optionally supports layout and color cust…
- `dashboard-create` — Create a new dashboard in the project. Requires name and optional description, tags, and other properties.
- `dashboard-delete` — Delete a dashboard by ID (soft delete - marks as deleted).
- `dashboard-get` — Get a specific dashboard by ID. The response will include insights / tiles that are on the dashboard.
- `dashboards-get-all` — Get all dashboards in the project with optional filtering. Can filter by pinned status, search term, or pagination.
- `dashboard-update` — Update an existing dashboard by ID. Can update name, description, pinned status or tags.
- `dashboard-reorder-tiles` — Reorder tiles (insights) on a dashboard. Provide an array of tile IDs in the desired order from top to bottom. First, u…
- `docs-search` — Use this tool to search the PostHog documentation for information that can help the user with their request. Use it as …
- `error-details` — Use this tool to get the details of an error in the project.
- `list-errors` — Use this tool to list errors in the project.
- `create-feature-flag` — Creates a new feature flag in the project. Once you have created a feature flag, you should: Ask the user if they want …
- `delete-feature-flag` — Delete a feature flag in the project.
- `feature-flag-get-all` — Get all feature flags in the project.
- `feature-flag-get-definition` — Get the definition of a feature flag. You can provide either the flagId or the flagKey. If you provide both, the flagId…
- `update-feature-flag` — Update a new feature flag in the project. To enable a feature flag, you should make sure it is active and the rollout p…
- `experiment-get-all` — Get all experiments in the project.
- `experiment-create` — Create a comprehensive A/B test experiment. PROCESS: 1) Understand experiment goal and hypothesis 2) Search existing fe…
- `experiment-delete` — Delete an experiment by ID.
- `experiment-update` — Update an existing experiment by ID. Can update name, description, lifecycle state, variants, metrics, and other proper…
- `experiment-get` — Get details of a specific experiment by ID.
- `experiment-results-get` — Get comprehensive experiment results including all metrics data (primary and secondary) and exposure data. This tool fe…
- `insight-create-from-query` — Create an insight from a query that you have previously tested with 'query-run'. You should check the query runs, befor…
- `insight-delete` — Delete an insight by ID (soft delete - marks as deleted).
- `insight-get` — Get a specific insight by ID.
- `insight-query` — Execute a query on an existing insight to get its results/data. Provide the insight ID to retrieve the current query re…
- `insights-get-all` — Get all insights in the project with optional filtering. Can filter by saved status, favorited status, or search term.
- `insight-update` — Update an existing insight by ID. Can update name, description, filters, and other properties. You should get the insig…
- `query-run` — You should use this to answer questions that a user has about their data and for when you want to create a new insight.…
- `query-generate-hogql-from-question` — This is a slow tool, and you should only use it once you have tried to create a query using the 'query-run' tool, or th…
- `organization-details-get` — Get the details of the active organization.
- `organizations-get` — Get the organizations the user has access to.
- `switch-organization` — Change the active organization from the default organization. You should only use this tool if the user asks you to cha…
- `projects-get` — Fetches projects that the user has access to in the current organization.
- `switch-project` — Change the active project from the default project. You should only use this tool if the user asks you to change the pr…
- `survey-create` — Creates a new survey in the project. Surveys can be popover or API-based and support various question types including o…
- `survey-get` — Get a specific survey by ID. Returns the survey configuration including questions, targeting, and scheduling details.
- `surveys-get-all` — Get all surveys in the project with optional filtering. Can filter by search term or use pagination.
- `survey-update` — Update an existing survey by ID. Can update name, description, questions, scheduling, and other survey properties.
- `survey-delete` — Delete a survey by ID (soft delete - marks as archived).
- `surveys-global-stats` — Get aggregated response statistics across all surveys in the project. Includes event counts (shown, dismissed, sent), u…
- `survey-stats` — Get response statistics for a specific survey. Includes detailed event counts (shown, dismissed, sent), unique responde…
- `logs-query` — Search and query logs in the project. Supports filtering by severity levels (trace, debug, info, warn, error, fatal), s…
- `logs-list-attributes` — List available log attributes in the project. Use this to discover what attributes you can filter on when querying logs…
- `logs-list-attribute-values` — Get possible values for a specific log attribute. Use this to discover what values exist for a given attribute key, whi…
- `entity-search` — Search for PostHog entities by name or description. Can search across multiple entity types including insights, dashboa…
- `demo-mcp-ui-apps` — Demo tool for testing MCP Apps SDK integration. Returns sample data that is displayed in an interactive UI app. Use thi…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get PostHog <tool-name>
```

## Resources

- `posthog://skills/nextjs-app-router` — PostHog integration for Next.js App Router applications. Run this command in Bash to install the skill.
- `posthog://skills/nextjs-pages-router` — PostHog integration for Next.js Pages Router applications. Run this command in Bash to install the skill.
- `posthog://skills/react-react-router-6` — PostHog integration for React Router v6 applications. Run this command in Bash to install the skill.
- `posthog://skills/react-react-router-7-framework` — PostHog integration for React Router v7 Framework mode applications. Run this command in Bash to install the skill.
- `posthog://skills/react-react-router-7-data` — PostHog integration for React Router v7 Data mode applications. Run this command in Bash to install the skill.
- `posthog://skills/react-react-router-7-declarative` — PostHog integration for React Router v7 Declarative mode applications. Run this command in Bash to install the skill.
- `posthog://skills/django` — PostHog integration for Django applications. Run this command in Bash to install the skill.
- `posthog://skills/flask` — PostHog integration for Flask applications. Run this command in Bash to install the skill.
- `posthog://skills/laravel` — PostHog integration for Laravel applications. Run this command in Bash to install the skill.
- `posthog://skills/identify-users` — How to identify users and associate events with them
- `ui://posthog/demo.html` — Demo app for testing MCP Apps SDK integration - displays SDK events and tool data

---
*Response truncated. Use `npx -y @smithery/cli@latest` for complete data.*
