From 52c6bfdd8dc81ccaa60257babf8a88b67532e0da Mon Sep 17 00:00:00 2001 From: Minu Palaniappan Date: Fri, 25 Sep 2026 15:02:11 -0700 Subject: [PATCH] feat(third_party): add PostHog MCP plugin (posthog-mcp) Re-adds the URL-only PostHog connector removed in #436 under the name posthog-mcp / PostHog MCP. The bare posthog name belongs to PostHog's own approved marketplace plugin (id 730), and two APPROVED plugins with one name collide in the indexer. Same server (https://mcp.posthog.com/mcp), same OAuth via oauth.posthog.com with PKCE + DCR verified for every Cursor redirect set incl. Grok Bot mobile. --- .cursor-plugin/marketplace.json | 5 ++ .../posthog-mcp/.cursor-plugin/plugin.json | 35 ++++++++ third_party/posthog-mcp/CHANGELOG.md | 11 +++ third_party/posthog-mcp/LICENSE | 21 +++++ third_party/posthog-mcp/README.md | 77 ++++++++++++++++++ third_party/posthog-mcp/assets/logo.png | Bin 0 -> 2335 bytes third_party/posthog-mcp/mcp.json | 8 ++ 7 files changed, 157 insertions(+) create mode 100644 third_party/posthog-mcp/.cursor-plugin/plugin.json create mode 100644 third_party/posthog-mcp/CHANGELOG.md create mode 100644 third_party/posthog-mcp/LICENSE create mode 100644 third_party/posthog-mcp/README.md create mode 100644 third_party/posthog-mcp/assets/logo.png create mode 100644 third_party/posthog-mcp/mcp.json diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index 883206dac..ace9c8eec 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -487,6 +487,11 @@ "name": "plaud", "source": "third_party/plaud", "description": "Work with your Plaud recordings: list and search meetings and voice notes, read full transcripts with speaker labels, and pull AI summaries, action items, and key topics into your workflow." + }, + { + "name": "posthog-mcp", + "source": "third_party/posthog-mcp", + "description": "Work with PostHog from chat: query product analytics and run SQL, manage feature flags and experiments, triage error tracking issues, and review session replays, surveys, and dashboards (URL-only connector to PostHog's hosted MCP server)." } ] } diff --git a/third_party/posthog-mcp/.cursor-plugin/plugin.json b/third_party/posthog-mcp/.cursor-plugin/plugin.json new file mode 100644 index 000000000..9e9068da2 --- /dev/null +++ b/third_party/posthog-mcp/.cursor-plugin/plugin.json @@ -0,0 +1,35 @@ +{ + "name": "posthog-mcp", + "displayName": "PostHog MCP", + "version": "1.0.0", + "minClientVersions": { + "cursor": "3.13.0" + }, + "description": "Work with PostHog from chat: query product analytics and run SQL, manage feature flags and experiments, triage error tracking issues, and review session replays, surveys, and dashboards (URL-only connector to PostHog's hosted MCP server).", + "author": { + "name": "Cursor", + "email": "plugins@cursor.com" + }, + "homepage": "https://posthog.com/docs/model-context-protocol", + "repository": "https://github.com/cursor/plugins", + "license": "MIT", + "logo": "assets/logo.png", + "keywords": [ + "posthog", + "product analytics", + "feature flags", + "experiments", + "error tracking", + "session replay", + "hogql", + "sql", + "mcp" + ], + "category": "integrations", + "tags": [ + "posthog", + "analytics", + "mcp" + ], + "mcpServers": "./mcp.json" +} diff --git a/third_party/posthog-mcp/CHANGELOG.md b/third_party/posthog-mcp/CHANGELOG.md new file mode 100644 index 000000000..d329b2c05 --- /dev/null +++ b/third_party/posthog-mcp/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog + +All notable changes to this plugin will be documented here. + +## 1.0.0 — initial release + +- Listed as `posthog-mcp` / "PostHog MCP": the `posthog` name belongs to PostHog's own marketplace plugin (id 730), and two APPROVED plugins with one name collide in the indexer. + +- Added the `posthog` MCP server pointing at PostHog's hosted Streamable HTTP endpoint (`https://mcp.posthog.com/mcp`). +- Auth uses OAuth with PostHog user login (PKCE, dynamic client registration via `oauth.posthog.com`) — no API key or client ID to configure. Registration was verified to accept every Cursor redirect set, including Grok Bot mobile. +- Logo: PostHog's official hedgehog mark, the favicon published on posthog.com rendered as-is (white mark on PostHog's black tile) at 192×192. diff --git a/third_party/posthog-mcp/LICENSE b/third_party/posthog-mcp/LICENSE new file mode 100644 index 000000000..ca2bba771 --- /dev/null +++ b/third_party/posthog-mcp/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Cursor + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third_party/posthog-mcp/README.md b/third_party/posthog-mcp/README.md new file mode 100644 index 000000000..807ebb1cd --- /dev/null +++ b/third_party/posthog-mcp/README.md @@ -0,0 +1,77 @@ +# PostHog MCP + +Cursor plugin that connects agents to [PostHog](https://posthog.com) through PostHog's official remote [Model Context Protocol](https://modelcontextprotocol.io/) server. + +Query product and web analytics, run HogQL/SQL against your project, ship and roll out feature flags, create and analyze experiments, triage error tracking issues, and work with session replays, surveys, dashboards, logs, and CDP destinations from chat. + +This is a URL-only connector to PostHog's hosted MCP server. PostHog also publishes its own richer plugin (`posthog`, with bundled skills, commands and hooks) in the marketplace; install one or the other, not both. + +## Install + +1. Open **Cursor Settings → Plugins**. +2. Search for **PostHog MCP**. +3. Click **Install**, then complete the PostHog sign-in prompt. + +Or run `/add-plugin posthog-mcp` in chat. + +## MCP + +```json +{ + "mcpServers": { + "posthog": { + "type": "http", + "url": "https://mcp.posthog.com/mcp" + } + } +} +``` + +Auth is OAuth. Cursor prompts for PostHog sign-in when the plugin connects — there is no client ID or API key to configure. Each user signs in with their own PostHog account, and the PostHog authorization server routes the connection to the correct data region (US or EU) for that account. + +## Before you connect + +You need a PostHog account ([sign up](https://app.posthog.com/signup)). Connecting to the MCP server and calling its tools is free; standard PostHog usage and billing still apply to the data your queries consume. A few tools run LLMs internally (for example, survey response summarization and trace summarization) and may be billed as PostHog AI spend; those tools are only exposed when AI data processing is enabled in your organization settings. See the [FAQ](https://posthog.com/docs/model-context-protocol/faq) for details. + +One connection signs in as one account with one active organization and project; `switch-organization` and `switch-project` change the active context. + +## What agents can do + +| Category | Capabilities | +| --- | --- | +| Product analytics | `insight-query` runs trends, funnels, retention, paths, lifecycle, and stickiness queries, with `query-trends`, `query-funnel`, `query-retention`, `query-paths`, and their `-actors` variants for direct access; `insights-list`, `insight-get`, `insight-create`, and `insight-update` manage saved insights | +| SQL and data schema | `execute-sql` runs HogQL queries against the project; `read-data-schema` describes the events, properties, and warehouse tables available to query | +| Dashboards | `dashboards-get-all`, `dashboard-get`, `dashboard-create`, `dashboard-update`, and tile tools (`dashboard-create-tile`, `dashboard-reorder-tiles`) build and edit dashboards | +| Feature flags | `feature-flag-get-all`, `feature-flag-get-definition`, `create-feature-flag`, `update-feature-flag`, `feature-flag-enable` / `feature-flag-disable`, `feature-flag-set-release-condition-rollout`, `feature-flag-roll-out-to-everyone`, and `scheduled-changes-*` for timed rollouts | +| Experiments | `experiment-list`, `experiment-get`, `experiment-create`, `experiment-create-from-prompt`, `experiment-launch`, `experiment-pause`, `experiment-end`, `experiment-ship-variant`, and `experiment-results-get` | +| Error tracking | `query-error-tracking-issues-list`, `query-error-tracking-issue`, and `query-error-tracking-issue-events` read issues and stack traces; `error-tracking-issues-partial-update`, `error-tracking-issues-assign-partial-update`, `error-tracking-issues-merge-create`, and the assignment, grouping, severity, and suppression rule tools manage triage | +| Session replay | `query-session-recordings-list` and `session-recording-get` find and inspect recordings; playlist tools group them | +| Surveys | `surveys-get-all`, `survey-get`, `survey-create`, `survey-launch`, `survey-stop`, `survey-stats`, `surveys-responses-list`, and `surveys-summarize-responses-create` | +| Logs and tracing | `query-logs`, `logs-patterns`, `logs-anomalies-scan`, and `logs-alerts-*`; `query-apm-spans`, `apm-trace-get`, and the `apm-spans-*` aggregations for distributed traces | +| Web analytics | `query-web-overview`, `query-web-stats`, `query-web-vitals`, `web-analytics-weekly-digest`, and heatmap tools | +| Persons and cohorts | `persons-list`, `persons-retrieve`, `persons-property-set`, `cohorts-list`, `cohorts-create`, and `cohorts-add-persons-to-static-cohort-partial-update` | +| CDP and data warehouse | `cdp-functions-list`, `cdp-functions-create`, `cdp-function-templates-list`, and revision tools for destinations and transformations; `external-data-sources-list`, `data-warehouse-source-setup`, `view-create`, and `view-run` for warehouse sources and saved views | +| Workspace and docs | `organizations-get`, `projects-get`, `switch-organization`, `switch-project`, `docs-search`, and `generate-app-url` | + +The server exposes 1,000+ tools across 70+ categories, including AI observability, alerts, annotations, billing, conversations, endpoints, notebooks, workflows, and more. See the [tools reference](https://posthog.com/docs/model-context-protocol/tools) for the full list. The hosted runtime is the source of truth for tool names and schemas. + +## Notes + +- Many tools write to your project: they create, update, enable, and delete flags, experiments, insights, cohorts, surveys, and CDP functions, and `persons-bulk-delete` and `session-recording-bulk-delete` remove data. Review each write before letting the agent run it, and be mindful of prompt injection from untrusted content in query results. +- Writes go to the active project. Confirm which organization and project the connection is on before letting the agent change flags or experiments. +- Tool calls run against the PostHog API and share its per-team rate limits. The MCP server proxies to your PostHog instance and does not store your analytics data. +- Cursor registers every tool individually (PostHog's "tools mode"). Other clients may default to a single `exec` tool; the docs describe the `mode`, `readonly`, `features`, and `tools` query parameters for scoping a session. + +## Docs + +- MCP overview: https://posthog.com/docs/model-context-protocol +- Tools reference: https://posthog.com/docs/model-context-protocol/tools +- FAQ and advanced setup: https://posthog.com/docs/model-context-protocol/faq +- API reference: https://posthog.com/docs/api +- Server URL: https://mcp.posthog.com/mcp + +Logo is PostHog's official mark. + +## License + +MIT diff --git a/third_party/posthog-mcp/assets/logo.png b/third_party/posthog-mcp/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4a63d31e93f60cddeac60b92275f6542ac8f4d17 GIT binary patch literal 2335 zcmbVOi8tHX7Z(&&A#~GkEQw(#GgTF3FobXXgrb)CrS{g=SgX27D@04bqN+`mDpDFX zs#*-HMy!<@wUo4q1`%7))}Gq8iF4*JnETGV_q}(|`Mi7X=iYZ-lB0t)TpExT5fOpg z;Bn4E+qgTWM1`7Hzu_n}627ObaUwgr<4N7K2O=U;pKNdz1TtfWXCEp+rr zBaj6y3(($^|D5TJB^7qs!h}90`dz3E#$;aCmdt;Oj>fhj%O!C*VyU;QkrJ6J<~)Sh zPw$5w#c>>Cj>DdZy*q-C=drGwYK=HAgpg&xj)uN7K)J%JB@&?E_q!`sX}k@XE@}xH zxE_7t3`VcarXQJ=r&B-`SUQlU=LdCAhDUezLol0@?Lb#COR&<> z0F?=mMHRwnnkY3uQ4tFQ3*zd7i1S!q_(cgE&MV@UNpfs6{TFANTGw7%QfR$&cs9(cYE66qA&lmpLp&qs{VaTJ$|p zC`+(yuQ(xcb$+CX-7KnB54{yt%d`7A9!is!r5OPV|0)jM@`Moo{!iAXP`fy;2T0vZ zIEy7>*%bR~&MM&jtgYE9G} z0Uni;$YQYw2A2gB_84`17+6-i^ew&`gflJR`GoM=D>rZ^j#A87X65cZoU{QC> zDi(r~w_C;x1{W+&UKldnNVK=N9~&F9m5mQ@+gP5dkRuLo8XH9fby}fQO}F;-N5vS~ z+1b7HsOsFl-6Ws~Wx02OJRYy3>S+;E^K=f0zcg}I5jv-62d1Q?+*oxBbbDCA6ehmi zFd>edzO9e~DN50ZYtGOtbXVCVP*vq#i?Bpr_?L%(%F4+oZswD!k_+ z>E@e0-Kq~kG;`E#G8j9zFBuQki{@z=sz>;pI{+*q5mv9!WhO3g_UAv(#m96`b1ULM z(gjSlnVFf6ScDWUk4v8~eqRs-{e>=z)4B<79YmJaFzf5h0z(oZD9x^lh_ld>@j?9q1FGh+p;Rjr>NXzS z+1_%ARA)2{7-BG+s|#RjL}ZQk)s5vajR#)TDxX)R`&(dH9Ien%E1{ODaq8i?;F^YY z-tr_)AOZUenK$MGN zQ8*;OQ1{c>trYNNkWUtmI<&!DOq6lO;bVtO z^?r`XqE{+f+3!1Z&H3Az_k-UNu_jli3tvTNXJ`M~K1%7fWO6=yK*!)i+Wjot(vXV> z5fx;bp0RP;PJOd)S!t;*ekbHjw3V;F(8XE&(ylWzL^eG(uNfyPr_zzBZ@vDx7uTav zTzP@y?~iMZ=sWnw`A){jn!69|x6{!{qgrrf!M zIeF4}CCpTXy8h#N$8y8C9WQwJ}&HrR)6P6 z{4a-)Dk|PJSBnGOz7X9#JXC+b{)xjunNxgyeZRD&`}z5OAu1%j9UewqBIZA$nDM*2 z1xw$F8_8i|VO=@D>rfxP4@|Gkh`caV>sID#Radq9XZde3Ox=N<6|L~rquMy^BG_0t K;7Tmd-uwsdJ1tuP literal 0 HcmV?d00001 diff --git a/third_party/posthog-mcp/mcp.json b/third_party/posthog-mcp/mcp.json new file mode 100644 index 000000000..c520e6077 --- /dev/null +++ b/third_party/posthog-mcp/mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "posthog": { + "type": "http", + "url": "https://mcp.posthog.com/mcp" + } + } +}