Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/frontend/src/lib/state/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ export const EMAIL_RECOVERY_SETUP = createFeatureFlagStore(
enableOnIdAiDomains("EMAIL_RECOVERY_SETUP"),
);

/// Show the MCP access card in settings and allow the /mcp delegation flow.
/// Defaults on for id.ai and beta.id.ai; off everywhere else.
export const MCP = createFeatureFlagStore(
"MCP",
false,
enableOnIdAiDomains("MCP"),
);
Comment on lines +155 to +161

export default {
DOMAIN_COMPATIBILITY,
HARDWARE_KEY_TEST,
Expand All @@ -161,4 +169,5 @@ export default {
MIN_GUIDED_UPGRADE,
EMAIL_RECOVERY,
EMAIL_RECOVERY_SETUP,
MCP,
} as Record<string, FeatureFlagStore>;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { authenticatedStore } from "$lib/stores/authentication.store";
import { Trans } from "$lib/components/locale";
import { t } from "$lib/stores/locale.store";
import { MCP } from "$lib/state/featureFlags";
import CliAccessSection from "./components/CliAccessSection.svelte";
import McpAccessSection from "./components/McpAccessSection.svelte";
</script>
Expand All @@ -17,5 +18,7 @@

<div class="mt-10 flex max-w-3xl flex-col gap-5">
<CliAccessSection identityNumber={$authenticatedStore.identityNumber} />
<McpAccessSection identityNumber={$authenticatedStore.identityNumber} />
{#if $MCP}
<McpAccessSection identityNumber={$authenticatedStore.identityNumber} />
{/if}
</div>
5 changes: 4 additions & 1 deletion src/frontend/src/routes/(new-styling)/mcp/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import { handleError } from "$lib/components/utils/error";
import { toaster } from "$lib/components/utils/toaster";
import { getMcpServerOrigin } from "$lib/globals";
import { MCP } from "$lib/state/featureFlags";
import { get } from "svelte/store";
import { onMount } from "svelte";
import McpHero from "./components/McpHero.svelte";
Expand Down Expand Up @@ -65,7 +66,9 @@
}
};
const requestValid = $derived(
params.kind === "valid" && callbackMatchesMcpServer(params.callback),
$MCP &&
params.kind === "valid" &&
callbackMatchesMcpServer(params.callback),
);

const authFlow = new AuthLastUsedFlow();
Expand Down
Loading