Skip to content

Blog

PostHog MCP setup: check projects and analytics queries

Start with a known insight. Matching the project, time range and counting method makes the result possible to verify.

Published on · by tracevero · Reading time 3 minutes (574 words)

Two queries can name the same event and still return different numbers. One might count events while another counts people; internal test traffic may be excluded from only one view. Record these conditions before your first MCP request. An existing insight makes a useful reference because its settings can be inspected separately.

Connect the hosted PostHog endpoint

PostHog documents https://mcp.posthog.com/mcp as its shared server endpoint. Authentication routes the account to its US or EU data region. Put the following HTTP example in .vscode/mcp.json. If the file already contains connections, add this entry inside the existing servers object.

{
  "servers": {
    "posthog": {
      "type": "http",
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Start the server in the editor and follow the sign-in flow. Then verify the selected organisation and project. The VS Code setup guide explains the surrounding configuration. A similar project name is insufficient evidence: record the project identifier as well.

Check the counting method before the result

An insight control sheet
FieldWhat to recordWhy it matters
ProjectIdentifier of the test projectEvent names can appear in several projects
EventExact name and property filtersSimilar events are different populations
Time rangeFixed boundaries and time zoneRelative windows move
MeasureEvents or unique peopleThe numbers answer different questions
Make a number traceable 1. Project Record the identifier 2. Definition Record filters and measure 3. Result Check against the insight
Choose the definition first, then compare the same slice of data.

Use an existing insight as a control

  1. Open a saved insight for a familiar event. Record its project identifier, date boundaries, filters and counting method. Avoid an incomplete current minute for the first attempt.

  2. Inspect the connected server’s tool list. Explicitly request a read of the selected insight or an equivalent query without saving a new insight.

  3. Compare a daily value or a known property as well as the total. If they differ, check the definition of the measure first, before changing the query.

  4. Record the difference and its explanation. After a configuration change, repeat the test using the same inputs so that you can distinguish the effect of the change from a changing dataset.

Plan reads and changes separately

The documented PostHog connection also exposes write operations, including feature flag management and changes across other products. A useful initial read test does not require these changes. However, asking for read-only behaviour in a prompt does not replace account permissions. Check permissions and the approval controls available in the client before expanding the task.

The read access guide explains this distinction. The monitoring comparison places product analytics alongside log data. The PostHog registry search provides additional declared entries and sources.

Do EU accounts need another MCP endpoint?
The PostHog documentation names a shared endpoint. Authentication routes the account to its data region. You should still verify which project was selected.
Why does the number differ from my dashboard?
Compare the event definition, property filters, time window and counting method. A dashboard can also apply filters that differ from an individual insight.
Is every connection automatically read-only?
No. The documented functions include changes. Define the permitted tasks and account permissions separately.
Should I create a new insight for the test?
Prefer an existing control point. Saving a new analysis is an additional change and is unnecessary for the first comparison of results.

Documentation read on 3 October 2026. The tests described here are suggestions for your own environment.

  1. PostHog: MCP connection
    Show retrieval commandcurl -s https://posthog.com/docs/model-context-protocol
  2. PostHog: VS Code setup
    Show retrieval commandcurl -s https://posthog.com/docs/model-context-protocol/vscode
  3. PostHog: insights
    Show retrieval commandcurl -s https://posthog.com/docs/product-analytics/insights

Put it into practice

All posts

tracevero · https://tracevero.com/blog/posthog-mcp-setup