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-analytics): recognize kimchi as a harness (#112430)

Paul D'Ambrae4d08f8f9b04
diff --git a/.agents/skills/debugging-mcp-analytics/SKILL.md b/.agents/skills/debugging-mcp-analytics/SKILL.md
index 6ec137ca64fa..807986eb8199 100644
--- a/.agents/skills/debugging-mcp-analytics/SKILL.md
+++ b/.agents/skills/debugging-mcp-analytics/SKILL.md
@@ -173,7 +173,7 @@ Windsurf, and ~30 other buckets). It is resolved at query time only, with no sto
`mcp_harness.py::HARNESS_TOKEN_SQL` picks the strongest available signal in priority order,
over exactly three properties — the ones the SDK schemas can emit
(`$mcp_vendor_client`, with the legacy non-`$` `mcp_vendor_client` coalesced for historical
-rows -> Claude Code user-agent surface -> Grok user-agent -> `$mcp_client_name` -> generic
+rows -> Claude Code user-agent surface -> Grok and Kimchi user-agents -> `$mcp_client_name` -> generic
user-agent token, both from `$mcp_client_user_agent`), then
`harness_label_sql()` buckets it (or `harness_label_or_token_sql()`, which names an
unrecognized client verbatim instead of collapsing it into "Other" — use it for ranked
diff --git a/products/mcp_analytics/backend/mcp_harness.py b/products/mcp_analytics/backend/mcp_harness.py
index 4d57a1e43fa0..e60d669d8791 100644
--- a/products/mcp_analytics/backend/mcp_harness.py
+++ b/products/mcp_analytics/backend/mcp_harness.py
@@ -9,7 +9,7 @@ query-time computation:
three properties — the ones the `@posthog/mcp` / `posthog.mcp` SDK schemas can
emit: the x-anthropic-client vendor header (`$mcp_vendor_client`, with the
legacy server-stamped `mcp_vendor_client` as a fallback for historical rows),
- then Claude Code's User-Agent surface, then the Grok User-Agent surface, then
+ then Claude Code's User-Agent surface, then the Grok and Kimchi User-Agent surfaces, then
the clientInfo.name (`$mcp_client_name`), then the generic User-Agent product
token (`$mcp_client_user_agent`) — `HARNESS_TOKEN_SQL`.
2. Bucket that token into a customer label — `harness_label_sql` when the result must
@@ -72,6 +72,10 @@ _RAW_TOKEN = f"""coalesce(
-- Promote the grok UA above it. (grok-shell keeps its `grok-`-prefixed
-- clientInfo.name and buckets to Grok without help.)
if(startsWith(lower({_UA_PRODUCT}), 'grok'), {_UA_TOKEN}, NULL),
+ -- Kimchi (kimchi.dev) is built on pi and reports the generic pi-mcp
+ -- `pi-mcp-<server>` as its clientInfo.name; only its `kimchi/…` User-Agent
+ -- names it, so promote that above the name the same way.
+ if(startsWith(lower({_UA_PRODUCT}), 'kimchi'), {_UA_TOKEN}, NULL),
nullIf(nullIf(toString(properties.$mcp_client_name), ''), 'mcp'),
nullIf({_UA_TOKEN}, ''),
''
@@ -175,6 +179,7 @@ def _label_multi_if(token_col: str, fallback_sql: str) -> str:
startsWith({token_col}, 'linear'), 'Linear',
position({token_col}, 'librechat') > 0, 'LibreChat',
startsWith({token_col}, 'pi-client'), 'Pi',
+ startsWith({token_col}, 'kimchi'), 'Kimchi',
startsWith({token_col}, 'antigravity'), 'Antigravity',
{token_col} = 'poke', 'Poke',
{token_col} = 'opencode', 'opencode',
@@ -219,6 +224,7 @@ HARNESS_LABELS: tuple[str, ...] = (
"Linear",
"LibreChat",
"Pi",
+ "Kimchi",
"Antigravity",
"Poke",
"opencode",
diff --git a/products/mcp_analytics/backend/tests/test_harness_breakdown.py b/products/mcp_analytics/backend/tests/test_harness_breakdown.py
index bd0ffdc1c0af..50d869cbbf00 100644
--- a/products/mcp_analytics/backend/tests/test_harness_breakdown.py
+++ b/products/mcp_analytics/backend/tests/test_harness_breakdown.py
@@ -166,6 +166,16 @@ class TestMCPHarnessBreakdownQueryRunner(_MCPAnalyticsTeamScopedTestMixin, Click
),
# xAI API surface: no grok UA, buckets via its grok- clientInfo.name.
("grok_shell_client_name", {"$mcp_client_name": "grok-shell-posthog"}, "Grok"),
+ ("ua_kimchi", {"$mcp_client_user_agent": "kimchi/1.2.2"}, "Kimchi"),
+ # Kimchi reports pi-mcp's generic clientInfo.name; its UA must beat it.
+ (
+ "kimchi_ua_beats_generic_pi_mcp_name",
+ {"$mcp_client_user_agent": "kimchi/1.2.2", "$mcp_client_name": "pi-mcp-castai"},
+ "Kimchi",
+ ),
+ # Without the kimchi UA, pi-mcp's name alone stays unattributed: it is
+ # not Pi's own `pi-client`, and other pi-based clients share it.
+ ("pi_mcp_name_alone_is_other", {"$mcp_client_name": "pi-mcp-castai"}, "Other"),
("client_name_librechat", {"$mcp_client_name": "@librechat/api-client"}, "LibreChat"),
(
"mcp_remote_suffix_stripped",
diff --git a/products/mcp_analytics/frontend/dashboard/harnessRegistry.test.ts b/products/mcp_analytics/frontend/dashboard/harnessRegistry.test.ts
index 5a692e54b31c..e37cc8a6af91 100644
--- a/products/mcp_analytics/frontend/dashboard/harnessRegistry.test.ts
+++ b/products/mcp_analytics/frontend/dashboard/harnessRegistry.test.ts
@@ -30,7 +30,7 @@ describe('harnessColor', () => {
expect(harnessColor(theme, 'OpenAI Codex')).not.toBe(theme.axisColor)
})
- it.each(['Claude Code', 'OpenAI Codex', 'VS Code', 'CodeRabbit'])(
+ it.each(['Claude Code', 'OpenAI Codex', 'VS Code', 'CodeRabbit', 'Kimchi'])(
'preserves the brand color for %s independently of the categorical palette',
(label) => {
expect(harnessColor({ ...theme, colors: [] }, label)).toBe(harnessColor(theme, label))
diff --git a/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts b/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts
index 2ffbed92e36b..3e89fccd066c 100644
--- a/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts
+++ b/products/mcp_analytics/frontend/dashboard/harnessRegistry.ts
@@ -8,6 +8,7 @@ import claudeLogo from '../harness-logos/claude.svg'
import coderabbitLogo from '../harness-logos/coderabbit.svg'
import cursorLogo from '../harness-logos/cursor.svg'
import grokLogo from '../harness-logos/grok.svg'
+import kimchiLogo from '../harness-logos/kimchi.svg'
import librechatLogo from '../harness-logos/librechat.svg'
import linearLogo from '../harness-logos/linear.svg'
import lovableLogo from '../harness-logos/lovable.png'
@@ -30,6 +31,7 @@ const HARNESS_BRAND_COLORS = {
openai: '#74aa9c',
vscode: '#007acc',
coderabbit: '#ff570a',
+ kimchi: '#ff521d',
} as const
interface HarnessDescriptor {
@@ -71,6 +73,7 @@ export const HARNESS_BY_LABEL: Record<string, HarnessDescriptor> = {
Linear: { logo: { src: linearLogo, alt: 'Linear logo' }, colorIndex: 9 },
LibreChat: { logo: { src: librechatLogo, alt: 'LibreChat logo' }, colorIndex: 14 },
Pi: { logo: { src: piLogo, alt: 'Pi logo' }, color: 'monochrome' },
+ Kimchi: { logo: { src: kimchiLogo, alt: 'Kimchi logo' }, color: 'kimchi' },
Antigravity: { logo: { src: antigravityLogo, alt: 'Antigravity logo' }, colorIndex: 7 },
Poke: {},
opencode: { logo: { src: opencodeLogo, alt: 'opencode logo' }, color: 'monochrome' },
diff --git a/products/mcp_analytics/frontend/harness-logos/kimchi.svg b/products/mcp_analytics/frontend/harness-logos/kimchi.svg
new file mode 100644
index 000000000000..55811fc77b96
--- /dev/null
+++ b/products/mcp_analytics/frontend/harness-logos/kimchi.svg
@@ -0,0 +1,4 @@
+<svg width="123" height="123" viewBox="0 0 123 123" fill="none" xmlns="http://www.w3.org/2000/svg">
+<ellipse cx="61.253" cy="61.2528" rx="61.253" ry="61.2528" fill="#FF521D"/>
+<path d="M80.6263 29.3839C82.2966 28.4796 84.3973 27.9391 86.5589 28.5265C86.9661 28.621 87.3259 28.7338 87.6819 28.8644L89.429 29.504L88.9476 31.3019C88.755 32.0205 88.5843 32.657 88.3919 33.3751L87.927 35.1085L86.1497 34.8653C86.0189 34.8474 85.9018 34.8387 85.7649 34.838C85.1042 34.8519 84.5224 35.1793 83.9476 36.1368C83.5024 36.8786 83.1558 37.8701 82.9056 39.0001C88.1938 42.4457 91.6964 48.4134 91.6966 55.2032C91.6966 58.3431 90.9453 61.3135 89.6126 63.9396C84.235 75.8602 63.8188 99.987 27.6409 93.0685C25.7729 92.711 24.7281 91.1929 24.6224 89.671C24.5188 88.1768 25.3014 86.5642 26.9729 85.8507C36.5987 81.7428 41.9216 77.4027 45.4671 72.13C49.068 66.7747 50.9596 60.301 53.3958 51.5069C55.1219 42.601 62.9567 35.8754 72.3685 35.8751L72.8958 35.8819C73.5513 35.8997 74.1993 35.9516 74.8372 36.0333C75.3327 35.0207 75.9093 34.0272 76.5911 33.0607L76.7718 32.798C77.6998 31.4888 79.0534 30.2355 80.6263 29.3839Z" fill="#18181A"/>
+</svg>
diff --git a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts
index be50003bd665..7c9289506d27 100644
--- a/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts
+++ b/products/mcp_analytics/frontend/mcpDashboardOverviewLogic.test.ts
@@ -76,6 +76,7 @@ describe('mcpDashboardOverviewLogic', () => {
'Linear',
'LibreChat',
'Pi',
+ 'Kimchi',
'Antigravity',
'Poke',
'opencode',
@@ -102,6 +103,7 @@ describe('mcpDashboardOverviewLogic', () => {
'Manus',
'LibreChat',
'Pi',
+ 'Kimchi',
'Antigravity',
])('resolves a logo for the %s category', (category) => {
expect(harnessLogo(category)?.src).toBeTruthy()
diff --git a/products/posthog_ai/skills/querying-posthog-data/references/models-mcp.md b/products/posthog_ai/skills/querying-posthog-data/references/models-mcp.md
index e2970a96ba93..7ebc271e6c8f 100644
--- a/products/posthog_ai/skills/querying-posthog-data/references/models-mcp.md
+++ b/products/posthog_ai/skills/querying-posthog-data/references/models-mcp.md
@@ -201,6 +201,7 @@ FROM (
startsWith(h, 'linear'), 'Linear',
position(h, 'librechat') > 0, 'LibreChat',
startsWith(h, 'pi-client'), 'Pi',
+ startsWith(h, 'kimchi'), 'Kimchi',
startsWith(h, 'antigravity'), 'Antigravity',
h = 'poke', 'Poke',
h = 'opencode', 'opencode',
@@ -235,6 +236,10 @@ FROM (
if(startsWith(lower(extract(toString(properties.$mcp_client_user_agent), '^([^/]+)')), 'grok'),
trim(concat(extract(toString(properties.$mcp_client_user_agent), '^([^/]+)'), ' ', extract(toString(properties.$mcp_client_user_agent), '[(]([^,)]+)'))),
NULL),
+ -- Kimchi likewise names itself only in the UA (clientInfo.name is pi-mcp's generic one).
+ if(startsWith(lower(extract(toString(properties.$mcp_client_user_agent), '^([^/]+)')), 'kimchi'),
+ trim(concat(extract(toString(properties.$mcp_client_user_agent), '^([^/]+)'), ' ', extract(toString(properties.$mcp_client_user_agent), '[(]([^,)]+)'))),
+ NULL),
nullIf(nullIf(toString(properties.$mcp_client_name), ''), 'mcp'),
nullIf(trim(concat(
extract(toString(properties.$mcp_client_user_agent), '^([^/]+)'),