Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(mcp-hint): remove the hide-everywhere opt-out (#112278)

Rafael Audibertaf97f63bd73e
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 5bda355c528a..1b0fdccabd73 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -2417,9 +2417,9 @@ snapshots:
components-search--product-recents-and-starred--light:
hash: v1.k794b7964.45213063c3c767175033b9c3ff72d94df2e3ffc9ffe46398bc78c45c3708f1b5.X_mXo_erMw09YXsaZY6-sc_9vQx8VtriGVHZgr_wJmw
components-search--searching--dark:
- hash: v1.k794b7964.2aa6ebf132ca137aa0f98f385c5d62dda54c36a4179ee2e4a094c55370449770.mrifVce5KZkJtm1hKJbJeTi1BQ_UchFotgLDAQ8CX7M
+ hash: v1.k794b7964.01d14afd3442577b3ceaa146e34b913fba8e688ad4aa3643e0aa3eeb9d732c55.yLyUb3i3Ei2dkApsUZAunFCwQWLojsn_PprnieNwj70
components-search--searching--light:
- hash: v1.k794b7964.8679bcce8f288c7902c415ec1532dfb612804e97141250cfe7efd7839a5b56d3.A2grbTGYuYbC836MtMxF5iaG9tymuJZsDFbSlS4CnoY
+ hash: v1.k794b7964.dadecee34d2bd179b82a0f0b73ad0a38c8527f976fae6856fb80410270c9c4db._wWhUOTBAmGu9PGQB8esb7gmL6fDxKoxcgkKDxjmKzQ
components-sentencelist--full-sentence--dark:
hash: v1.k794b7964.7e8e5dd2e09d246cc3668f362f2391fe67618bd1143aa393832297f5dc30e558.yptEWKc5RAUY613Fwd5cQ0VIinMvpdoI6cuKgagAGxk
components-sentencelist--full-sentence--light:
@@ -13263,9 +13263,9 @@ snapshots:
scenes-app-settings-user--settings-user-backup-codes-modal-generated--light:
hash: v1.k794b7964.9c51bd1bd794659c4b6fdf9a5612dbf375e08f30375778c77cd79caff47c5aa7.s_2QKaTg7Wc2fBiUbAXjD4TG43A37T9Bpbrj3XFCN_Q
scenes-app-settings-user--settings-user-customization--dark:
- hash: v1.k794b7964.a097f3d60f48109f0c6ac48c35c9761b94fa2edd7c9b6db158c579e4347991db.ZH3FWbrs1WLE04i8kWp9fEgrD7K3_GiHlGl8aP6ChI8
+ hash: v1.k794b7964.fd61b0334bf9861632a5105f8ef0ddfda32ecc3e39ccfb5173f88dd5a45e9699.v3beJJSCHztpP1pb29IMDl6qHa7hPmr7OTjOduMV6AU
scenes-app-settings-user--settings-user-customization--light:
- hash: v1.k794b7964.ad360cde9282e8ec5543d2456005cfb1d42b6c236a2a72190d9a5f30d0af9c81.-eVWsprrivR9NIVz8AP4GdqsqByotq_8x0iWau0ckgM
+ hash: v1.k794b7964.ae4e4328bb6e72fa1cba516b54bf8c53cbe7d20c971686f55b627bf1e9371c5c.v7hOuG9-MssyGUbsum-vAs3IPP9A5TpYLuoTWv-pv0c
scenes-app-settings-user--settings-user-danger-zone--dark:
hash: v1.k794b7964.199bdfbeb1306a1136590674838b1ace855bdf727ed269fb303d6c9c3c8c13d3.ahpMr0R7FDPjv2mclgIztiqNOOUN5LcmTtFceGyAFRw
scenes-app-settings-user--settings-user-danger-zone--light:
diff --git a/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx b/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx
index 1fb86b3cebb8..0f4192e8f9d7 100644
--- a/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx
+++ b/frontend/src/lib/components/MCPHint/mcpHintLogic.tsx
@@ -18,9 +18,10 @@ import type { SurfaceKey } from './prompts'
export type MCPHintPlacement = 'toast' | 'card'
-function reportMCPHintDismissed(dismissType: 'surface' | 'all', surfaceKey?: string): void {
+function reportMCPHintDismissed(surfaceKey: string): void {
+ // pinned: `dismiss_type` stays on the event so existing insights keep matching
posthog.capture('mcp hint dismissed', {
- dismiss_type: dismissType,
+ dismiss_type: 'surface',
surface_key: surfaceKey,
})
}
@@ -57,7 +58,6 @@ export interface mcpHintLogicValues {
dismissedSurfaces: Record<string, true>
effectiveOptOut: boolean
lastShownAt: number | null
- localGlobalOptOut: boolean
topEvents: string[]
topEventsLoading: boolean
userRole: string | null
@@ -75,9 +75,6 @@ export interface mcpHintLogicActions {
successCallback: (() => void) | undefined
user: Partial<UserType>
} // userLogic
- dismissAll: () => {
- value: true
- }
dismissSurface: (surfaceKey: SurfaceKey) => {
surfaceKey:
| 'actions.create'
@@ -201,7 +198,7 @@ export interface mcpHintLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface mcpHintLogicMeta {
__keaTypeGenInternalSelectorTypes: {
- effectiveOptOut: (localGlobalOptOut: boolean, user: UserType | null) => boolean
+ effectiveOptOut: (user: UserType | null) => boolean
userRole: (user: UserType | null) => string | null
}
}
@@ -223,7 +220,6 @@ export const mcpHintLogic = kea<mcpHintLogicType>([
tryShowHint: (surfaceKey: SurfaceKey, derivedPrompt?: string) => ({ surfaceKey, derivedPrompt }),
recordShown: (now: number) => ({ now }),
dismissSurface: (surfaceKey: SurfaceKey) => ({ surfaceKey }),
- dismissAll: true,
reenable: true,
reportAgentOpened: (surfaceKey: SurfaceKey, placement: MCPHintPlacement, agentKey: string) => ({
surfaceKey,
@@ -250,14 +246,6 @@ export const mcpHintLogic = kea<mcpHintLogicType>([
reenable: () => ({}),
},
],
- localGlobalOptOut: [
- false,
- { persist: true },
- {
- dismissAll: () => true,
- reenable: () => false,
- },
- ],
}),
loaders({
topEvents: [
@@ -284,10 +272,7 @@ export const mcpHintLogic = kea<mcpHintLogicType>([
],
}),
selectors({
- effectiveOptOut: [
- (s) => [s.localGlobalOptOut, s.user],
- (localOptOut: boolean, user: UserType | null): boolean => Boolean(localOptOut || user?.hide_mcp_hints),
- ],
+ effectiveOptOut: [(s) => [s.user], (user: UserType | null): boolean => Boolean(user?.hide_mcp_hints)],
userRole: [(s) => [s.user], (user: UserType | null): string | null => user?.role_at_organization ?? null],
}),
listeners(({ values, actions }) => ({
@@ -336,12 +321,7 @@ export const mcpHintLogic = kea<mcpHintLogicType>([
}
},
dismissSurface: ({ surfaceKey }) => {
- reportMCPHintDismissed('surface', surfaceKey)
- },
- dismissAll: () => {
- toast.dismiss()
- actions.updateUser({ hide_mcp_hints: true })
- reportMCPHintDismissed('all')
+ reportMCPHintDismissed(surfaceKey)
},
reenable: () => {
actions.updateUser({ hide_mcp_hints: false })
diff --git a/frontend/src/scenes/settings/SettingsMap.tsx b/frontend/src/scenes/settings/SettingsMap.tsx
index 0533ea4e43e6..3d50ef8dd5be 100644
--- a/frontend/src/scenes/settings/SettingsMap.tsx
+++ b/frontend/src/scenes/settings/SettingsMap.tsx
@@ -194,7 +194,6 @@ import { ChangePassword, ChangePasswordTitle } from './user/ChangePassword'
import { ConnectedApps } from './user/ConnectedApps'
import { HedgehogModeSettings } from './user/HedgehogModeSettings'
import { LoginSessions } from './user/LoginSessions'
-import { MCPHintsSetting } from './user/MCPHintsSetting'
import { OptOutCapture } from './user/OptOutCapture'
import { PasskeySettings } from './user/PasskeySettings'
import { PersonalAPIKeys } from './user/PersonalAPIKeys'
@@ -2646,14 +2645,6 @@ export const SETTINGS_MAP: SettingSection[] = [
flag: '!SIMPLE_SIDEPANEL',
keywords: ['sidebar', 'suggest', 'products', 'apps', 'tools', 'auto'],
},
- {
- id: 'mcp-hints',
- title: 'MCP hints',
- description:
- 'After you take an action in PostHog (creating a feature flag, building a dashboard, etc.), show a small hint that the same action can be done from your IDE via the PostHog MCP. Rate-limited to once a week.',
- component: <MCPHintsSetting />,
- keywords: ['mcp', 'claude', 'cursor', 'codex', 'ide', 'hints', 'wizard'],
- },
{
id: 'web-analytics-achievements',
title: 'Web analytics achievements',
diff --git a/frontend/src/scenes/settings/types.ts b/frontend/src/scenes/settings/types.ts
index 4d05b1daf0c3..4d1a1972b910 100644
--- a/frontend/src/scenes/settings/types.ts
+++ b/frontend/src/scenes/settings/types.ts
@@ -222,7 +222,6 @@ export type SettingId =
| 'logs-retention'
| 'logs-session-id-attribute-keys'
| 'marketing-settings'
- | 'mcp-hints'
| 'mcp-servers-manage'
| 'members'
| 'member-notifications'
diff --git a/frontend/src/scenes/settings/user/MCPHintsSetting.tsx b/frontend/src/scenes/settings/user/MCPHintsSetting.tsx
deleted file mode 100644
index d4d9a478c770..000000000000
--- a/frontend/src/scenes/settings/user/MCPHintsSetting.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { useActions, useValues } from 'kea'
-
-import { LemonSwitch } from '@posthog/lemon-ui'
-
-import { userLogic } from 'scenes/userLogic'
-
-export function MCPHintsSetting(): JSX.Element {
- const { user, userLoading } = useValues(userLogic)
- const { updateUser } = useActions(userLogic)
-
- return (
- <LemonSwitch
- onChange={(checked) => {
- updateUser({ hide_mcp_hints: !checked })
- }}
- checked={!(user?.hide_mcp_hints ?? false)}
- loading={userLoading}
- label="Show MCP hints after I take actions"
- bordered
- />
- )
-}