PostHog MCP logo

Integrate PostHog MCP with your AI CRM

Analyze PostHog product data, feature flags, experiments, and error tracking.

Explore Triggers and Actions

Exec

### Using the `posthog` tool PostHog makes your product self-driving: it reads your data and ships changes with you, never without you. Spans analytics, experiments, flags, replay, and more. Pass CLI-style commands in the `command` parameter for all PostHog interactions. **Requirements** 1. Find unknown tools with `search` or `tools`. 2. Run `info <tool_name>` once if its schema is not in context. Reuse it unless the tool changes or a schema error occurs. Never guess a schema or run `info` before every call. **Commands (in order):** ```text # 1. Find unknown tools posthog:exec({ "command": "search <regex>" }) posthog:exec({ "command": "tools" }) # fallback: list all # 2. Inspect once if the schema is missing posthog:exec({ "command": "info <tool_name>" }) # 3. Drill into complex fields — REQUIRED for any field with a `hint` posthog:exec({ "command": "schema <tool_name> <field_path>" }) # 4. Call; reuse the schema posthog:exec({ "command": "call <tool_name> <json_input>" }) posthog:exec({ "command": "call --json <tool_name> <json_input>" }) ``` **Schema drill-down:** - `info` returns the full schema if it fits the token budget; otherwise it auto-summarizes (names, types, required, enums, defaults) and attaches `hint` entries pointing to `schema <tool> <path>` for complex fields. - `schema <tool>` (no path) returns the summarized top-level schema. - `schema <tool> <path>` resolves a dot path, descending through: - object `properties` (e.g. `query.source`) - array `items` — numeric segments step into items (`events.0.properties`), or jump to a property on the item type (`events.id`) - `anyOf`/`oneOf` — numeric segment picks a variant by index, or a property name matches any object variant defining it - Oversized sub-schemas are also summarized with a `note` to drill further. - Unknown paths return an error listing available child paths. **Not supported:** - `search` matches tool metadata only, not input schemas. - No pattern-based field projection — drill one path at a time.

ActionTry it

How the PostHog MCP integration works

The PostHog MCP integration connects your Dench AI CRM directly to PostHog MCP, so agents can read and act on your PostHog MCP data as part of everyday work — answering questions in chat, keeping your CRM in sync, and running automations without anyone copying data between tools.

1 action is available for agents to invoke on your behalf. Every call runs through PostHog MCP's own authorization, scoped to the account you connect.

Set up PostHog MCP in Dench

  1. 1

    Sign in to your Dench workspace and open Integrations.

  2. 2

    Find PostHog MCP and click Connect — you'll authorize access through PostHog MCP's own sign-in flow. No API keys or code required.

  3. 3

    Ask an agent to use PostHog MCP in chat, or call it from an automation.

  4. 4

    Manage or disconnect the connection any time from workspace settings.

Frequently asked questions

How does the PostHog MCP integration work with Dench?

The Dench PostHog MCP integration connects your AI CRM to PostHog MCP, so AI agents can work with your PostHog MCP data as part of chats, automations, and CRM workflows. You connect your account once, and every agent in your workspace can use it — governed by your workspace permissions.

What actions can AI agents perform with PostHog MCP via Dench?

The PostHog MCP integration currently exposes 1 action, including Exec. Agents invoke them on your behalf from chat or from automations.

Do I need to write code to connect PostHog MCP to Dench?

No. You connect PostHog MCP from your Dench workspace using PostHog MCP's own sign-in and authorization flow — no API keys to copy, no glue code to maintain.

Is the PostHog MCP integration secure?

Connections are authorized through PostHog MCP's own authentication flow, and Dench stores only the authorization needed to act on your behalf. You can review and disconnect the PostHog MCP connection from your workspace settings at any time.

PostHog MCP | Dench AI CRM