Skip to content

feat(local-mcp): gate cloud import and relay#3495

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/gate-local-mcp-cloud
Jul 16, 2026
Merged

feat(local-mcp): gate cloud import and relay#3495
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/gate-local-mcp-cloud

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 16, 2026

Copy link
Copy Markdown
Member

Problem

Local MCP import and relay need an internal rollout boundary while they bake.

Changes

Gate local MCP discovery and cloud wiring behind posthog-code-local-mcp-import, including cached results.

How did you test this?

  • Focused Vitest coverage for enabled, disabled, and revoked access.
  • @posthog/shared and @posthog/ui typechecks.
  • Biome on the changed files.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Keep local MCP discovery, cloud import, and desktop relay designation disabled unless the existing PostHog Code flag is enabled.

Generated-By: PostHog Code
Task-Id: 311f71cc-873c-4a23-b8c7-d9fed8f8ece5
@trunk-io

trunk-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 9162c49.

@richardsolomou richardsolomou changed the title Gate local MCP cloud access behind a feature flag feat(local-mcp): gate cloud import and relay Jul 16, 2026
@richardsolomou
richardsolomou marked this pull request as ready for review July 16, 2026 10:01
@richardsolomou
richardsolomou requested a review from a team July 16, 2026 10:01
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Gate local MCP cloud access behind a fea..." | Re-trigger Greptile

queryFn: () => (service ? service.getCloudAvailability() : NO_SERVERS),
enabled: enabled && !!service,
enabled: queryEnabled,
staleTime: 30_000,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Revocation Leaves Discovery In Flight

When the flag is revoked while getCloudAvailability() is running, setting enabled to false does not cancel that request. The request can still complete and populate the shared cache, so re-enabling the flag within staleTime can immediately expose outdated local MCP servers and include a server removed while access was disabled in a new cloud task.

@trunk-io
trunk-io Bot merged commit e01a82f into main Jul 16, 2026
34 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/gate-local-mcp-cloud branch July 16, 2026 10:25
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.

2 participants