PostHog MCP Server
Official PostHog MCP server providing analytics, feature flags, experiments, dashboards, surveys, and error tracking via Cloudflare Workers
Score Breakdown
Server Info
- Package
- posthog-mcp-monorepo
- Registry
- npm
- Repository
- posthog/mcp
- Maintainer
- PostHogVendor
- Category
- Analytics & Data
- Tags
- product-analyticsfeature-flagsexperiments
- Last Scanned
- 7 Apr 2026
Findings
6 issuesAuthentication & Identity
MEDIUMHTTP/SSE transport supports per-request credentials
Runs as a Cloudflare Worker with HTTP/SSE transport (not stdio). Authenticates users via Bearer token in the Authorization header, which is a PostHog personal API key. The token is used directly to call the PostHog API. User state (active project/org) is cached in Cloudflare Durable Objects per user hash. INKEEP_API_KEY is a server-side env var for docs search, not a user credential. No MCP OAuth implementation.
Implement the MCP OAuth spec so users authenticate directly without platform mediation.
Tool Schema Quality
MEDIUMOnly 7 of 44 schemas have parameter constraints
Most schemas lack maxLength, enum, or pattern constraints on string parameters.
Add constraints to string parameters, especially on write operations.
LLM Safety
MEDIUM2 tool descriptions are too vague
Short or generic descriptions make tool selection unreliable.
Expand descriptions with specific actions, data types, and side effects.
HIGHTool descriptions contain instructional language
Descriptions include directives that could influence LLM behavior beyond tool selection.
Remove instructional language. Descriptions should be purely factual.
Data Exposure
MEDIUM5 list operations lack pagination
dashboards-get-all, insights-get-all, feature-flag-get-all, and list tools support pagination via limit/offset parameters. Several list tools (experiment-get-all, organizations-get, projects-get, surveys-get-all, event-definitions-list) return full result sets. No explicit field selection; full records are returned. The API client handles response formatting.
Add limit/offset or cursor-based pagination.
LOWNo field selection on responses
Responses return full records rather than projected fields.
Implement field selection to return only relevant fields.
Tools
44 total| Name | Description | Risk |
|---|---|---|
| add-insight-to-dashboard | Add an existing insight to a dashboard. Requires insight ID and dashboard ID. Optionally supports layout and color customization. | write |
| dashboard-create | Create a new dashboard in the project. Requires name and optional description, tags, and other properties. | write |
| dashboard-delete | Delete a dashboard by ID (soft delete - marks as deleted). | write |
| dashboard-get | Get a specific dashboard by ID. The response will include insights / tiles that are on the dashboard. | read |
| dashboards-get-all | Get all dashboards in the project with optional filtering. Can filter by pinned status, search term, or pagination. | read |
| dashboard-update | Update an existing dashboard by ID. Can update name, description, pinned status or tags. | write |
| docs-search | Use this tool to search the PostHog documentation for information that can help the user with their request. Use it as a fallback when you cannot answer the user's request using other tools in this MCP. Only use this tool for PostHog related questions. | read |
| error-details | Use this tool to get the details of an error in the project. | read |
| list-errors | Use this tool to list errors in the project. | read |
| 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 to add it to their codebase, Use the "search-docs" tool to find documentation on how to add feature flags to the codebase (search for the right language / framework), Clarify where it should be added and then add it. | write |
| delete-feature-flag | Delete a feature flag in the project. | admin |
| feature-flag-get-all | Get all feature flags in the project with optional filtering. | read |
| feature-flag-get-definition | Get the definition of a specific feature flag. | read |
| update-feature-flag | Update an existing feature flag in the project. | write |
| experiment-get-all | Get all experiments in the project. | read |
| experiment-create | Create a new experiment in the project. | write |
| experiment-delete | Delete an experiment in the project. | admin |
| experiment-update | Update an existing experiment in the project. | write |
| experiment-get | Get details of a specific experiment. | read |
| experiment-results-get | Get comprehensive results for a specific experiment. | read |
| insight-create-from-query | Create a new insight from a query. | write |
| insight-delete | Delete an insight by ID. | admin |
| insight-get | Get a specific insight by ID. | read |
| insight-query | Run an insight query. | read |
| insights-get-all | Get all insights in the project. | read |
| insight-update | Update an existing insight. | write |
| query-run | Run a query against PostHog data. | read |
| query-generate-hogql-from-question | Generate HogQL from a natural language question. | read |
| get-llm-total-costs-for-project | Get total LLM costs for the project. | read |
| organization-details-get | Get details about the active organization. | read |
| organizations-get | Get all organizations the user belongs to. | read |
| switch-organization | Switch the active organization. | write |
| projects-get | Get all projects in the active organization. | read |
| event-definitions-list | List event definitions in the project. | read |
| properties-list | List properties in the project. | read |
| property-definitions | Get property definitions for the project. | read |
| switch-project | Switch the active project. | write |
| survey-create | Create a new survey in the project. | write |
| survey-get | Get a specific survey by ID. | read |
| surveys-get-all | Get all surveys in the project. | read |
| survey-update | Update an existing survey. | write |
| survey-delete | Delete a survey by ID. | admin |
| surveys-global-stats | Get global survey statistics. | read |
| survey-stats | Get statistics for a specific survey. | read |
Deploy PostHog MCP Server securely
CompleteFlow adds per-user authentication, permission scoping, and audit logging to any MCP server out of the box.
Deploy on CompleteFlow