Skip to content

Commit 4e0cea6

Browse files
refactor(local-mcp): drop the posthog-code-local-mcp-import flag gate
Import and relay classification now runs unconditionally instead of behind a feature flag.
1 parent 945bb02 commit 4e0cea6

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

packages/shared/src/flags.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ export const TASKS_PREWARM_SANDBOX_FLAG = "tasks-prewarm-sandbox";
1919
export const GLM_MODEL_FLAG = "posthog-code-glm-model";
2020
/** Spoken narration (agent speaks via the `speak` tool). Gated for a staged rollout. */
2121
export const SPOKEN_NARRATION_FLAG = "posthog-code-spoken-narration";
22-
// Gates the whole local-MCP-in-cloud-runs feature: importing url-based
23-
// servers into the sandbox and relaying desktop-only servers over the durable
24-
// channel (docs/cloud-mcp-import.md, docs/cloud-mcp-relay.md).
25-
export const LOCAL_MCP_IMPORT_FLAG = "posthog-code-local-mcp-import";

packages/ui/src/features/local-mcp/useLocalMcpCloudServers.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,27 @@ import type {
44
LocalMcpImportService,
55
} from "@posthog/core/local-mcp/localMcpImport";
66
import { useServiceOptional } from "@posthog/di/react";
7-
import { LOCAL_MCP_IMPORT_FLAG } from "@posthog/shared";
87
import { useQuery } from "@tanstack/react-query";
9-
import { useFeatureFlag } from "../feature-flags/useFeatureFlag";
108

119
// Stable identity so consumers' memo deps don't churn while data is absent.
1210
const NO_SERVERS: LocalMcpCloudClassification[] = [];
1311

1412
/**
1513
* The user's local (~/.claude.json) MCP servers classified by cloud
1614
* availability. Empty on hosts without a local workspace (web/mobile — the
17-
* service is only bound on desktop) and while the feature flag is off.
15+
* service is only bound on desktop).
1816
*/
1917
export function useLocalMcpCloudServers(
2018
enabled: boolean,
2119
): LocalMcpCloudClassification[] {
2220
const service = useServiceOptional<LocalMcpImportService>(
2321
LOCAL_MCP_IMPORT_SERVICE,
2422
);
25-
const flagEnabled = useFeatureFlag(LOCAL_MCP_IMPORT_FLAG);
2623

2724
const query = useQuery({
2825
queryKey: ["local-mcp-cloud-availability"],
2926
queryFn: () => (service ? service.getCloudAvailability() : NO_SERVERS),
30-
enabled: enabled && flagEnabled && !!service,
27+
enabled: enabled && !!service,
3128
staleTime: 30_000,
3229
});
3330

0 commit comments

Comments
 (0)