DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

šŸš€ Feature: PostHog MCP connector preset

Open dartpain opened this issue 2 months ago • 4 comments

šŸ”– Feature description

Add PostHog to the Connectors catalog as a remote MCP preset, so agents can work with a user's PostHog projects (insights, trends, feature flags, experiments, errors, and HogQL queries) after one OAuth sign-in.

PostHog runs a hosted MCP server at https://mcp.posthog.com/mcp. It answers an unauthenticated request with a 401 that points to OAuth metadata, and its authorization server supports dynamic client registration, which is exactly what the preset list requires (see the inclusion rules at the top of docsgpt/connectors/presets/mcp.yaml). Users don't need to register an app or paste an API key.

šŸŽ¤ Why is this feature needed?

Product teams ask "how many people used the new export button last week?" or "is the new-onboarding flag on for everyone?". PostHog answers from live analytics. Today they would have to set it up as a custom MCP server by hand.

āœŒļø How do you aim to achieve this?

This is a small, self-contained change. No Python code is needed beyond the catalog entry:

  1. Add an entry to docsgpt/connectors/presets/mcp.yaml, following the existing ones (e.g. Sentry or Stripe):
    • key: mcp:posthog, name: PostHog, a one-line description
    • icon: posthog, category: dev
    • mcp_url: https://mcp.posthog.com/mcp, auth_kind: mcp_oauth
    • capabilities: [read], or [read, write] if the server exposes tools that change things
    • docs_url: https://posthog.com/docs/model-context-protocol
  2. Add the icon at frontend/src/assets/connectors/posthog.svg (use PostHog's official brand mark).
  3. Add the description key settings.connectors.descriptions.mcp_posthog to all seven locale files in frontend/src/locale/ (de en es jp ru zh zh-TW).
  4. Add PostHog to the preset lists in docs/content/Sources/Connectors/index.mdx (the "MCP presets" section) and docs/content/Tools/mcp-tools.mdx.
  5. If a test lists or validates the presets (see tests/connectors/test_catalog.py), update it.

Before choosing capabilities, sign in once and look at the server's tools/list to see which tools read and which ones write.

Notes for PostHog:

  • The server routes US and EU accounts automatically, so one URL is enough.
  • Some tools need "AI data processing" enabled in the PostHog organization settings. The free plan is enough to test.

Other presets are being added in parallel this month and touch the same YAML and locale files, so expect to rebase on main before merge.

Acceptance criteria

  • PostHog appears on the Connectors page with its icon and description in every locale.
  • Connecting it opens PostHog's OAuth sign-in, and the connection then works as an agent tool.
  • ruff check ., python -m pytest tests/connectors and cd frontend && npm run lint pass.

šŸ”„ļø Additional Information

Please attach a screenshot of the PostHog card on the Connectors page and of an agent using one of its tools. UI work follows frontend/DESIGN.md. Vercel (#2874) is a similar issue, so it's a useful reference.

dartpain avatar Oct 02 '26 14:10 dartpain

Hey I’m well familiar with posthog,,,so would like to work on it,,, can I get assign to it?

Itz-Agasta avatar Oct 02 '26 19:10 Itz-Agasta

Hey @arc53-machine can I be assigned this issue?

j4b3-21 avatar Oct 09 '26 03:10 j4b3-21

Hi! I'd like to work on this for Hacktoberfest — I have the preset entry, icon, locales, docs, and catalog test ready to go. Could you please assign it to me? Thanks!

sonawaneutkarsh avatar Oct 10 '26 20:10 sonawaneutkarsh

PR #2924 already addresses this issue, so I haven't assigned it. You can help by reviewing or testing that PR.

Automated triage. A maintainer will follow up.

arc53-machine avatar Oct 10 '26 20:10 arc53-machine