Skip to content

Commit 4f5ee10

Browse files
authored
fix: mcp server setup (#1266)
1 parent 5beaedf commit 4f5ee10

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/code/src/renderer/api/generated.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8556,7 +8556,7 @@ export namespace Schemas {
85568556
values?: null | undefined;
85578557
};
85588558
export type InstallCustomAuthTypeEnum = "api_key" | "oauth";
8559-
export type InstallSourceEnum = "posthog" | "twig";
8559+
export type InstallSourceEnum = "posthog" | "posthog-code";
85608560
export type InstallCustom = {
85618561
name: string;
85628562
url: string;
@@ -8565,7 +8565,7 @@ export namespace Schemas {
85658565
description?: string | undefined;
85668566
oauth_provider_kind?: string | undefined;
85678567
install_source?: (InstallSourceEnum & unknown) | undefined;
8568-
twig_callback_url?: string | undefined;
8568+
posthog_code_callback_url?: string | undefined;
85698569
};
85708570
export type InterestingNote = { text: string; line_refs: string };
85718571
export type JsonrpcEnum = "2.0";
@@ -14423,9 +14423,9 @@ export namespace Endpoints {
1442314423
requestFormat: "json";
1442414424
parameters: {
1442514425
query: {
14426-
install_source?: ("posthog" | "twig") | undefined;
14426+
install_source?: ("posthog" | "posthog-code") | undefined;
1442714427
server_id: string;
14428-
twig_callback_url?: string | undefined;
14428+
posthog_code_callback_url?: string | undefined;
1442914429
};
1443014430
path: { project_id: string };
1443114431
};

apps/code/src/renderer/api/posthogClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,8 @@ export class PostHogAPIClient {
953953
api_key?: string;
954954
description?: string;
955955
oauth_provider_kind?: string;
956-
install_source?: "posthog" | "twig";
957-
twig_callback_url?: string;
956+
install_source?: "posthog" | "posthog-code";
957+
posthog_code_callback_url?: string;
958958
}): Promise<McpServerInstallation | Schemas.OAuthRedirectResponse> {
959959
const teamId = await this.getTeamId();
960960
const apiUrl = new URL(

apps/code/src/renderer/features/settings/components/sections/McpServersSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ function AddCustomServerDialog({
6262
await trpcClient.mcpCallback.getCallbackUrl.query();
6363
const data = await client.installCustomMcpServer({
6464
...vars,
65-
install_source: "twig",
66-
twig_callback_url: callbackUrl,
65+
install_source: "posthog-code",
66+
posthog_code_callback_url: callbackUrl,
6767
});
6868
if ("redirect_url" in data && data.redirect_url) {
6969
return trpcClient.mcpCallback.openAndWaitForCallback.mutate({

apps/code/src/renderer/features/settings/hooks/useMcpServers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ async function installWithOAuth(
3838
// Step 2: Call PostHog API with PostHog Code-specific params
3939
const data = await client.installCustomMcpServer({
4040
...vars,
41-
install_source: "twig",
42-
twig_callback_url: callbackUrl,
41+
install_source: "posthog-code",
42+
posthog_code_callback_url: callbackUrl,
4343
});
4444

4545
// Step 3: If OAuth redirect needed, open browser via main process and wait

0 commit comments

Comments
 (0)