> Godmode v0.20.0 documentation · Reviewed 2026-11-19
> Source: https://godmode.build/docs/provider-posthog

# PostHog

Understand how people use your product and manage feature flags.

## Connect PostHog

Keep a working [native login](/docs/credentials#keep-a-working-login), or save the keys below.

```sh
godmode setup posthog
```

## Account access

A personal API key accesses private analytics, insights, flags and other APIs using your account permissions and the key's scopes. The MCP preset is convenient for broad agent use; confirm its organization/project selection. Use the matching US, EU or self-hosted instance. A project ingestion key is a different credential.

## Add credentials

Save only the keys your product needs.

### Personal API key

Let your agent query product analytics and manage PostHog resources.

**[Visit PostHog's personal API keys](https://app.posthog.com/settings/user-api-keys?preset=mcp_server)**

1. Select **Create key**; the form is already filled in.
2. Copy the key (phx_…) from the dialog.

Save as `POSTHOG_PERSONAL_API_KEY` in Godmode.

## Check access

- Use PostHog's API to read the intended project and run a small query or list the intended resource. Check the endpoint's required scope before managing flags, dashboards or experiments. Keep the personal key server-side; it is not a browser analytics key.

## Restore access

- Check the instance, project and scopes first. Create a replacement for an invalid key and save it with godmode set POSTHOG_PERSONAL_API_KEY. If rolling a legacy key, the old value is invalidated; update every consumer that used it.

## Provider docs

- [Personal API keys](https://posthog.com/docs/api/personal-api-keys)
- [API scopes](https://posthog.com/docs/api/scopes)
- [API overview](https://posthog.com/docs/api)

Source: Godmode v0.20.0 provider catalog · 2026-11-13.
