PostHog for AI agents
PostHog is an open-source product analytics platform for tracking user behavior, running experiments, and understanding funnels. Product teams use it to decide what to build next and reduce churn. Connect it once through Arc0, and your agent, or Claude, ChatGPT and Cursor, can use it through one MCP endpoint, limited to what each user approved.
What agents do in PostHog.
Capture a product event
Send a tracked event, like a feature click, so it shows up in funnels and dashboards.
Check feature flag status read-only
Look up a feature flag's rollout state before deciding whether to expand it.
Bulk delete feature flags with approval
Remove a batch of unused feature flags only after an engineering lead confirms the cleanup.
507 PostHog actions, graded by risk.
Every PostHog action is tagged read, write or destructive, so one policy covers the whole app and new actions inherit the right default.
read
250Look things up. Allowed by default.
- posthog.get_datasetGet dataset details
- posthog.list_alertsList alerts for project
- posthog.get_datasetsGet Datasets
- posthog.get_evaluationGet Evaluation
- posthog.get_web_vitalsGet web vitals
- posthog.list_endpointsList endpoints for project
- posthog.list_notebooksList notebooks with filters and pagination
- posthog.get_app_metricsRetrieve app metrics by ids
- posthog.get_evaluationsGet evaluations for project
- posthog.get_file_systemGet file system
- posthog.get_logs_valuesGet log field values
- posthog.get_conversationGet conversation
- posthog.get_dataset_itemGet Dataset Item
- posthog.get_hog_functionGet hog function
- posthog.get_organizationFetch organization details by uuid
- posthog.get_product_tourGet product tour
write
197Create and change things. Allow, or ask the user first.
- posthog.create_alertCreate alert
- posthog.create_batchCreate Batch
- posthog.update_alertUpdate alert (full replacement)
- posthog.create_datasetCreate Dataset
- posthog.update_datasetUpdate Datasets
- posthog.create_endpointCreate endpoint
- posthog.update_endpointUpdate endpoint
- posthog.create_ai_insightCreate Max AI insight and query
- posthog.create_evaluationCreate Evaluation
- posthog.update_evaluationUpdate evaluation
- posthog.update_experimentUpdate experiment details
- posthog.create_file_systemCreate file system
- posthog.create_logs_exportCreate Logs Export
- posthog.create_person_pathCreate person path with format option
- posthog.update_file_systemUpdate file system
- posthog.create_batch_exportCreate batch export
destructive
60Delete, cancel or archive. Ask first, or deny outright.
- posthog.delete_alertDelete alert
- posthog.delete_personDelete person and optionally associated events
- posthog.delete_surveyDelete survey by id
- posthog.delete_insightDelete insight
- posthog.delete_endpointDelete endpoint
- posthog.delete_file_systemDelete file system
- posthog.delete_organizationDelete organization by uuid
- posthog.delete_product_tourDelete product tours
- posthog.delete_project_queryRemove specific project query
- posthog.delete_project_memberRemove explicit project member by uuid
- posthog.delete_web_experimentDelete web experiment
- posthog.delete_person_propertyDelete person property
- posthog.delete_role_membershipRemove rolemembership by uuid
- posthog.archive_survey_responseArchive survey response
- posthog.cancel_project_insightsCancel insights for a project
- posthog.delete_insight_variableDelete insight variables
PostHog in three steps.
- 01Your users connect PostHogThey add their PostHog api key on Arc0 Connect, under your brand. It goes straight into the vault.
- 02You set the rulesReads run, writes like “create alert” can wait for the user, and “delete alert” can be denied outright.
- 03Any agent can actYour agent calls PostHog through the Arc0 SDK or MCP, and so can Claude, ChatGPT and Cursor. Every call lands on the audit log.
await arc0.policies.set('posthog', { read: 'allow', write: 'ask', // create_alert destructive: 'deny', // delete_alert }) # Claude Code: the same connection, one URL $ claude mcp add --transport http arc0 \ https://mcp.arc0.ai/u/u_8f2
How PostHog connects.
Users add their PostHog api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.
The same PostHog connection serves your agent over MCP and your own backend over REST and the proxy, so a user connects once. How Arc0 handles credentials →
- AUTH
- API key
- CREDENTIALS
- Per-tenant encrypted vault
- MODEL SEES
- Results only, never credentials
- AUDIT LOG
- Every call, on every plan
Use PostHog from any agent.
PostHog and Arc0, answered.
Can I use PostHog with Claude, ChatGPT or Cursor?
Yes. Connect PostHog to Arc0 once, then add your Arc0 MCP URL to Claude, ChatGPT, Cursor, Claude Code or any other remote-MCP client. Each assistant only gets the PostHog actions you allow.
How do users connect PostHog?
Users add their PostHog api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.
Which PostHog actions can my agent take?
507 in total: 250 read, 197 write and 60 destructive, such as “create alert”. Your policies decide which of them each agent may call.
Can I stop my agent from deleting things in PostHog?
Yes. Actions like “delete alert” are graded destructive. Set destructive actions to deny, or to ask so the user approves each one, and blocked calls still show up on the audit log.
Can my own backend call PostHog too?
Yes. The same PostHog connection is available over REST and through the Arc0 proxy, so your product and your agent share one connection per user.
Plug PostHog into your agent.
Your users connect PostHog once, under your brand. Your agent gets 507 actions behind your policies, with every call on the record.
Free to build · MCP + REST · Audit log on every plan