Add a new token

{#if showMcpMode}
{ mcpCreationMode = e.detail if (e.detail) { newTokenLabel = 'MCP token' newTokenExpiration = undefined newTokenWorkspace = $workspaceStore } else { newTokenLabel = undefined newTokenExpiration = undefined newTokenWorkspace = defaultNewTokenWorkspace } }} checked={mcpCreationMode} options={{ right: 'Generate MCP URL', rightTooltip: 'Generate a new MCP URL to make your scripts, flows, and API endpoints available as tools through your LLM clients.', rightDocumentationLink: 'https://www.windmill.dev/docs/core_concepts/mcp' }} size="xs" />
{/if} {#if scopes != undefined}
Scope {#each scopes as scope} {/each}
{/if} {#if !mcpCreationMode && (!scopes || scopes.length === 0)}
{ showCustomScopes = e.detail }} options={{ right: 'Limit token permissions', rightTooltip: 'By default, tokens have full API access. Enable this to restrict the token to specific scopes.' }} size="xs" /> {#if showCustomScopes} {/if}
{/if}
{#if mcpCreationMode}
Scope {#snippet children({ item })} {/snippet}
{#if newMcpScope === 'folder'}
Select Folder
{/if}
Hub scripts (optional) {#if loadingApps}
Loading...
{:else if errorFetchApps}
Error fetching apps
{:else} {/if}
Workspace
{/if}
Label (optional)
{#if !mcpCreationMode}
Expires In (optional)