Skip to content

fix(mcp): drop /sse transport, always install /mcp#429

Merged
posthog[bot] merged 2 commits intomainfrom
posthog-code/drop-sse-mcp-transport
Apr 30, 2026
Merged

fix(mcp): drop /sse transport, always install /mcp#429
posthog[bot] merged 2 commits intomainfrom
posthog-code/drop-sse-mcp-transport

Conversation

@joshsny
Copy link
Copy Markdown
Collaborator

@joshsny joshsny commented Apr 30, 2026

Summary

  • The PostHog MCP server no longer serves /sse, so any installation pointing there is broken. Two paths still did: DefaultMCPClient.addServer (inherited by Claude Desktop) and a now-stale Codex callsite (Codex itself moved to plugin install, but the 'sse' | 'streamable-http' abstraction was still threaded through the codebase).
  • Removed the transport-type abstraction entirely. buildMCPUrl, getNativeHTTPServerConfig, and getDefaultServerConfig no longer take a type arg and always emit /mcp. Cursor / VS Code / Zed addServer overrides existed solely to pass 'streamable-http' and are now unnecessary — deleted.
  • The lone surviving 'sse' is the Zod enum at visual-studio-code.ts:19 that parses VS Code's own mcp.json — left untouched so we don't reject existing user configs.

Test plan

  • pnpm exec jest — 589 pass (updated defaults.test.ts and claude.test.ts fixtures to drop the type arg).
  • pnpm typecheck clean within src/steps/add-mcp-server-to-clients.
  • Manual: run wizard with --local against Claude Desktop and verify the written config points at http://localhost:8787/mcp.

Created with PostHog Code

The MCP server no longer serves /sse, so installs that pointed there
(Claude Desktop default + leftover client overrides) were broken.
Remove the sse | streamable-http abstraction entirely — there's only
one transport now.

Generated-By: PostHog Code
Task-Id: f63629de-019f-44ee-bf68-c3c8a15570f3
Copilot AI review requested due to automatic review settings April 30, 2026 19:32
@github-actions
Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

Copy link
Copy Markdown
Collaborator

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice

@gewenyu99
Copy link
Copy Markdown
Collaborator

I think there are a few loose instances of SSE in docs still 👀

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the obsolete MCP transport-type abstraction now that the PostHog MCP server no longer serves /sse, ensuring generated client configs always point to /mcp.

Changes:

  • Simplifies URL/config builders (buildMCPUrl, getNativeHTTPServerConfig, getDefaultServerConfig) to always emit /mcp and removes the transport-type parameter.
  • Deletes client-specific addServer overrides that only existed to force 'streamable-http'.
  • Updates Jest fixtures to match the new function signatures and /mcp defaults.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/steps/add-mcp-server-to-clients/defaults.ts Removes transport-type arg; always builds /mcp URLs and derived configs.
src/steps/add-mcp-server-to-clients/MCPClient.ts Removes transport threading from default install path; always uses new default config builder.
src/steps/add-mcp-server-to-clients/clients/cursor.ts Updates Cursor config generation to new getNativeHTTPServerConfig signature.
src/steps/add-mcp-server-to-clients/clients/zed.ts Removes transport arg usage and deletes now-unnecessary addServer override.
src/steps/add-mcp-server-to-clients/clients/visual-studio-code.ts Removes transport arg usage and deletes now-unnecessary addServer override.
src/steps/add-mcp-server-to-clients/clients/tests/claude.test.ts Updates expectations for new getDefaultServerConfig call shape.
src/steps/add-mcp-server-to-clients/tests/defaults.test.ts Updates defaults tests to reflect /mcp and new signatures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/steps/add-mcp-server-to-clients/clients/zed.ts Outdated
Comment thread src/steps/add-mcp-server-to-clients/clients/visual-studio-code.ts Outdated
Copy link
Copy Markdown
Collaborator

@daniloc daniloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love all that red

The Copilot review caught that ZedClient and VisualStudioCodeClient
unconditionally wrote Authorization: Bearer ${apiKey}, which would emit
"Bearer undefined" when invoked in OAuth mode (DefaultMCPClient.addServer
passes apiKey?: string).

Reuse getNativeHTTPServerConfig — same pattern Cursor uses — so the auth
header is only emitted when an API key is present.

Generated-By: PostHog Code
Task-Id: cce4f29c-186a-4e54-9019-bbd0f2be0c28
@posthog posthog Bot enabled auto-merge (squash) April 30, 2026 20:11
@posthog posthog Bot merged commit 4fcbf8a into main Apr 30, 2026
17 checks passed
@posthog posthog Bot deleted the posthog-code/drop-sse-mcp-transport branch April 30, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants