Weavz
PostHog

PostHog

Product analytics for events, users, projects, and HogQL insights

5 tools
Use withChatGPTClaudeClaude CodeCursorCodexMCP clientsSetup guide

Tools

Name
capture_event

Send one event to PostHog using the Capture API

identify_person

Create or update a PostHog person profile using the $identify capture event

list_projects

List projects for a PostHog organization

list_persons

List people in a PostHog environment

run_hogql_query

Run a bounded read-only HogQL query in a PostHog environment

Quick Start

TypeScript
import { WeavzClient } from '@weavz-io/sdk'

const weavz = new WeavzClient({ apiKey: 'wvz_...' })

const result = await weavz.actions.execute('posthog', 'capture_event', {
  workspaceId: '550e8400-e29b-41d4-a716-446655440000',
  integrationAlias: 'posthog',
  input: { /* ... */ },
})

Related Integrations

Works well with

Frequently Asked Questions

How do I connect PostHog to my app?

Use Weavz Hosted Connect for Custom authentication. Install the SDK, create a connection through the connect portal or API, then execute tools programmatically.

What tools does PostHog support?

PostHog supports 5 tools including Capture Event, Identify Person, List Projects, List Persons, Run HogQL Query.

Can I use PostHog with AI agents?

Yes. Add PostHog to an MCP server in Tool Mode or Code Mode. Code Mode provides 3 meta-tools with on-demand API discovery so agents can compose stateful workflows without loading every action schema up front.

How do I connect PostHog to ChatGPT or Claude?

Open the Weavz connector setup, sign in, choose a workspace, and add PostHog as an approved app. ChatGPT, Claude, and other remote MCP clients can then call the scoped PostHog tools exposed by that workspace.

Does PostHog work with Claude Code, Cursor, Codex, and local agents?

Yes. Remote and local MCP clients can connect to a Weavz MCP endpoint for the workspace. Local coding agents can also use the Weavz CLI to inspect apps, discover actions, run approved PostHog work, and execute Code Mode workflows from a terminal.

What can I ask an AI agent to do with PostHog?

PostHog exposes 5 tools, including Capture Event, Identify Person, List Projects, List Persons, Run HogQL Query. Use Weavz to keep credentials scoped, require approval for sensitive work, and audit what the agent did.

Can PostHog be used in stateful agent workflows?

Yes. Agents can combine PostHog tools with Filesystem, State KV, Human Gates, input partials, and other workspace integrations while keeping execution scoped to the selected workspace or end user.

What authentication does PostHog use?

PostHog uses Custom. Weavz stores credentials securely and uses them for authorized action execution.

How much does the PostHog integration cost?

The PostHog integration is included on all Weavz plans including the free tier with 20,000 actions per month. No credit card required.

Connect PostHog in minutes

Get 20,000 free action executions every month. No credit card required.