PostHog logo

MCP server

PostHog MCP for Draftbit

Let the agent query your PostHog analytics, feature flags, experiments, and errors

What is PostHog?

Sign in with your PostHog account so the agent can run analytics queries, manage feature flags and experiments, and look into errors while it builds. The same sign-in works for US and EU accounts.

Use PostHog with Draftbit

  • Let the agent query your PostHog analytics, feature flags, experiments, and errors.
  • Connect it once and the agent can use it in every app in your project.
  • To keep it out of an app, turn it off for that app under Enabled apps.
  • Covers analytics, feature-flags, experiments workflows.

Example

mcp-config.json
// OAuth — Draftbit drives the login flow with PostHog; no token to paste.
{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp",
      "headers": {}
    }
  }
}

Use cases

  • Track product usage and conversion funnels
  • Run feature flags and A/B tests in production
  • Identify drop-off points in onboarding

Authentication

Draftbit handles an OAuth login flow with PostHog. No tokens to paste.

Use PostHog in a Draftbit app today

Use Draftbit to build your app, configure PostHog, and test the feature before publishing.

Start building free

Frequently asked questions

What is the PostHog MCP?

Sign in with your PostHog account so the agent can run analytics queries, manage feature flags and experiments, and look into errors while it builds. The same sign-in works for US and EU accounts.

How do I connect the PostHog MCP to Draftbit?

Open your Draftbit app, go to Integrations and then MCPs, find PostHog in the preconfigured list, and add it. Once you have authenticated, the AI agents working in your app can use the PostHog tools right away.

Does Draftbit support PostHog's authentication?

Yes. Draftbit connects to the PostHog MCP using an OAuth login flow. The connection belongs to your project, so the agent can use it in every app in that project unless you turn it off for an app under Enabled apps. The credentials never appear in generated code.

What can I build with PostHog and Draftbit?

Most teams bring PostHog in as a product analytics platform behind a mobile or web app. You might use PostHog to track product usage and conversion funnels, or to run feature flags and A/B tests in production. The MCP tools are for the build itself. While a chat thread is active, the AI agents in Draftbit can call PostHog directly.

Get started free Browse all MCP