Skip to content

Marketing & research integration

PostHog MCP server for Claude, Codex and Cursor

Explore product analytics, feature flags and error insights. Connect the PostHog MCP server to Toolstile once, then choose which of its tools Claude Code, Codex, Cursor and Claude Desktop may use.

Free plan available. Server credentials stay in Toolstile, not in agent configs.

On this page

What your AI apps can do with PostHog

  • Query product analytics
  • Work with feature flags and error insights

PostHog MCP tools

44 tools, taken from the publisher's documentation on 29 October 2026. The server decides what it offers and can add or rename tools at any time; after you connect, Toolstile shows the current list.

ToolWhat it does
docs-searchSearches PostHog documentation
organizations-getLists organizations and projects you can access
projects-getLists organizations and projects you can access
query-trendsRuns trends, funnel or retention queries
query-funnelRuns trends, funnel or retention queries
query-retentionRuns trends, funnel or retention queries
insights-listLists saved insights, reads one, or runs its query
insight-getLists saved insights, reads one, or runs its query
insight-queryLists saved insights, reads one, or runs its query
execute-sqlRuns a SQL query
dashboards-get-allLists dashboards or reads one
dashboard-getLists dashboards or reads one
insight-createCreates an insight or dashboard
dashboard-createCreates an insight or dashboard
dashboard-deleteDeletes a dashboard or insight
insight-deleteDeletes a dashboard or insight
query-error-tracking-issues-listLists error tracking issues
query-error-tracking-issueReads an issue and its events, including stack traces
query-error-tracking-issue-eventsReads an issue and its events, including stack traces
error-tracking-issues-partial-updateUpdates an issue, such as its status
error-tracking-assignment-rules-createCreates a rule that assigns future issues
feature-flag-get-allLists flags or reads one
feature-flag-get-definitionLists flags or reads one
create-feature-flagCreates a feature flag
update-feature-flagChanges a flag's settings or release rules
feature-flag-rules-updateChanges a flag's settings or release rules
feature-flag-roll-out-to-everyoneRolls a flag out to all users
delete-feature-flagDeletes one or many flags
feature-flags-bulk-delete-createDeletes one or many flags
experiment-listLists experiments or reads results
experiment-results-getLists experiments or reads results
experiment-launchLaunches, ends or ships an experiment variant
experiment-endLaunches, ends or ships an experiment variant
experiment-ship-variantLaunches, ends or ships an experiment variant
query-session-recordings-listFinds and reads session recordings
session-recording-getFinds and reads session recordings
session-recording-bulk-deleteDeletes session recordings in bulk
query-logsQueries or counts logs
logs-countQueries or counts logs
surveys-get-allLists surveys or reads responses
surveys-responses-listLists surveys or reads responses
persons-listLists people or reads one person's properties
persons-retrieveLists people or reads one person's properties
persons-bulk-deleteDeletes persons in bulk

Suggested starting access

Toolstile read each PostHog tool's description and wrote these starting selections by hand. They are a suggestion reviewed by Toolstile, not a guarantee: PostHog decides what each tool does and can change it, so check that a selection fits each app before you save it.

Read dashboards, flags and experiments

Search PostHog's docs and read projects, dashboards, feature flags and the experiment list. Trend, funnel and retention queries, saved insights, experiment results, error-tracking queries and raw SQL wait for approval.

  • Allow: docs-search, organizations-get, projects-get, dashboards-get-all, dashboard-get, feature-flag-get-all, feature-flag-get-definition, experiment-list
  • Require approval: execute-sql, query-error-tracking-issue, query-error-tracking-issue-events, insight-query, insights-list, insight-get, query-trends, query-funnel, query-retention, experiment-results-get, query-error-tracking-issues-list

In the access editor, choosing a suggestion adds the listed tools this server offers to your draft. Existing access stays as it is, blocks and approval requirements stay in force, and the suggestion doesn't grant tool names the server adds later. Nothing is saved until you choose Save changes.

Suggested access for each AI app

The documentation this list comes from doesn't mark PostHog's tools as read-only or destructive. Read each tool's description and decide per app before allowing it.

Coding agent in Claude Code or Cursor. Allow the read tools so the agent can look things up without stopping, and require approval for tools that change shared data.

Chat or research app in Claude Desktop. Allow reading and searching. Allow writes only where you want the app to act for you.

Unattended agent, such as a scheduled Codex job. No one is watching the session, so keep it narrow: allow what the job needs, require approval for changes and block the rest.

Blocked tools are removed from the tool list an app sees, so it won't try them. Because rules apply per app, the same PostHog connection can be broad in one app and read-only in another, and the credential stays in Toolstile instead of each app's config file.

How it works with Toolstile

  1. Connect once. Add PostHog to a workspace (browser sign-in). Toolstile keeps the credential, so no agent config holds it.
  2. Choose access per app. Give Claude Code every PostHog tool, give Cursor only the read tools, or keep PostHog away from an app entirely.
  3. Share approved accounts. Teammates use the connection without copying tokens, and you can remove access in one place.
  4. Review activity. See which app called which tool and when, so you can tighten access with evidence.

Add the PostHog MCP server to an AI app

Through Toolstile, every AI app uses one gateway entry, whichever servers you connect. In Claude Code:

Shell
claude mcp add --transport http toolstile 'https://mcp.toolstile.com/mcp'

Then connect PostHog in your workspace and choose which of its tools that app may use. Client setup covers Codex, Cursor and Claude Desktop.

To connect directly instead, add the PostHog endpoint to each app separately. In Claude Code:

Shell
claude mcp add --transport http posthog 'https://mcp.posthog.com/mcp'

In Cursor's mcp.json:

JSON
{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp"
    }
  }
}

Some servers accept only clients they have approved, or need a token header. Check the PostHog MCP documentation for what your client needs.

Before you connect

A PostHog account. Sign-in selects the accessible organization and region.

Server details

DetailValue
PublisherPostHog
Endpointhttps://mcp.posthog.com/mcp
AuthenticationBrowser sign-in
CategoriesMarketing & research, Development
Tool list44 tools, observed 29 October 2026 (docs)

PostHog MCP documentation