How to connect PostHog to OpenClaw
Connect PostHog to OpenClaw with ClawLink: paste your PostHog key once and 686 tools work from chat. No MCP server to run, nothing stored on your machine.

Track user behavior and feature flags. Once connected, OpenClaw can read and act on PostHog from chat — pairing, token refresh, and tool wiring handled for you.
The usual route to PostHog access for OpenClaw is an MCP server you configure and keep running, plus your own OAuth app or API keys. ClawLink gives OpenClaw a more practical PostHog setup: install one ClawHub skill, connect PostHog in the browser, and OpenClaw can call real PostHog actions from any chat surface with no auth, token refresh, or tool wiring to build yourself.
Setup
It takes three steps to connect OpenClaw to PostHog.
- 1
Install the plugin
Paste the setup prompt into OpenClaw, or install from the terminal and ask OpenClaw to pair:
openclaw plugins install clawhub:clawlink-plugin - 2
Connect PostHog
Paste your API key in the dashboard.
- 3
Use it from chat
Ask OpenClaw: "What can you do with PostHog?"
Install by command
The setup prompt above does all of this in one paste. By hand, it is one install command plus a browser approval:
openclaw plugins install clawhub:clawlink-pluginThen ask OpenClaw to set up ClawLink. It starts browser pairing and prints an approval link — open it, approve the device, return to the chat, and say done. Finally, connect PostHog in the ClawLink dashboard — paste your PostHog API key once.
Verify the connection by asking OpenClaw:
Pull the relevant data from PostHog, summarize it in plain English, and point out anything that needs attention.
Using a different agent?
The OpenClaw plugin is one client of ClawLink's MCP server. Claude Code, Cursor, Codex, or any agent that can run a shell command pairs with the same ClawLink account through the CLI:
npx -y @useclawlink/cli loginlogin opens the same browser approval and stores a credential locally. Once PostHog is connected in the dashboard, that agent calls the same 686 PostHog tools over MCP. Full setup for MCP clients and shell agents: connect apps to any AI agent.
PostHog MCP for OpenClaw
Looking for a PostHog MCP server for OpenClaw? ClawLink connects PostHog to OpenClaw and exposes 686 PostHog tools your agent can call over MCP, with hosted auth and nothing to run or maintain yourself. Using Hermes instead? The Hermes PostHog integration works the same way.
What the OpenClaw PostHog integration can do
686 PostHog tools are ready for OpenClaw once the account is connected. The 30 below are the ones people reach for most; your agent can call all 686.
30 of 686 PostHog tools for OpenClaw
| Tool | What it does |
|---|---|
Get event definitions posthog_get_event_definitions | List event definitions in a PostHog project |
Get experiment details posthog_get_experiment_details | Get details for a specific experiment |
Get experiments stats posthog_get_experiments_stats | Get statistics for experiments |
Get feature flag details posthog_get_feature_flag_details | Get details for a specific feature flag |
Get feature flag status posthog_get_feature_flag_status | Get the status of a feature flag |
Get funnel insights in project posthog_get_funnel_insights_in_project | Get funnel insights in a PostHog project |
Get group property definitions posthog_get_group_property_definitions | Get group property definitions |
Get project person trends posthog_get_project_person_trends | Get person trends for a PostHog project |
List and manage project feature flags posthog_list_and_manage_project_feature_flags | List feature flags in a PostHog project |
List groups by type posthog_list_groups_by_type | List groups by type in a PostHog project |
List organization members posthog_list_organization_members | List members of your PostHog organization |
List organization projects posthog_list_organization_projects | List all projects in your PostHog organization |
List project actions posthog_list_project_actions | List actions in a PostHog project |
List project dashboards posthog_list_project_dashboards | List dashboards in a PostHog project |
List project experiments posthog_list_project_experiments | List A/B experiments in a PostHog project |
List project session recordings posthog_list_project_session_recordings | List session recordings in a PostHog project |
List project surveys posthog_list_project_surveys | List surveys in a PostHog project |
Calculate experiment running time posthog_calculate_experiment_running_time | Calculate experiment running time in a PostHog project |
Check insight query data posthog_check_insight_query_data | Check insight query data quality in a PostHog project |
Check pipeline destination updates posthog_check_pipeline_destination_updates | Check for available updates to a pipeline destination plugin by comparing the currently |
Check pipeline import app updates posthog_check_pipeline_import_app_updates | Retrieve the latest update information for a specific pipeline import app by its ID within an |
Check pipeline plugin update status posthog_check_pipeline_plugin_update_status | Get update status for a specific pipeline transformation plugin by its unique ID within an |
Check project demo data generation status posthog_check_project_demo_data_generation_status | Check if a project is currently generating demo data |
Complete notebook code posthog_complete_notebook_code | Complete notebook code in a PostHog project |
Create error tracking query issue posthog_create_error_tracking_query_issue | Get compact issue details in a PostHog project |
Create error tracking query issue events posthog_create_error_tracking_query_issue_events | List sampled exception events in a PostHog project |
Create error tracking query issues posthog_create_error_tracking_query_issues | List compact issues in a PostHog project |
Create logs export posthog_create_logs_export | Create a logs export job using HogQL queries in PostHog |
Create person path posthog_create_person_path | Retrieve path analytics for a specific person within a PostHog project |
Create project retention insight posthog_create_project_retention_insight | Create and retrieve retention insights for a project using PostHog's Query API |
Try it: find the PostHog tool you need
Browse the 30 PostHog tools
Click any tool to see exactly what OpenClaw can do and copy a ready-to-use prompt.
Example prompts
Pull the relevant data from PostHog, summarize it in plain English, and point out anything that needs attention.
ClawLink vs. building it yourself
The alternative to ClawLink is usually manual API key setup plus your own token handling, permission troubleshooting, and tool plumbing for OpenClaw. That is fine if you want to build and maintain the integration yourself. Most teams just want PostHog working from chat.
| Manual | ClawLink | |
|---|---|---|
| Credential handling | Collect, validate, store, and rotate the PostHog API key yourself, then make sure every tool call uses the right account. | Users complete the hosted ClawLink setup once and the connected PostHog account becomes available to the agent without you building credential management. |
| Ongoing maintenance | You own refresh logic, permission debugging, environment config, and every provider-specific edge case for PostHog. | ClawLink handles the repetitive integration plumbing so your team can focus on the workflow instead of the infrastructure. |
| Agent usability | You still need to expose the right PostHog actions to the runtime in a format your agent can reliably use. | 686 tools for PostHog are already exposed through ClawLink, so the agent can read and act from chat immediately. |
ClawLink vs. Composio
Composio also exposes PostHog to AI agents. It is developer infrastructure: Python and TypeScript SDKs, an MCP server, and a catalog past 1,000 apps, aimed at teams shipping agent products. ClawLink is built for OpenClaw users instead. You install the plugin once, connect PostHog in the browser, and the 686 tools above work from chat. There is no SDK and no config file, and the PostHog key you paste at setup is stored server-side rather than kept in your environment. Choosing between them? Read the full Composio alternatives comparison.
Troubleshooting
OpenClaw installed the PostHog skill but can't call the tools
The ClawHub skill teaches OpenClaw about PostHog, but the calls run through the ClawLink plugin and your connected account. Make sure PostHog is connected in the dashboard, then start a fresh chat so OpenClaw reloads the tool catalog. If OpenClaw runs as a persistent gateway, restart it so the new tools register.
Connection succeeds but no tools appear
Reconnect PostHog from the dashboard, then start a fresh chat if the runtime still has the old tool catalog loaded.
"Tool schema not loaded yet" error when calling PostHog tools
PostHog tool schemas load on demand the first time a tool runs and are cached after that, so this error usually clears on its own: wait a few seconds and retry the same request. If every PostHog call keeps failing with it in a fresh chat, reconnect from the dashboard, and contact support if it still persists — that pattern points to a configuration problem on our side, not something you can fix by reconnecting again.
PostHog returns 403 or "permission denied" on one action while others work
Two usual causes. The connected account may not have access to the specific workspace, inbox, store, or project in the request — check that first. If access looks right, the agent may have sent a placeholder value (like "YOUR_ID" or an example id from documentation) instead of a real one: ask it to run a list or search tool first, then retry the action with a real id from those results. Most failures at this stage are one of these two, not ClawLink bugs.
API key setup works but results look incomplete
Double-check that the API key for PostHog has the right scopes or account access. A valid key can still be too limited for some reads or writes.
FAQ
Is there a OpenClaw PostHog integration?
Yes. ClawLink is the fastest way to connect OpenClaw to PostHog: link your PostHog account once in the browser and OpenClaw can call the PostHog API through 686 ready-made tools — no custom code or token handling.
How do I add PostHog to OpenClaw with ClawLink?
Paste the setup prompt from this page into OpenClaw. It installs the ClawLink PostHog skill from ClawHub, then you click Connect in the dashboard to authorize PostHog. OpenClaw calls the tools from the next message — no config files, and the PostHog key you paste is stored server-side instead of in your environment.
How long does it take to connect PostHog to OpenClaw?
About two minutes. Sign in, click Connect next to PostHog in the dashboard, authenticate, and OpenClaw can use it from the next chat message.
Why use ClawLink instead of wiring PostHog up myself?
The alternative to ClawLink is usually manual API key setup plus your own token handling, permission troubleshooting, and tool plumbing for OpenClaw. That is fine if you want to build and maintain the integration yourself. Most teams just want PostHog working from chat.
OpenClaw installed the PostHog skill but can't call the tools
The ClawHub skill teaches OpenClaw about PostHog, but the calls run through the ClawLink plugin and your connected account. Make sure PostHog is connected in the dashboard, then start a fresh chat so OpenClaw reloads the tool catalog. If OpenClaw runs as a persistent gateway, restart it so the new tools register.