: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): isolate mcp checks from frontend (#70415)
Georgiy Tarasovb66b3f1933dc
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.ymlindex 99c77686acc8..f26f5097edd2 100644--- a/.github/workflows/ci-frontend.yml+++ b/.github/workflows/ci-frontend.yml@@ -79,7 +79,6 @@ jobs:- 'products/**/*.tsx'- 'products/**/*.json'- 'playwright/**'- - 'services/mcp/**'- 'docs/**/*.tsx'# Make sure we run if someone is explicitly change the workflow- .github/workflows/ci-frontend.yml@@ -99,6 +98,8 @@ jobs:- '**/*.yaml'- '**/*.yml'- .config/.markdownlint-cli2.jsonc+ # MCP owns its code-quality checks in ci-mcp.yml.+ - '!services/mcp/**'# Like `frontend` but excludes doc/config-only files that don't affect# compiled output — used to skip Jest, bundle-size, and TypeScript checks# when only markdown or YAML files change.@@ -112,7 +113,6 @@ jobs:- 'products/**/*.tsx'- 'products/**/*.json'- 'playwright/**'- - 'services/mcp/**'- .github/workflows/ci-frontend.yml- .oxlintrc.json- .oxfmtrc*@@ -124,6 +124,7 @@ jobs:- tsconfig.*.json- webpack.config.js- stylelint*+ - '!services/mcp/**'# The @posthog/replay-shared package's own jest suite (the# jest-replay-shared job). posthog-js bumps land via the catalog +# lockfile and have broken it before (rrweb subpath entries switchingdiff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.ymlindex eb2449294731..56fe2a7d51a3 100644--- a/.github/workflows/ci-mcp.yml+++ b/.github/workflows/ci-mcp.yml@@ -134,7 +134,14 @@ jobs:- name: Install pnpm dependenciesuses: ./.github/actions/pnpm-installwith:- install-command: pnpm --filter=@posthog/mcp... --filter='./products/*' install --frozen-lockfile+ install-command: pnpm --filter=@posthog/root --filter=@posthog/mcp... --filter='./products/*' install --frozen-lockfile++ - name: Check MCP code quality+ run: |+ pnpm exec oxlint --quiet services/mcp+ pnpm exec oxfmt --check "services/mcp/**/*.{md,mdx}"+ pnpm exec oxfmt --check "services/mcp/**/*.{yaml,yml}"+ pnpm exec markdownlint-cli2 --config .config/.markdownlint-cli2.jsonc "services/mcp/**/*.{md,mdx}"- name: Build packagerun: cd services/mcp && pnpm builddiff --git a/services/mcp/AGENTS.md b/services/mcp/AGENTS.mdnew file mode 100644index 000000000000..14a5aca84a04--- /dev/null+++ b/services/mcp/AGENTS.md@@ -0,0 +1,8 @@+# MCP development guide++## Commands++Run these commands from the repository root:++- Run `pnpm --filter=@posthog/mcp run typecheck` after changing TypeScript or TSX files. It checks types without emitting files.+- Run `pnpm --filter=@posthog/mcp run format` before committing JavaScript, TypeScript, JSON, YAML, CSS, or SCSS changes. It applies Oxlint fixes and Oxfmt formatting, so it may rewrite files.diff --git a/services/mcp/CLAUDE.md b/services/mcp/CLAUDE.mdnew file mode 120000index 000000000000..47dc3e3d863c--- /dev/null+++ b/services/mcp/CLAUDE.md@@ -0,0 +1 @@+AGENTS.md\ No newline at end of file