The PostHog node lets your agents capture custom events, query analytics with HogQL, and manage insights and cohorts.
PostHog requires two different keys for full functionality:
When connecting PostHog via Settings → Integrations, Spawnbase authenticates using a Personal API key (phx_...).
- Go to PostHog → Settings → Personal API Keys
- Click Create personal API key
- Grant scopes:
organization:read, project:read, event:read, event:write
- Use this key when connecting PostHog in Spawnbase
The Capture Event action requires a separate Project API key as an input field.
- Go to PostHog → Settings → Project API Key
- Copy the key (
phc_...) and paste it into the projectApiKey field in the node configuration
| Tool | Description |
|---|
query-run | Run trends, funnels, retention, lifecycle, paths, and stickiness queries |
query-generate-hogql-from-question | Generate and run HogQL queries from natural language |
query-trends | Query trend data for events over time |
query-funnel | Analyze conversion funnels |
query-retention | Analyze user retention |
query-lifecycle | Query user lifecycle stages |
query-paths | Analyze user navigation paths |
entity-search | Search insights, dashboards, experiments, flags, cohorts, and more by name |
| Tool | Description |
|---|
insight-create-from-query | Create a new insight from a query |
insight-get | Get a specific insight by ID |
insight-update | Update an existing insight |
insights-get-all | List all insights in the project |
dashboard-create | Create a new dashboard |
dashboard-get | Get a dashboard with all tiles |
dashboards-get-all | List all dashboards |
| Tool | Description |
|---|
create-feature-flag | Create a feature flag with targeting rules |
update-feature-flag | Update flag rollout, filters, or variants |
feature-flag-get-all | List all feature flags |
experiment-create | Create an A/B experiment |
experiment-results-get | Get experiment results |
| Tool | Description |
|---|
persons-list | List persons with filters |
persons-retrieve | Get a specific person’s details |
cohorts-create | Create a static or dynamic cohort |
cohorts-list | List all cohorts |
| Tool | Description |
|---|
alert-create | Create threshold or anomaly detection alerts on insights |
alert-simulate | Preview how a detector would perform on historical data |
alerts-list | List all alerts |
| Tool | Description |
|---|
survey-create | Create a survey |
surveys-get-all | List all surveys |
annotation-create | Mark deployments or changes on charts |
activity-logs-list | View who changed what and when |
docs-search | Search PostHog documentation |
- Capture Event uses the Project API key (
phc_...), not the Personal API key — this trips up most users.
- Create Query accepts HogQL — useful for flexible analytics queries your agent can construct dynamically.
- Most read actions require
organization and project_id fields — these load dynamically from your connected account.
| |
|---|
| Server URL | https://mcp.posthog.com/mcp |
| Transport | Streamable HTTP |
| Docs | PostHog MCP |
See Node Configuration Troubleshooting for common issues like empty dropdowns and connection errors.