Skip to content

docs(mcp-analytics): update Python docs for MCP SDK v2 and TS parity - #19633

Merged
gesh merged 1 commit into
masterfrom
posthog/mcp-analytics-python-sdk-v2
Aug 21, 2026
Merged

docs(mcp-analytics): update Python docs for MCP SDK v2 and TS parity#19633
gesh merged 1 commit into
masterfrom
posthog/mcp-analytics-python-sdk-v2

Conversation

@gesh

@gesh gesh commented Aug 21, 2026

Copy link
Copy Markdown
Member

Changes

The posthog.mcp package in posthog-python merged three PRs on 2026-08-21 that made parts of the MCP analytics docs stale:

  • PostHog/posthog-python#881 — MCP Python SDK v2 support: instrument() now wraps MCPServer (mcp.server.mcpserver, FastMCP's new name) and the v2 low-level Server, on both protocol eras including 2026-07-28. Supported range mcp>=1.26,<3, detected at runtime. Also new: the get_request_headers(extra) export and cross-SDK byte-compatible conversation-derived session ids.
  • PostHog/posthog-python#882 — Python now emits $mcp_error_type / $mcp_error_message; capture_tool_call() / capture_tools_list() gained an error_type kwarg.
  • PostHog/posthog-python#883 — Python now captures $mcp_client_user_agent / $mcp_vendor_client; PostHogMCP.capture_* methods gained matching kwargs.

Doc updates:

  • installation.mdx — requirements and Python section now cover both mcp majors (mcp>=1.26,<3); added the v2 MCPServer import to the example; listed capture_tools_list() / capture_missing_capability(); beta callout no longer claims 2026-07-28 is unsupported.
  • sdk-v2.mdx — removed the now-false "TypeScript today, Python soon" callout; added a Python section (v2 setup, get_request_headers, cross-SDK session agreement); noted the "Not instrumented yet" gaps apply to both SDKs.
  • events.mdx — dropped the "TypeScript only for now" clauses on $mcp_error_type / $mcp_error_message.
  • custom-servers.mdx — documented the new error_type, client_user_agent, and vendor_client kwargs on PostHogMCP.capture_*.

All claims verified against posthog-python master (b86126e, posthog.mcp 0.3.0).


Created with PostHog Desktop

posthog-python's posthog.mcp now supports MCP Python SDK v2 (mcp>=1.26,<3, MCPServer), emits $mcp_error_type/$mcp_error_message, and captures $mcp_client_user_agent/$mcp_vendor_client (PostHog/posthog-python#881, #882, #883). Remove the stale "TypeScript only" / "Python soon" claims and document the new surface.

Generated-By: PostHog Desktop
Task-Id: a5edeffa-82df-4f0e-a565-01611e261806
@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Aug 21, 2026 02:50PM

@github-actions

Copy link
Copy Markdown
Contributor

Vale prose linter → found 64 errors, 33 warnings, 2 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/mcp-analytics/custom-servers.mdx — 16 errors, 5 warnings, 1 suggestions
Line Severity Message Rule
7:124 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
7:248 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
7:425 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
9:183 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
9:233 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
9:618 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
31:91 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
35:81 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
70:137 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
83:134 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
89:83 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
91:16 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
92:45 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
93:97 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
95:74 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
95:120 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
110:187 warning 'args' is a possible misspelling. PostHogBase.Spelling
149:158 warning 'kwargs' is a possible misspelling. PostHogBase.Spelling
149:405 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
151:146 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
155:172 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
177:84 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/mcp-analytics/events.mdx — 10 errors, 9 warnings, 1 suggestions
Line Severity Message Rule
16:115 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
18:115 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
31:84 warning Use 'ID' instead of 'id'. Vale.Terms
31:178 warning Use 'ID' instead of 'id'. Vale.Terms
31:265 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
31:276 warning Use 'ID' instead of 'id'. Vale.Terms
46:157 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
47:173 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
48:270 warning 'accessors' is a possible misspelling. PostHogBase.Spelling
48:280 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
57:209 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
57:236 warning Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. PostHogBase.ProductNames
68:49 warning 'symbolicate' is a possible misspelling. PostHogBase.Spelling
68:107 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
84:73 warning 'groupType' is a possible misspelling. PostHogBase.Spelling
84:85 warning 'groupKey' is a possible misspelling. PostHogBase.Spelling
94:34 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
95:30 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
96:33 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
98:57 warning 'typesafe' is a possible misspelling. PostHogBase.Spelling
contents/docs/mcp-analytics/installation.mdx — 28 errors, 15 warnings, 0 suggestions
Line Severity Message Rule
16:69 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
17:49 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
18:14 warning Use 'project token' instead of 'project API key'. The project token (phc_) is not an API key. PostHogBase.ProjectToken
36:211 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
40:280 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
40:318 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
64:63 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
106:28 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
111:51 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
141:48 warning 'OAuth' is a possible misspelling. PostHogBase.Spelling
156:1 warning 'untrusted' is a possible misspelling. PostHogBase.Spelling
167:106 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
191:213 warning Use 'MCP' instead of 'mcp'. Vale.Terms
191:242 warning 'mutator' is a possible misspelling. PostHogBase.Spelling
193:130 warning 'mutator' is a possible misspelling. PostHogBase.Spelling
205:51 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
207:161 warning Use 'ID' instead of 'id'. Vale.Terms
207:279 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
215:5 warning 'Streamable' is a possible misspelling. PostHogBase.Spelling
228:5 warning 'If you must stream (SSE)' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
250:269 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
260:70 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
264:168 warning Use 'X' instead of 'x'. Vale.Terms
265:15 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
265:47 warning Use 'X' instead of 'x'. Vale.Terms
266:4 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
303:105 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
312:77 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
313:59 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
314:48 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
315:53 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
320:59 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
322:59 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
330:38 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
340:160 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
349:137 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
361:75 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
368:93 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
370:1 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
372:76 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
373:77 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
394:115 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
406:136 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
contents/docs/mcp-analytics/sdk-v2.mdx — 10 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
7:113 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
39:191 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
58:134 warning Use 'X' instead of 'x'. Vale.Terms
58:159 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
68:46 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
68:119 warning Use 'X' instead of 'x'. Vale.Terms
68:126 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
70:208 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
80:99 warning Use 'ID' instead of 'id'. Vale.Terms
84:202 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
86:75 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
87:59 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
93:172 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
105:36 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash

@gesh
gesh marked this pull request as ready for review August 21, 2026 14:33
@gesh
gesh requested a review from lucasheriques August 21, 2026 14:35
@gesh gesh added the stamphog Request AI approval (no full review) label Aug 21, 2026
@gesh
gesh requested a review from a team August 21, 2026 14:36
@github-actions

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

8.07 MiB (-0.0 KiB / -0.0%)

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
app 16.85 MiB (+0.6 KiB / +0.0%) report-only 2030
Largest modules in the app closure
Module Size
./src/data/mcp-tools.json 1029.4 KiB
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 757.5 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js 481.4 KiB
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules 395.1 KiB
./src/hooks/useCustomers.tsx + 55 modules 357.1 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./src/components/ProductComparisonTable/index.tsx + 126 modules 301.5 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.0 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/magnifying-glass.mjs 254.7 KiB
./node_modules/.pnpm/framer-motion@10.18.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/motion.mjs + 109 modules 253.9 KiB
./node_modules/.pnpm/d3@7.9.0/node_modules/d3/src/index.js + 208 modules 247.4 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 240.1 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

@gesh
gesh merged commit 04e8ae3 into master Aug 21, 2026
21 of 22 checks passed
@gesh
gesh deleted the posthog/mcp-analytics-python-sdk-v2 branch August 21, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content PR only touches files under contents/ docs Improvements or additions to product documentation, "Docs" stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant