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.

fix(signals): hide mcp banner after confirmed inbox use (#116616)

Dylan Martin4f433e29934c
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index c71e23cbedd9..727cda8222b3 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -374,6 +374,7 @@ export const FEATURE_FLAGS = {
HOGQL_WAREHOUSE_ACCESS_CONTROL: 'hogql-warehouse-access-control', // owner: @a-lider #team-platform-features, gates per-object access control for warehouse tables and views
IDENTITY_MATCHING: 'identity-matching', // owner: @fercgomes #team-growth, gates new identity matching scene on marketing analytics
INBOX_GET_IT_MERGED: 'inbox-get-it-merged', // owner: #team-self-driving, gates the Get it merged action in the report Ask AI menu
+ INBOX_MCP_USED: 'inbox-mcp-used', // owner: #team-self-driving, hides the MCP banner after confirmed Inbox tool use
INBOX_MODEL_SORT: 'inbox-model-sort', // owner: #team-self-driving, gates the staff-only ranking model sort options and the probability tag on inbox cards
INBOX_REDESIGN: 'inbox-redesign', // owner: #team-self-driving, gates the inbox redesign: report sections, triage mode, the Settings tab, and scout cards
INBOX_REPORT_FEEDBACK_BANG: 'inbox-report-feedback-bang', // owner: #team-self-driving, gates the party hog that pops on a report thumbs-up in the inbox and on the Today home page
diff --git a/products/signals/frontend/inbox/components/InboxMcpBanner.tsx b/products/signals/frontend/inbox/components/InboxMcpBanner.tsx
index 259ac31bd045..209ce8812085 100644
--- a/products/signals/frontend/inbox/components/InboxMcpBanner.tsx
+++ b/products/signals/frontend/inbox/components/InboxMcpBanner.tsx
@@ -2,10 +2,17 @@ import { useValues } from 'kea'
import { LemonBanner } from '@posthog/lemon-ui'
+import { FEATURE_FLAGS } from 'lib/constants'
+import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { userLogic } from 'scenes/userLogic'
export function InboxMcpBanner(): JSX.Element | null {
const { user } = useValues(userLogic)
+ const { featureFlags } = useValues(featureFlagLogic)
+
+ if (featureFlags[FEATURE_FLAGS.INBOX_MCP_USED]) {
+ return null
+ }
return (
<LemonBanner
diff --git a/services/mcp/src/hono/analytics.ts b/services/mcp/src/hono/analytics.ts
index 27815e4750ad..4e4b0d769acb 100644
--- a/services/mcp/src/hono/analytics.ts
+++ b/services/mcp/src/hono/analytics.ts
@@ -5,7 +5,7 @@ import type { MCPAnalyticsIntentSource, MCPAnalyticsModelSource } from '@posthog
import type { McpAuthFailure } from '@/lib/auth-errors'
import { classifyAuthMethod } from '@/lib/auth-method'
import { MCP_ANALYTICS_SOURCE, MCP_SERVER_NAME, MCP_SERVER_VERSION } from '@/lib/constants'
-import { resolveEventSource } from '@/lib/event-source'
+import { EVENT_SOURCE, resolveEventSource } from '@/lib/event-source'
import { gatewayServerSlug, isGatewayToolName, THIRD_PARTY_TOOL_CATEGORY } from '@/lib/gateway-tools'
import { getPostHogClient } from '@/lib/posthog'
import {
@@ -181,6 +181,10 @@ export async function trackToolCall(
// gateway call would land uncategorized and drop out of category-sliced views.
const gatewayServer = gatewayServerSlug(toolName)
const toolCategory = getToolCategory(toolName) ?? (gatewayServer ? THIRD_PARTY_TOOL_CATEGORY : undefined)
+ if (!isError && !gatewayServer && toolName.startsWith('inbox-') && properties.source === EVENT_SOURCE.MCP) {
+ // The Inbox banner flag targets this permanent adoption property.
+ properties.$set_once = { has_used_inbox_mcp: true }
+ }
// The description the agent saw when it picked this tool, clipped. Powers the
// tool-detail Descriptions table and description-vs-intent fit in MCP
// analytics. Callers pass servedDescription when the advertised text differs