Skip to content

docs(mcp-analytics): add experimental Ruby SDK sections - #20022

Open
rafaeelaudibert wants to merge 4 commits into
masterfrom
docs/mcp-analytics-ruby
Open

rafaeelaudibert wants to merge 4 commits into
masterfrom
docs/mcp-analytics-ruby

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

Changes

Executive summary

This PR adds documentation for the new experimental Ruby SDK for MCP analytics, PostHog::MCP, which ships in the posthog-ruby gem (PostHog/posthog-ruby PR linked below). It changes three pages under contents/docs/mcp-analytics/ and nothing else. It does not add a page or a navigation entry, because MCP analytics documents each language as a section of the same page.

  • installation.mdx: adds Ruby to the requirements list and a ## Ruby section that mirrors the Python section. The section starts with an experimental callout. It covers install, PostHog::MCP.instrument, the posthog-rails shortcut, the options table, per-event $lib, stateless and multi-pod servers, flushing, and logging on stdio servers.
  • custom-servers.mdx: adds a ## Ruby section for PostHog::MCP::Client, the Ruby custom-dispatcher path, with the same experimental callout. It also notes that model capture is available on Ruby.
  • sdk-v2.mdx: adds a ## Ruby section that explains how the Ruby SDK handles both protocol revisions and how callbacks read headers.

All new content marks the Ruby SDK as experimental: the API and the captured event schema can change in a minor release.

Checks

  • Ran node scripts/fix-mdx.js and prettier --write on the three files.
  • Not run: the dev server (pnpm start). Please check the three pages in the Vercel preview build.
  • Related code PR: PostHog/posthog-ruby (see comment below).

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json (no pages moved)

🤖 Generated with Claude Code

Add `## Ruby` sections to the MCP analytics installation, custom servers, and
MCP SDK v2 pages for the new experimental `PostHog::MCP` integration in
posthog-ruby, each opening with an experimental callout, and list Ruby in the
installation requirements.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Sep 15, 2026 10:33PM

Changed pages

Page Source
Instrumenting a custom server contents/docs/mcp-analytics/custom-servers.mdx
Installing the MCP Analytics SDK contents/docs/mcp-analytics/installation.mdx
MCP SDK v2 contents/docs/mcp-analytics/sdk-v2.mdx

@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Sep 9, 2026
@rafaeelaudibert

Copy link
Copy Markdown
Member Author

Code PR: PostHog/posthog-ruby#269

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Vale prose linter → found 52 errors, 42 warnings, 1 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 — 19 errors, 8 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
18:99 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
33: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
37:81 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
74: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
90: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
96: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
98: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
99: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
100:56 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
101:24 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
102:21 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
104:184 warning Use 'ID' instead of 'id'. Vale.Terms
106: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
106:120 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
121:187 warning 'args' is a possible misspelling. PostHogBase.Spelling
185:158 warning 'kwargs' is a possible misspelling. PostHogBase.Spelling
185:165 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
195:50 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
196:42 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
196:157 warning Use 'AI' instead of 'ai'. Vale.Terms
196:161 warning 'Cowork' is a possible misspelling. PostHogBase.Spelling
202: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
224: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
242:164 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
337:52 warning 'OAuth' is a possible misspelling. PostHogBase.Spelling
contents/docs/mcp-analytics/installation.mdx — 25 errors, 28 warnings, 0 suggestions
Line Severity Message Rule
8:11 warning Use 'X' instead of 'x'. Vale.Terms
17:280 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
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
66: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
113: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
118:51 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
151:48 warning 'OAuth' is a possible misspelling. PostHogBase.Spelling
166:1 warning 'untrusted' is a possible misspelling. PostHogBase.Spelling
175:32 warning Use 'MCP' instead of 'mcp'. Vale.Terms
185: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
200:17 warning Use 'MCP' instead of 'mcp'. Vale.Terms
209:213 warning Use 'MCP' instead of 'mcp'. Vale.Terms
209:242 warning 'mutator' is a possible misspelling. PostHogBase.Spelling
213:130 warning 'mutator' is a possible misspelling. PostHogBase.Spelling
225: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
227:161 warning Use 'ID' instead of 'id'. Vale.Terms
227: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
235:5 warning 'Streamable' is a possible misspelling. PostHogBase.Spelling
248:5 warning 'If you must stream (SSE)' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
270: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
280: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
280:270 warning Use 'X' instead of 'x'. Vale.Terms
280:316 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
284:168 warning Use 'X' instead of 'x'. Vale.Terms
285: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
285:47 warning Use 'X' instead of 'x'. Vale.Terms
286:4 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
323: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
332: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
333: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
334: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
335: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
340: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
342:59 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
350: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
360: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
371:111 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
387:263 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
389:45 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
401:180 warning 'Streamable' is a possible misspelling. PostHogBase.Spelling
447:83 warning 'stdout' is a possible misspelling. PostHogBase.Spelling
483:27 warning 'stdout' is a possible misspelling. PostHogBase.Spelling
483:168 warning 'misconfiguration' is a possible misspelling. PostHogBase.Spelling
483:200 warning 'stderr' is a possible misspelling. PostHogBase.Spelling
483:246 warning 'stdout' is a possible misspelling. PostHogBase.Spelling
493: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
501: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
503: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
505: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
506: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
527: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
contents/docs/mcp-analytics/sdk-v2.mdx — 8 errors, 6 warnings, 0 suggestions
Line Severity Message Rule
7:112 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:11 warning Use 'X' instead of 'x'. Vale.Terms
42: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
61:151 warning Use 'X' instead of 'x'. Vale.Terms
61:227 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
76:46 warning 'jlowin's' is a possible misspelling. PostHogBase.Spelling
76:119 warning Use 'X' instead of 'x'. Vale.Terms
88:99 warning Use 'ID' instead of 'id'. Vale.Terms
111: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
113: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
114: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
120: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
130:4 warning 'MCP Apps' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
144: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

rafaeelaudibert and others added 2 commits September 8, 2026 23:30
Vale style fixes limited to the newly added Ruby sections.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Explain the custom-dispatcher path step by step and drop references to the
other SDKs so the Ruby sections read on their own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@rafaeelaudibert

Copy link
Copy Markdown
Member Author

Vale: fixed en dashes and ID in the added Ruby sections (2072f95). The remaining findings are on pre-existing lines of these pages and left as is.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

8.78 MiB (-0.0 KiB / -0.0%)

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

Entrypoint Eager size Budget Modules
app 18.53 MiB (-0.1 KiB / -0.0%) report-only 2062
Largest modules in the app closure
Module Size
./src/data/mcp-tools.json 1143.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 774.2 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/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs 480.8 KiB
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules 395.1 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs 385.7 KiB
./src/hooks/useCustomers.tsx + 55 modules 370.0 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 305.8 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs 281.7 KiB
./node_modules/.pnpm/@posthog+brand@0.8.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/director.mjs 275.6 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.7 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).

…nt hook

The MCP analytics team doesn't maintain the Ruby SDK, so the callouts now
say it is not officially supported and point at TypeScript or Python for a
supported one. The custom-dispatcher section covers `env['posthog_mcp.mint']`,
since the Rack middleware no longer parses request bodies to mint a session.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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"

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant